diff options
author | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2015-04-30 07:59:50 +0200 |
---|---|---|
committer | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2015-04-30 08:13:21 +0200 |
commit | 1c8fb9a5a0d57c9a8a97fa3c33b8753fa034ad7b (patch) | |
tree | db71b92b0be761f244e10a75587f5c59042f1f58 /chart2 | |
parent | 08dc203cecc225b8e191ec894160516fede91a90 (diff) |
add test for majorTickMark OOXML default value
Change-Id: Ib8af3f17db019dcddca58173806ee6499b50b416
Diffstat (limited to 'chart2')
-rw-r--r-- | chart2/qa/extras/chart2import.cxx | 18 | ||||
-rw-r--r-- | chart2/qa/extras/data/xlsx/majorTickMark.xlsx | bin | 0 -> 11223 bytes |
2 files changed, 18 insertions, 0 deletions
diff --git a/chart2/qa/extras/chart2import.cxx b/chart2/qa/extras/chart2import.cxx index c69e0d3ca6f4..2784aad10f88 100644 --- a/chart2/qa/extras/chart2import.cxx +++ b/chart2/qa/extras/chart2import.cxx @@ -21,6 +21,7 @@ #include <com/sun/star/drawing/FillStyle.hpp> #include <com/sun/star/chart/XTwoAxisXSupplier.hpp> #include <com/sun/star/chart/MissingValueTreatment.hpp> +#include <com/sun/star/chart2/TickmarkStyle.hpp> #include <com/sun/star/util/Color.hpp> @@ -80,6 +81,7 @@ public: void testVaryColorDefaultValues2013XLSX(); void testPlotVisOnlyDefaultValue2013XLSX(); void testRAngAxDefaultValue2013XLSX(); + void testMajorTickMarksDefaultValue2013XLSX(); CPPUNIT_TEST_SUITE(Chart2ImportTest); CPPUNIT_TEST(Fdo60083); @@ -123,6 +125,7 @@ public: CPPUNIT_TEST(testVaryColorDefaultValues2013XLSX); CPPUNIT_TEST(testPlotVisOnlyDefaultValue2013XLSX); CPPUNIT_TEST(testRAngAxDefaultValue2013XLSX); + CPPUNIT_TEST(testMajorTickMarksDefaultValue2013XLSX); CPPUNIT_TEST_SUITE_END(); private: @@ -974,6 +977,21 @@ void Chart2ImportTest::testRAngAxDefaultValue2013XLSX() CPPUNIT_ASSERT(bRightAngleAxes); } +void Chart2ImportTest::testMajorTickMarksDefaultValue2013XLSX() +{ + load("/chart2/qa/extras/data/xlsx/", "majorTickMark.xlsx"); + Reference<chart2::XChartDocument> xChartDoc = getChartDocFromSheet(0, mxComponent); + CPPUNIT_ASSERT_MESSAGE("failed to load chart", xChartDoc.is()); + Reference<chart2::XAxis> xXAxis = getAxisFromDoc(xChartDoc, 0, 0, 0); + CPPUNIT_ASSERT(xXAxis.is()); + Reference<beans::XPropertySet> xPropSet(xXAxis, uno::UNO_QUERY_THROW); + uno::Any aAny = xPropSet->getPropertyValue("MajorTickmarks"); + sal_Int32 nMajorTickmarks = chart2::TickmarkStyle::NONE; + CPPUNIT_ASSERT(aAny.hasValue()); + CPPUNIT_ASSERT(aAny >>= nMajorTickmarks); + CPPUNIT_ASSERT_EQUAL(chart2::TickmarkStyle::INNER | chart2::TickmarkStyle::OUTER, nMajorTickmarks); +} + CPPUNIT_TEST_SUITE_REGISTRATION(Chart2ImportTest); CPPUNIT_PLUGIN_IMPLEMENT(); diff --git a/chart2/qa/extras/data/xlsx/majorTickMark.xlsx b/chart2/qa/extras/data/xlsx/majorTickMark.xlsx Binary files differnew file mode 100644 index 000000000000..2b6cdcfb36b1 --- /dev/null +++ b/chart2/qa/extras/data/xlsx/majorTickMark.xlsx |