diff options
Diffstat (limited to 'chart2')
-rw-r--r-- | chart2/qa/extras/chart2export.cxx | 19 | ||||
-rwxr-xr-x | chart2/qa/extras/data/xlsx/testErrorBarProp.xlsx | bin | 0 -> 14559 bytes |
2 files changed, 19 insertions, 0 deletions
diff --git a/chart2/qa/extras/chart2export.cxx b/chart2/qa/extras/chart2export.cxx index b16e773ab776..8671a4771e21 100644 --- a/chart2/qa/extras/chart2export.cxx +++ b/chart2/qa/extras/chart2export.cxx @@ -40,6 +40,7 @@ protected: public: Chart2ExportTest() : ChartTest() {} void testErrorBarXLSX(); + void testErrorBarPropXLSX(); void testTrendline(); void testTrendlineOOXML(); void testTrendlineXLS(); @@ -130,6 +131,7 @@ public: CPPUNIT_TEST_SUITE(Chart2ExportTest); CPPUNIT_TEST(testErrorBarXLSX); + CPPUNIT_TEST(testErrorBarPropXLSX); CPPUNIT_TEST(testTrendline); CPPUNIT_TEST(testTrendlineOOXML); CPPUNIT_TEST(testTrendlineXLS); @@ -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 // in an export -> import cycle using different file formats - ODS, XLS and XLSX. void Chart2ExportTest::testTrendline() diff --git a/chart2/qa/extras/data/xlsx/testErrorBarProp.xlsx b/chart2/qa/extras/data/xlsx/testErrorBarProp.xlsx Binary files differnew file mode 100755 index 000000000000..ac9dde9b79b6 --- /dev/null +++ b/chart2/qa/extras/data/xlsx/testErrorBarProp.xlsx |