Kaydet (Commit) b89f239a authored tarafından Balazs Varga's avatar Balazs Varga Kaydeden (comit) László Németh

tdf#97575 Chart OOXML: Export ShapeProps of Error Bars

Export the shapeProps (fillstyle, linestyle, linewidth,
linecolor etc.) of the Error Bars to OOXML.

Change-Id: Iff74fa463fdd0fb6ed95e4d1bf0d3e906349860c
Reviewed-on: https://gerrit.libreoffice.org/67825
Tested-by: Jenkins
Reviewed-by: 's avatarLászló Németh <nemeth@numbertext.org>
üst 153c40ad
...@@ -40,6 +40,7 @@ protected: ...@@ -40,6 +40,7 @@ protected:
public: public:
Chart2ExportTest() : ChartTest() {} Chart2ExportTest() : ChartTest() {}
void testErrorBarXLSX(); void testErrorBarXLSX();
void testErrorBarPropXLSX();
void testTrendline(); void testTrendline();
void testTrendlineOOXML(); void testTrendlineOOXML();
void testTrendlineXLS(); void testTrendlineXLS();
...@@ -130,6 +131,7 @@ public: ...@@ -130,6 +131,7 @@ public:
CPPUNIT_TEST_SUITE(Chart2ExportTest); CPPUNIT_TEST_SUITE(Chart2ExportTest);
CPPUNIT_TEST(testErrorBarXLSX); CPPUNIT_TEST(testErrorBarXLSX);
CPPUNIT_TEST(testErrorBarPropXLSX);
CPPUNIT_TEST(testTrendline); CPPUNIT_TEST(testTrendline);
CPPUNIT_TEST(testTrendlineOOXML); CPPUNIT_TEST(testTrendlineOOXML);
CPPUNIT_TEST(testTrendlineXLS); CPPUNIT_TEST(testTrendlineXLS);
...@@ -495,6 +497,23 @@ void Chart2ExportTest::testErrorBarXLSX() ...@@ -495,6 +497,23 @@ void Chart2ExportTest::testErrorBarXLSX()
} }
} }
void Chart2ExportTest::testErrorBarPropXLSX()
{
load("/chart2/qa/extras/data/xlsx/", "testErrorBarProp.xlsx");
xmlDocPtr pXmlDoc = parseExport("xl/charts/chart","Calc Office Open XML");
CPPUNIT_ASSERT(pXmlDoc);
// test y error bars property
assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:scatterChart/c:ser/c:errBars[1]/c:errDir", "val", "y");
assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:scatterChart/c:ser/c:errBars[1]/c:spPr/a:ln", "w", "12600");
assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:scatterChart/c:ser/c:errBars[1]/c:spPr/a:ln/a:solidFill/a:srgbClr", "val", "ff0000");
// test x error bars property
assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:scatterChart/c:ser/c:errBars[2]/c:errDir", "val", "x");
assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:scatterChart/c:ser/c:errBars[2]/c:spPr/a:ln", "w", "9360");
assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:scatterChart/c:ser/c:errBars[2]/c:spPr/a:ln/a:solidFill/a:srgbClr", "val", "595959");
}
// This method tests the preservation of properties for trendlines / regression curves // This method tests the preservation of properties for trendlines / regression curves
// in an export -> import cycle using different file formats - ODS, XLS and XLSX. // in an export -> import cycle using different file formats - ODS, XLS and XLSX.
void Chart2ExportTest::testTrendline() void Chart2ExportTest::testTrendline()
......
...@@ -3885,6 +3885,8 @@ void ChartExport::exportErrorBar(const Reference< XPropertySet>& xErrorBarProps, ...@@ -3885,6 +3885,8 @@ void ChartExport::exportErrorBar(const Reference< XPropertySet>& xErrorBarProps,
FSEND ); FSEND );
} }
exportShapeProps( xErrorBarProps );
pFS->endElement( FSNS( XML_c, XML_errBars) ); pFS->endElement( FSNS( XML_c, XML_errBars) );
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment