diff options
author | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2018-11-26 23:25:57 +0100 |
---|---|---|
committer | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2018-11-27 04:10:13 +0100 |
commit | 3f2b8db38c8823d9980d43dd6eec9d3150cc5405 (patch) | |
tree | e8a72ae08432ec3aa3bca1da39f0acbb19c6d71c /chart2/qa/extras | |
parent | f21d2b48bd68424a96aa6cd5572e368208378291 (diff) |
add test for tdf#108027
Change-Id: I1048d86bf11b4fdd4a5c90f6e98276893b8ffbf4
Reviewed-on: https://gerrit.libreoffice.org/64078
Tested-by: Jenkins
Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
Diffstat (limited to 'chart2/qa/extras')
-rw-r--r-- | chart2/qa/extras/chart2import.cxx | 15 | ||||
-rw-r--r-- | chart2/qa/extras/data/xlsx/external_str_ref.xlsx | bin | 0 -> 23847 bytes |
2 files changed, 15 insertions, 0 deletions
diff --git a/chart2/qa/extras/chart2import.cxx b/chart2/qa/extras/chart2import.cxx index e76090acd83d..d0a5c344a1e6 100644 --- a/chart2/qa/extras/chart2import.cxx +++ b/chart2/qa/extras/chart2import.cxx @@ -117,6 +117,7 @@ public: void testTdf114179(); void testDeletedDataLabel(); void testDataPointInheritedColorDOCX(); + void testExternalStrRefsXLSX(); CPPUNIT_TEST_SUITE(Chart2ImportTest); CPPUNIT_TEST(Fdo60083); @@ -188,6 +189,7 @@ public: CPPUNIT_TEST(testTdf114179); CPPUNIT_TEST(testDeletedDataLabel); CPPUNIT_TEST(testDataPointInheritedColorDOCX); + CPPUNIT_TEST(testExternalStrRefsXLSX); CPPUNIT_TEST_SUITE_END(); @@ -1685,6 +1687,19 @@ void Chart2ImportTest::testDataPointInheritedColorDOCX() CPPUNIT_ASSERT_EQUAL(sal_Int32(16776960), nColor); } +void Chart2ImportTest::testExternalStrRefsXLSX() +{ + load("/chart2/qa/extras/data/xlsx/", "external_str_ref.xlsx"); + 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(); + css::uno::Sequence<css::uno::Any> aValues = aScaleData.Categories->getValues()->getData(); + CPPUNIT_ASSERT_EQUAL(OUString("test1"), aValues[0].get<OUString>()); + CPPUNIT_ASSERT_EQUAL(OUString("test2"), aValues[1].get<OUString>()); +} + CPPUNIT_TEST_SUITE_REGISTRATION(Chart2ImportTest); CPPUNIT_PLUGIN_IMPLEMENT(); diff --git a/chart2/qa/extras/data/xlsx/external_str_ref.xlsx b/chart2/qa/extras/data/xlsx/external_str_ref.xlsx Binary files differnew file mode 100644 index 000000000000..f2dde80e1fb5 --- /dev/null +++ b/chart2/qa/extras/data/xlsx/external_str_ref.xlsx |