diff options
author | Balazs Varga <balazs.varga991@gmail.com> | 2019-11-11 15:03:05 +0100 |
---|---|---|
committer | László Németh <nemeth@numbertext.org> | 2019-11-13 08:28:11 +0100 |
commit | d7149889a9e1cae7f255691c2a35090ac3245bfa (patch) | |
tree | 84e0d81e5b956b34a0cc507062510f27bd32e3a9 /chart2 | |
parent | eeae2032476e8c8645ab438fbb379f3151c8e472 (diff) |
tdf#128619 Chart OOXML export: fix gradient position
Export the gradient border value as gradient stop
position of the first color at LINEAR GradientStyle.
Change-Id: I1a2b986a004fecbf68050c6bf95be549684fea70
Reviewed-on: https://gerrit.libreoffice.org/82446
Tested-by: Jenkins
Reviewed-by: László Németh <nemeth@numbertext.org>
Tested-by: László Németh <nemeth@numbertext.org>
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 |