diff options
author | Gülşah Köse <gulsah.kose@collabora.com> | 2019-01-21 13:24:40 +0300 |
---|---|---|
committer | Gülşah Köse <gulsah.kose@collabora.com> | 2019-01-22 11:27:42 +0100 |
commit | 683645aac372fbec37a975af2160bdf67a88549c (patch) | |
tree | 9e71b4dfe399f0d5d788b3e512de1b2cfc483042 | |
parent | 6668e16b39f926d6f812ee6c000f124468f433c1 (diff) |
tdf#122031 Unit test checks pie chart data label format.
Change-Id: Ie2f153591e69a7a2718e54a0379725dcd659a737
Signed-off-by: Gülşah Köse <gulsah.kose@collabora.com>
Reviewed-on: https://gerrit.libreoffice.org/66668
Tested-by: Jenkins
-rw-r--r-- | chart2/qa/extras/chart2export.cxx | 16 | ||||
-rw-r--r-- | chart2/qa/extras/data/xlsx/tdf122031.xlsx | bin | 0 -> 13229 bytes |
2 files changed, 16 insertions, 0 deletions
diff --git a/chart2/qa/extras/chart2export.cxx b/chart2/qa/extras/chart2export.cxx index 3f34f5e7598e..e01ce9381ef9 100644 --- a/chart2/qa/extras/chart2export.cxx +++ b/chart2/qa/extras/chart2export.cxx @@ -124,6 +124,7 @@ public: void testTdf119029(); void testTdf108022(); void testTdf121744(); + void testTdf122031(); CPPUNIT_TEST_SUITE(Chart2ExportTest); CPPUNIT_TEST(testErrorBarXLSX); @@ -211,6 +212,7 @@ public: CPPUNIT_TEST(testTdf119029); CPPUNIT_TEST(testTdf108022); CPPUNIT_TEST(testTdf121744); + CPPUNIT_TEST(testTdf122031); CPPUNIT_TEST_SUITE_END(); protected: @@ -1977,6 +1979,20 @@ void Chart2ExportTest::testTdf121744() assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:lineChart/c:axId[2]", "val", YValueId ); } +void Chart2ExportTest::testTdf122031() +{ + //Checks pie chart data label format. + + load("/chart2/qa/extras/data/xlsx/", "tdf122031.xlsx"); + xmlDocPtr pXmlDoc = parseExport("xl/charts/chart", "Calc Office Open XML"); + CPPUNIT_ASSERT(pXmlDoc); + + assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:pieChart/c:ser/c:dLbls/c:numFmt", "formatCode", "0.000%"); + assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:pieChart/c:ser/c:dLbls/c:dLbl[1]/c:numFmt", "formatCode", "0.000%"); + assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:pieChart/c:ser/c:dLbls/c:dLbl[2]/c:numFmt", "formatCode", "0.000%"); + assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:pieChart/c:ser/c:dLbls/c:dLbl[3]/c:numFmt", "formatCode", "0.000%"); +} + CPPUNIT_TEST_SUITE_REGISTRATION(Chart2ExportTest); CPPUNIT_PLUGIN_IMPLEMENT(); diff --git a/chart2/qa/extras/data/xlsx/tdf122031.xlsx b/chart2/qa/extras/data/xlsx/tdf122031.xlsx Binary files differnew file mode 100644 index 000000000000..ac937a8c7a62 --- /dev/null +++ b/chart2/qa/extras/data/xlsx/tdf122031.xlsx |