summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarkus Mohrhard <markus.mohrhard@googlemail.com>2015-04-30 08:08:27 +0200
committerMarkus Mohrhard <markus.mohrhard@googlemail.com>2015-04-30 08:13:22 +0200
commit629ed90f7146d5a6b0de6211a916d615dea642aa (patch)
tree6daaa898447c9263d5dbc69132236df703159cd6
parent1c8fb9a5a0d57c9a8a97fa3c33b8753fa034ad7b (diff)
add test for minorTickMark OOXML default value
Change-Id: Id1a4dcbc25b78afe123d529413ac8873b6452d2e
-rw-r--r--chart2/qa/extras/chart2import.cxx17
-rw-r--r--chart2/qa/extras/data/xlsx/minorTickMark.xlsxbin0 -> 11256 bytes
2 files changed, 17 insertions, 0 deletions
diff --git a/chart2/qa/extras/chart2import.cxx b/chart2/qa/extras/chart2import.cxx
index 2784aad10f88..445edf364401 100644
--- a/chart2/qa/extras/chart2import.cxx
+++ b/chart2/qa/extras/chart2import.cxx
@@ -82,6 +82,7 @@ public:
void testPlotVisOnlyDefaultValue2013XLSX();
void testRAngAxDefaultValue2013XLSX();
void testMajorTickMarksDefaultValue2013XLSX();
+ void testMinorTickMarksDefaultValue2013XLSX();
CPPUNIT_TEST_SUITE(Chart2ImportTest);
CPPUNIT_TEST(Fdo60083);
@@ -126,6 +127,7 @@ public:
CPPUNIT_TEST(testPlotVisOnlyDefaultValue2013XLSX);
CPPUNIT_TEST(testRAngAxDefaultValue2013XLSX);
CPPUNIT_TEST(testMajorTickMarksDefaultValue2013XLSX);
+ CPPUNIT_TEST(testMinorTickMarksDefaultValue2013XLSX);
CPPUNIT_TEST_SUITE_END();
private:
@@ -992,6 +994,21 @@ void Chart2ImportTest::testMajorTickMarksDefaultValue2013XLSX()
CPPUNIT_ASSERT_EQUAL(chart2::TickmarkStyle::INNER | chart2::TickmarkStyle::OUTER, nMajorTickmarks);
}
+void Chart2ImportTest::testMinorTickMarksDefaultValue2013XLSX()
+{
+ load("/chart2/qa/extras/data/xlsx/", "minorTickMark.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("MinorTickmarks");
+ 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/minorTickMark.xlsx b/chart2/qa/extras/data/xlsx/minorTickMark.xlsx
new file mode 100644
index 000000000000..2d687924747a
--- /dev/null
+++ b/chart2/qa/extras/data/xlsx/minorTickMark.xlsx
Binary files differ