Kaydet (Commit) d71ea820 authored tarafından Markus Mohrhard's avatar Markus Mohrhard

add test for tdf#104579

Change-Id: I62112a2aa0eac6aaa78fdadabfc4439f2a66e6df
Reviewed-on: https://gerrit.libreoffice.org/63542
Tested-by: Jenkins
Reviewed-by: 's avatarMarkus Mohrhard <markus.mohrhard@googlemail.com>
üst afe5e1f8
......@@ -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();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment