[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.0' - chart2/qa
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Tue Jan 22 10:52:31 UTC 2019
chart2/qa/extras/chart2export.cxx | 16 ++++++++++++++++
chart2/qa/extras/data/xlsx/tdf122031.xlsx |binary
2 files changed, 16 insertions(+)
New commits:
commit 925567a00f433463c341908d1f1bc6c7c966d5df
Author: Gülşah Köse <gulsah.kose at collabora.com>
AuthorDate: Mon Jan 21 13:24:40 2019 +0300
Commit: Andras Timar <andras.timar at collabora.com>
CommitDate: Tue Jan 22 11:32:42 2019 +0100
tdf#122031 Unit test checks pie chart data label format.
Change-Id: Ie2f153591e69a7a2718e54a0379725dcd659a737
Signed-off-by: Gülşah Köse <gulsah.kose at collabora.com>
Reviewed-on: https://gerrit.libreoffice.org/66668
Tested-by: Jenkins
diff --git a/chart2/qa/extras/chart2export.cxx b/chart2/qa/extras/chart2export.cxx
index cb1ae992a1dd..60166b8deb4a 100755
--- a/chart2/qa/extras/chart2export.cxx
+++ b/chart2/qa/extras/chart2export.cxx
@@ -120,6 +120,7 @@ public:
void testCustomDataLabel();
void testCustomDataLabelMultipleSeries();
void testTdf119029();
+ void testTdf122031();
CPPUNIT_TEST_SUITE(Chart2ExportTest);
CPPUNIT_TEST(testErrorBarXLSX);
@@ -202,6 +203,7 @@ public:
CPPUNIT_TEST(testCustomDataLabel);
CPPUNIT_TEST(testCustomDataLabelMultipleSeries);
CPPUNIT_TEST(testTdf119029);
+ CPPUNIT_TEST(testTdf122031);
CPPUNIT_TEST_SUITE_END();
protected:
@@ -1923,6 +1925,20 @@ void Chart2ExportTest::testTdf119029()
"-5400000");
}
+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
new file mode 100644
index 000000000000..ac937a8c7a62
Binary files /dev/null and b/chart2/qa/extras/data/xlsx/tdf122031.xlsx differ
More information about the Libreoffice-commits
mailing list