[Libreoffice-commits] core.git: chart2/qa

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Thu Nov 29 02:33:00 UTC 2018


 chart2/qa/extras/chart2import.cxx                       |   14 ++++++++++++++
 chart2/qa/extras/data/xls/source_number_format_axis.xls |binary
 2 files changed, 14 insertions(+)

New commits:
commit 92c25a6163dca79987fd8fe7c3efd5527edc29b5
Author:     Markus Mohrhard <markus.mohrhard at googlemail.com>
AuthorDate: Thu Nov 29 01:53:12 2018 +0100
Commit:     Markus Mohrhard <markus.mohrhard at googlemail.com>
CommitDate: Thu Nov 29 03:32:31 2018 +0100

    add test for tdf#105236
    
    Change-Id: I5464504ae9ee411221c2cb2ff6f27b7b7e131326
    Reviewed-on: https://gerrit.libreoffice.org/64201
    Tested-by: Jenkins
    Reviewed-by: Markus Mohrhard <markus.mohrhard at googlemail.com>

diff --git a/chart2/qa/extras/chart2import.cxx b/chart2/qa/extras/chart2import.cxx
index d0a5c344a1e6..64e343c6d639 100644
--- a/chart2/qa/extras/chart2import.cxx
+++ b/chart2/qa/extras/chart2import.cxx
@@ -118,6 +118,7 @@ public:
     void testDeletedDataLabel();
     void testDataPointInheritedColorDOCX();
     void testExternalStrRefsXLSX();
+    void testSourceNumberFormatComplexCategoriesXLS();
 
     CPPUNIT_TEST_SUITE(Chart2ImportTest);
     CPPUNIT_TEST(Fdo60083);
@@ -190,6 +191,7 @@ public:
     CPPUNIT_TEST(testDeletedDataLabel);
     CPPUNIT_TEST(testDataPointInheritedColorDOCX);
     CPPUNIT_TEST(testExternalStrRefsXLSX);
+    CPPUNIT_TEST(testSourceNumberFormatComplexCategoriesXLS);
 
     CPPUNIT_TEST_SUITE_END();
 
@@ -1700,6 +1702,18 @@ void Chart2ImportTest::testExternalStrRefsXLSX()
     CPPUNIT_ASSERT_EQUAL(OUString("test2"), aValues[1].get<OUString>());
 }
 
+void Chart2ImportTest::testSourceNumberFormatComplexCategoriesXLS()
+{
+    load("/chart2/qa/extras/data/xls/", "source_number_format_axis.xls");
+    uno::Reference< chart2::XChartDocument > xChartDoc( getChartCompFromSheet( 0, mxComponent ), UNO_QUERY_THROW );
+    CPPUNIT_ASSERT(xChartDoc.is());
+
+    Reference<chart2::XAxis> xAxis = getAxisFromDoc(xChartDoc, 0, 0, 0);
+    chart2::ScaleData aScaleData = xAxis->getScaleData();
+    sal_Int32 nNumberFormat =  aScaleData.Categories->getValues()->getNumberFormatKeyByIndex(-1);
+    CPPUNIT_ASSERT(nNumberFormat != 0);
+}
+
 CPPUNIT_TEST_SUITE_REGISTRATION(Chart2ImportTest);
 
 CPPUNIT_PLUGIN_IMPLEMENT();
diff --git a/chart2/qa/extras/data/xls/source_number_format_axis.xls b/chart2/qa/extras/data/xls/source_number_format_axis.xls
new file mode 100644
index 000000000000..bc54593ac150
Binary files /dev/null and b/chart2/qa/extras/data/xls/source_number_format_axis.xls differ


More information about the Libreoffice-commits mailing list