[Libreoffice-commits] core.git: chart2/qa
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Mon Nov 19 01:12:48 UTC 2018
chart2/qa/extras/chart2import.cxx | 16 +++++++++++++
chart2/qa/extras/data/docx/data_point_inherited_color.docx |binary
2 files changed, 16 insertions(+)
New commits:
commit d71ea82055a6a304493c7eaa90809a348e23784d
Author: Markus Mohrhard <markus.mohrhard at googlemail.com>
AuthorDate: Mon Nov 19 00:11:54 2018 +0100
Commit: Markus Mohrhard <markus.mohrhard at googlemail.com>
CommitDate: Mon Nov 19 02:12:26 2018 +0100
add test for tdf#104579
Change-Id: I62112a2aa0eac6aaa78fdadabfc4439f2a66e6df
Reviewed-on: https://gerrit.libreoffice.org/63542
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 661d0d801b87..d0906b1c9164 100644
--- a/chart2/qa/extras/chart2import.cxx
+++ b/chart2/qa/extras/chart2import.cxx
@@ -116,6 +116,7 @@ public:
void testTdf114179();
void testDeletedDataLabel();
+ void testDataPointInheritedColorDOCX();
CPPUNIT_TEST_SUITE(Chart2ImportTest);
CPPUNIT_TEST(Fdo60083);
@@ -186,6 +187,7 @@ public:
CPPUNIT_TEST(testTdf114179);
CPPUNIT_TEST(testDeletedDataLabel);
+ CPPUNIT_TEST(testDataPointInheritedColorDOCX);
CPPUNIT_TEST_SUITE_END();
@@ -1669,6 +1671,20 @@ void Chart2ImportTest::testDeletedDataLabel()
checkDataLabelProperties(xDataSeries1, 2, false);
}
+void Chart2ImportTest::testDataPointInheritedColorDOCX()
+{
+ load( "/chart2/qa/extras/data/docx/", "data_point_inherited_color.docx" );
+ uno::Reference< chart2::XChartDocument > xChartDoc ( getChartDocFromWriter(0), uno::UNO_QUERY);
+ CPPUNIT_ASSERT( xChartDoc.is() );
+ css::uno::Reference<chart2::XDiagram> xDiagram(xChartDoc->getFirstDiagram(), UNO_QUERY_THROW);
+
+ Reference<chart2::XDataSeries> xDataSeries = getDataSeriesFromDoc(xChartDoc, 0);
+ uno::Reference<beans::XPropertySet> xPropertySet(xDataSeries->getDataPointByIndex(0), uno::UNO_QUERY_THROW);
+ CPPUNIT_ASSERT(xPropertySet.is());
+ sal_Int32 nColor = xPropertySet->getPropertyValue("FillColor").get<sal_Int32>();
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(16776960), nColor);
+}
+
CPPUNIT_TEST_SUITE_REGISTRATION(Chart2ImportTest);
CPPUNIT_PLUGIN_IMPLEMENT();
diff --git a/chart2/qa/extras/data/docx/data_point_inherited_color.docx b/chart2/qa/extras/data/docx/data_point_inherited_color.docx
new file mode 100644
index 000000000000..70de8b218866
Binary files /dev/null and b/chart2/qa/extras/data/docx/data_point_inherited_color.docx differ
More information about the Libreoffice-commits
mailing list