diff options
author | Balazs Varga <balazs.varga991@gmail.com> | 2018-08-22 11:15:45 +0200 |
---|---|---|
committer | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2018-08-23 13:45:58 +0200 |
commit | 17c2b0af97f73b9103be982b15d7111b3980e027 (patch) | |
tree | 80add5142314641bb2aa4ea2c9f3af825e758c67 /chart2 | |
parent | 47b8e414dd6f034a94f594c237c428c69a07f0cf (diff) |
tdf#94502 Fix overlap export of Stacked Bar Chart to *.xlsx
Export the Overlap value with 100% for stacked charts, because the
default overlap value of the Bar/Column chart is 0% and LibreOffice
do nothing with the overlap value in Stacked Chart case, unlike the
MS Office.
Change-Id: If4e20b88c2b1180f68a8d2b610c407d674a8498b
Reviewed-on: https://gerrit.libreoffice.org/59448
Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
Tested-by: Jenkins
Diffstat (limited to 'chart2')
-rw-r--r-- | chart2/qa/extras/chart2export.cxx | 23 | ||||
-rwxr-xr-x | chart2/qa/extras/data/xlsx/testDataseriesOverlapStackedChart.xlsx | bin | 0 -> 11007 bytes |
2 files changed, 23 insertions, 0 deletions
diff --git a/chart2/qa/extras/chart2export.cxx b/chart2/qa/extras/chart2export.cxx index cb9b40482aa6..d170510e2294 100644 --- a/chart2/qa/extras/chart2export.cxx +++ b/chart2/qa/extras/chart2export.cxx @@ -104,6 +104,7 @@ public: void testChartTitlePropertiesGradientFillXLSX(); void testChartTitlePropertiesBitmapFillXLSX(); void testBarChartDataPointPropXLSX(); + void testDataseriesOverlapStackedChartXLSX(); void testAxisCharacterPropertiesXLSX(); void testTitleCharacterPropertiesXLSX(); void testPlotVisOnlyXLSX(); @@ -186,6 +187,7 @@ public: CPPUNIT_TEST(testChartTitlePropertiesGradientFillXLSX); CPPUNIT_TEST(testChartTitlePropertiesBitmapFillXLSX); CPPUNIT_TEST(testBarChartDataPointPropXLSX); + CPPUNIT_TEST(testDataseriesOverlapStackedChartXLSX); CPPUNIT_TEST(testAxisCharacterPropertiesXLSX); CPPUNIT_TEST(testTitleCharacterPropertiesXLSX); CPPUNIT_TEST(testPlotVisOnlyXLSX); @@ -1603,6 +1605,27 @@ void Chart2ExportTest::testBarChartDataPointPropXLSX() assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:barChart/c:ser/c:dPt[2]/c:spPr/a:ln/a:solidFill/a:srgbClr", "val", "70ad47"); } +void Chart2ExportTest::testDataseriesOverlapStackedChartXLSX() +{ + load("/chart2/qa/extras/data/xlsx/", "testDataseriesOverlapStackedChart.xlsx"); + + // test the overlap value of a simple Stacked Column Chart + uno::Reference< chart2::XChartDocument > xChartDoc = getChartDocFromSheet( 0, mxComponent ); + checkSheetForGapWidthAndOverlap(xChartDoc, 100, 0); + + // test the overlap value of a Percent Stacked Bar Chart + xChartDoc = getChartDocFromSheet( 1, mxComponent ); + checkSheetForGapWidthAndOverlap(xChartDoc, 100, 35); + + reload("Calc Office Open XML"); + + xChartDoc = getChartDocFromSheet( 0, mxComponent ); + checkSheetForGapWidthAndOverlap(xChartDoc, 100, 100); + + xChartDoc = getChartDocFromSheet( 1, mxComponent ); + checkSheetForGapWidthAndOverlap(xChartDoc, 100, 100); +} + void Chart2ExportTest::testAxisCharacterPropertiesXLSX() { load("/chart2/qa/extras/data/xlsx/", "axis_character_properties.xlsx"); diff --git a/chart2/qa/extras/data/xlsx/testDataseriesOverlapStackedChart.xlsx b/chart2/qa/extras/data/xlsx/testDataseriesOverlapStackedChart.xlsx Binary files differnew file mode 100755 index 000000000000..ba1c526b41ca --- /dev/null +++ b/chart2/qa/extras/data/xlsx/testDataseriesOverlapStackedChart.xlsx |