[Libreoffice-commits] core.git: chart2/qa
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Tue Nov 27 03:10:36 UTC 2018
chart2/qa/extras/chart2import.cxx | 15 +++++++++++++++
chart2/qa/extras/data/xlsx/external_str_ref.xlsx |binary
2 files changed, 15 insertions(+)
New commits:
commit 3f2b8db38c8823d9980d43dd6eec9d3150cc5405
Author: Markus Mohrhard <markus.mohrhard at googlemail.com>
AuthorDate: Mon Nov 26 23:25:57 2018 +0100
Commit: Markus Mohrhard <markus.mohrhard at googlemail.com>
CommitDate: Tue Nov 27 04:10:13 2018 +0100
add test for tdf#108027
Change-Id: I1048d86bf11b4fdd4a5c90f6e98276893b8ffbf4
Reviewed-on: https://gerrit.libreoffice.org/64078
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 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
new file mode 100644
index 000000000000..f2dde80e1fb5
Binary files /dev/null and b/chart2/qa/extras/data/xlsx/external_str_ref.xlsx differ
More information about the Libreoffice-commits
mailing list