diff options
Diffstat (limited to 'chart2')
-rw-r--r-- | chart2/qa/extras/chart2export.cxx | 14 | ||||
-rw-r--r-- | chart2/qa/extras/data/xlsx/tdf128619.xlsx | bin | 0 -> 13658 bytes |
2 files changed, 14 insertions, 0 deletions
diff --git a/chart2/qa/extras/chart2export.cxx b/chart2/qa/extras/chart2export.cxx index 4d14a1e96638..694e814250bd 100644 --- a/chart2/qa/extras/chart2export.cxx +++ b/chart2/qa/extras/chart2export.cxx @@ -91,6 +91,7 @@ public: void testChartTitlePropertiesBitmapFillDOCX(); void testColorGradientWithTransparancyDOCX(); void testColorGradientWithTransparancyODS(); + void testColorGradientStopXLSX(); void testBarChartDataPointPropDOCX(); void testFdo83058dlblPos(); void testAutoTitleDelXLSX(); @@ -201,6 +202,7 @@ public: CPPUNIT_TEST(testChartTitlePropertiesBitmapFillDOCX); CPPUNIT_TEST(testColorGradientWithTransparancyDOCX); CPPUNIT_TEST(testColorGradientWithTransparancyODS); + CPPUNIT_TEST(testColorGradientStopXLSX); CPPUNIT_TEST(testBarChartDataPointPropDOCX); CPPUNIT_TEST(testFdo83058dlblPos); CPPUNIT_TEST(testAutoTitleDelXLSX); @@ -1251,6 +1253,18 @@ void Chart2ExportTest::testColorGradientWithTransparancyODS() assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:barChart/c:ser/c:spPr/a:gradFill/a:gsLst/a:gs[2]/a:srgbClr/a:alpha", "val", "60000"); } +void Chart2ExportTest::testColorGradientStopXLSX() +{ + // Test color gradient (two color) stop of the first color + load("/chart2/qa/extras/data/xlsx/", "tdf128619.xlsx"); + xmlDocPtr pXmlDoc = parseExport("xl/charts/chart", "Calc Office Open XML"); + CPPUNIT_ASSERT(pXmlDoc); + // Test the position of the first color + assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:barChart/c:ser/c:spPr/a:gradFill/a:gsLst/a:gs[1]", "pos", "45000"); + // Test the position of the second color + assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:barChart/c:ser/c:spPr/a:gradFill/a:gsLst/a:gs[2]", "pos", "100000"); +} + void Chart2ExportTest::testBarChartDataPointPropDOCX() { load("/chart2/qa/extras/data/docx/", "testBarChartDataPointPropDOCX.docx"); diff --git a/chart2/qa/extras/data/xlsx/tdf128619.xlsx b/chart2/qa/extras/data/xlsx/tdf128619.xlsx Binary files differnew file mode 100644 index 000000000000..e6eb142593fe --- /dev/null +++ b/chart2/qa/extras/data/xlsx/tdf128619.xlsx |