diff options
author | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2018-11-29 01:53:12 +0100 |
---|---|---|
committer | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2018-11-29 03:32:31 +0100 |
commit | 92c25a6163dca79987fd8fe7c3efd5527edc29b5 (patch) | |
tree | 71965a2f6dfaaf3ede30e0743bee48bce61eb236 /chart2/qa | |
parent | fb04e7180cdf656dbbd3daa9c81615d9478229e0 (diff) |
add test for tdf#105236
Change-Id: I5464504ae9ee411221c2cb2ff6f27b7b7e131326
Reviewed-on: https://gerrit.libreoffice.org/64201
Tested-by: Jenkins
Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
Diffstat (limited to 'chart2/qa')
-rw-r--r-- | chart2/qa/extras/chart2import.cxx | 14 | ||||
-rw-r--r-- | chart2/qa/extras/data/xls/source_number_format_axis.xls | bin | 0 -> 7168 bytes |
2 files changed, 14 insertions, 0 deletions
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 Binary files differnew file mode 100644 index 000000000000..bc54593ac150 --- /dev/null +++ b/chart2/qa/extras/data/xls/source_number_format_axis.xls |