diff options
author | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2015-04-20 06:52:23 +0200 |
---|---|---|
committer | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2015-04-21 06:44:28 +0200 |
commit | 0d1f5324a7fb094bdfa71166bf0b55b47511713e (patch) | |
tree | 3fdfbadb042da4e67f33b60486aa4e301cf92df3 /chart2/qa/extras | |
parent | 3df94a9272260cd839f6aec69d9f4914fc1ba565 (diff) |
add smoothed line default value import test
Change-Id: I67f6c6e433402ba610f39b7fa4ee50a8cb5295fe
Diffstat (limited to 'chart2/qa/extras')
-rw-r--r-- | chart2/qa/extras/chart2import.cxx | 41 | ||||
-rw-r--r-- | chart2/qa/extras/data/xlsx/smoothed_series.xlsx | bin | 0 -> 12836 bytes | |||
-rw-r--r-- | chart2/qa/extras/data/xlsx/smoothed_series2007.xlsx | bin | 0 -> 12351 bytes |
3 files changed, 41 insertions, 0 deletions
diff --git a/chart2/qa/extras/chart2import.cxx b/chart2/qa/extras/chart2import.cxx index 686f8084af74..6f5a8f4e8c8d 100644 --- a/chart2/qa/extras/chart2import.cxx +++ b/chart2/qa/extras/chart2import.cxx @@ -71,6 +71,9 @@ public: void testDispBlanksAsDefaultValue2007XLSX(); void testDispBlanksAsDefaultValue2013XLSX(); + void testSmoothDefaultValue2007XLSX(); + void testSmoothDefaultValue2013XLSX(); + CPPUNIT_TEST_SUITE(Chart2ImportTest); CPPUNIT_TEST(Fdo60083); CPPUNIT_TEST(testSteppedLines); @@ -105,6 +108,8 @@ public: CPPUNIT_TEST(testAutoTitleDelDefaultValue2013XLSX); CPPUNIT_TEST(testDispBlanksAsDefaultValue2007XLSX); CPPUNIT_TEST(testDispBlanksAsDefaultValue2013XLSX); + CPPUNIT_TEST(testSmoothDefaultValue2007XLSX); + CPPUNIT_TEST(testSmoothDefaultValue2013XLSX); CPPUNIT_TEST_SUITE_END(); private: @@ -812,6 +817,42 @@ void Chart2ImportTest::testDispBlanksAsDefaultValue2013XLSX() CPPUNIT_ASSERT_EQUAL(chart::MissingValueTreatment::USE_ZERO, nMissingValueTreatment); } +void Chart2ImportTest::testSmoothDefaultValue2007XLSX() +{ + load("/chart2/qa/extras/data/xlsx/", "smoothed_series2007.xlsx"); + Reference<chart2::XChartDocument> xChartDoc = getChartDocFromSheet(0, mxComponent); + CPPUNIT_ASSERT_MESSAGE("failed to load chart", xChartDoc.is()); + CPPUNIT_ASSERT(xChartDoc.is()); + + Reference< chart2::XChartType > xChartType = getChartTypeFromDoc( xChartDoc, 0 ); + CPPUNIT_ASSERT(xChartType.is()); + + Reference< beans::XPropertySet > xPropSet( xChartType, UNO_QUERY ); + CPPUNIT_ASSERT(xPropSet.is()); + + chart2::CurveStyle eCurveStyle; + xPropSet->getPropertyValue("CurveStyle") >>= eCurveStyle; + CPPUNIT_ASSERT_EQUAL(eCurveStyle, chart2::CurveStyle_LINES); +} + +void Chart2ImportTest::testSmoothDefaultValue2013XLSX() +{ + load("/chart2/qa/extras/data/xlsx/", "smoothed_series.xlsx"); + Reference<chart2::XChartDocument> xChartDoc = getChartDocFromSheet(0, mxComponent); + CPPUNIT_ASSERT_MESSAGE("failed to load chart", xChartDoc.is()); + CPPUNIT_ASSERT(xChartDoc.is()); + + Reference< chart2::XChartType > xChartType = getChartTypeFromDoc( xChartDoc, 0 ); + CPPUNIT_ASSERT(xChartType.is()); + + Reference< beans::XPropertySet > xPropSet( xChartType, UNO_QUERY ); + CPPUNIT_ASSERT(xPropSet.is()); + + chart2::CurveStyle eCurveStyle; + xPropSet->getPropertyValue("CurveStyle") >>= eCurveStyle; + CPPUNIT_ASSERT(eCurveStyle != chart2::CurveStyle_LINES); +} + CPPUNIT_TEST_SUITE_REGISTRATION(Chart2ImportTest); CPPUNIT_PLUGIN_IMPLEMENT(); diff --git a/chart2/qa/extras/data/xlsx/smoothed_series.xlsx b/chart2/qa/extras/data/xlsx/smoothed_series.xlsx Binary files differnew file mode 100644 index 000000000000..bab00ce1395d --- /dev/null +++ b/chart2/qa/extras/data/xlsx/smoothed_series.xlsx diff --git a/chart2/qa/extras/data/xlsx/smoothed_series2007.xlsx b/chart2/qa/extras/data/xlsx/smoothed_series2007.xlsx Binary files differnew file mode 100644 index 000000000000..3c8f0cc46081 --- /dev/null +++ b/chart2/qa/extras/data/xlsx/smoothed_series2007.xlsx |