[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.2' - chart2/qa

Gülşah Köse (via logerrit) logerrit at kemper.freedesktop.org
Mon Sep 16 19:22:52 UTC 2019


 chart2/qa/extras/chart2export.cxx         |   16 ++++++++++++++++
 chart2/qa/extras/data/xlsx/tdf122031.xlsx |binary
 2 files changed, 16 insertions(+)

New commits:
commit 4337a257c769f223e1b1da3b709a12bca1fc20f6
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: Mon Sep 16 21:22:20 2019 +0200

    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
    Reviewed-on: https://gerrit.libreoffice.org/78993
    Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice at gmail.com>
    Reviewed-by: Andras Timar <andras.timar at collabora.com>

diff --git a/chart2/qa/extras/chart2export.cxx b/chart2/qa/extras/chart2export.cxx
index 3d502039d5b1..77bc24a7ac46 100644
--- a/chart2/qa/extras/chart2export.cxx
+++ b/chart2/qa/extras/chart2export.cxx
@@ -126,6 +126,7 @@ public:
     void testTdf116163();
     void testTdf119029();
     void testTdf121744();
+    void testTdf122031();
 
     CPPUNIT_TEST_SUITE(Chart2ExportTest);
     CPPUNIT_TEST(testErrorBarXLSX);
@@ -214,6 +215,7 @@ public:
     CPPUNIT_TEST(testTdf116163);
     CPPUNIT_TEST(testTdf119029);
     CPPUNIT_TEST(testTdf121744);
+    CPPUNIT_TEST(testTdf122031);
     CPPUNIT_TEST_SUITE_END();
 
 protected:
@@ -2006,6 +2008,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
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