summaryrefslogtreecommitdiff
path: root/chart2
diff options
context:
space:
mode:
authorMarkus Mohrhard <markus.mohrhard@googlemail.com>2018-11-19 00:11:54 +0100
committerMarkus Mohrhard <markus.mohrhard@googlemail.com>2018-11-19 02:12:26 +0100
commitd71ea82055a6a304493c7eaa90809a348e23784d (patch)
tree47cfcd95b79a35ce994d69954639821c1cd4cc51 /chart2
parentafe5e1f8de0a25364c8c98b453cfe831330c4eed (diff)
add test for tdf#104579
Change-Id: I62112a2aa0eac6aaa78fdadabfc4439f2a66e6df Reviewed-on: https://gerrit.libreoffice.org/63542 Tested-by: Jenkins Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
Diffstat (limited to 'chart2')
-rw-r--r--chart2/qa/extras/chart2import.cxx16
-rw-r--r--chart2/qa/extras/data/docx/data_point_inherited_color.docxbin0 -> 5426 bytes
2 files changed, 16 insertions, 0 deletions
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
--- /dev/null
+++ b/chart2/qa/extras/data/docx/data_point_inherited_color.docx
Binary files differ