summaryrefslogtreecommitdiff
path: root/chart2/qa/extras/chart2import.cxx
diff options
context:
space:
mode:
authorMarkus Mohrhard <markus.mohrhard@googlemail.com>2015-04-21 03:22:57 +0200
committerMarkus Mohrhard <markus.mohrhard@googlemail.com>2015-04-21 06:44:32 +0200
commit0791b8f1d35f2795ff87e21d04395b3ec8bd831d (patch)
tree2b89c247c7d91f7fcd912ea71795c4635b90f86d /chart2/qa/extras/chart2import.cxx
parente001998cb11ce865f2ea8925a058245a04d9e701 (diff)
add test case for VaryColor default values
Change-Id: Iaf8012d573044dad21d1008e3a6d583625e6f386
Diffstat (limited to 'chart2/qa/extras/chart2import.cxx')
-rw-r--r--chart2/qa/extras/chart2import.cxx34
1 files changed, 34 insertions, 0 deletions
diff --git a/chart2/qa/extras/chart2import.cxx b/chart2/qa/extras/chart2import.cxx
index 534f9824ad53..71588c1f0778 100644
--- a/chart2/qa/extras/chart2import.cxx
+++ b/chart2/qa/extras/chart2import.cxx
@@ -76,6 +76,8 @@ public:
void testSmoothDefaultValue2013XLSX();
void testTrendlineDefaultValue2007XLSX();
void testTrendlineDefaultValue2013XLSX();
+ void testVaryColorDefaultValues2007XLSX();
+ void testVaryColorDefaultValues2013XLSX();
CPPUNIT_TEST_SUITE(Chart2ImportTest);
CPPUNIT_TEST(Fdo60083);
@@ -115,6 +117,8 @@ public:
CPPUNIT_TEST(testSmoothDefaultValue2013XLSX);
CPPUNIT_TEST(testTrendlineDefaultValue2007XLSX);
CPPUNIT_TEST(testTrendlineDefaultValue2013XLSX);
+ CPPUNIT_TEST(testVaryColorDefaultValues2007XLSX);
+ CPPUNIT_TEST(testVaryColorDefaultValues2013XLSX);
CPPUNIT_TEST_SUITE_END();
private:
@@ -910,6 +914,36 @@ void Chart2ImportTest::testTrendlineDefaultValue2013XLSX()
CPPUNIT_ASSERT(bShowCorrelation);
}
+void Chart2ImportTest::testVaryColorDefaultValues2007XLSX()
+{
+ load("/chart2/qa/extras/data/xlsx/", "vary_color2007.xlsx");
+ Reference<chart2::XChartDocument> xChartDoc = getChartDocFromSheet(0, mxComponent);
+ CPPUNIT_ASSERT_MESSAGE("failed to load chart", xChartDoc.is());
+ CPPUNIT_ASSERT(xChartDoc.is());
+ Reference<chart2::XDataSeries> xDataSeries = getDataSeriesFromDoc(xChartDoc, 0);
+ CPPUNIT_ASSERT(xDataSeries.is());
+ Reference<beans::XPropertySet> xPropSet(xDataSeries, uno::UNO_QUERY_THROW);
+ uno::Any aAny = xPropSet->getPropertyValue("VaryColorsByPoint");
+ bool bVaryColor = true;
+ CPPUNIT_ASSERT(aAny >>= bVaryColor);
+ CPPUNIT_ASSERT(!bVaryColor);
+}
+
+void Chart2ImportTest::testVaryColorDefaultValues2013XLSX()
+{
+ load("/chart2/qa/extras/data/xlsx/", "vary_color.xlsx");
+ Reference<chart2::XChartDocument> xChartDoc = getChartDocFromSheet(0, mxComponent);
+ CPPUNIT_ASSERT_MESSAGE("failed to load chart", xChartDoc.is());
+ CPPUNIT_ASSERT(xChartDoc.is());
+ Reference<chart2::XDataSeries> xDataSeries = getDataSeriesFromDoc(xChartDoc, 0);
+ CPPUNIT_ASSERT(xDataSeries.is());
+ Reference<beans::XPropertySet> xPropSet(xDataSeries, uno::UNO_QUERY_THROW);
+ uno::Any aAny = xPropSet->getPropertyValue("VaryColorsByPoint");
+ bool bVaryColor = false;
+ CPPUNIT_ASSERT(aAny >>= bVaryColor);
+ CPPUNIT_ASSERT(bVaryColor);
+}
+
CPPUNIT_TEST_SUITE_REGISTRATION(Chart2ImportTest);
CPPUNIT_PLUGIN_IMPLEMENT();