diff options
author | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2015-05-08 14:52:14 +0200 |
---|---|---|
committer | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2015-05-08 14:56:42 +0200 |
commit | 13ede60a9604564339647cff6193d9343ea2fd48 (patch) | |
tree | 99f44ae5e662cddaa9e6e9d4f81a8738d006858a /chart2/qa | |
parent | 5d69cd2eabb39c9a1be6d641f3bc901c84ea3608 (diff) |
also add test for secondary axis, related tdf#75316
Change-Id: I88f46f7724296e1c58cf7604a0c514de91b5ae2a
Diffstat (limited to 'chart2/qa')
-rw-r--r-- | chart2/qa/extras/chart2import.cxx | 19 | ||||
-rw-r--r-- | chart2/qa/extras/data/xlsx/secondary_axis_title_default_rotation.xlsx | bin | 0 -> 11529 bytes |
2 files changed, 19 insertions, 0 deletions
diff --git a/chart2/qa/extras/chart2import.cxx b/chart2/qa/extras/chart2import.cxx index a25449e21091..e20a5c27c171 100644 --- a/chart2/qa/extras/chart2import.cxx +++ b/chart2/qa/extras/chart2import.cxx @@ -86,6 +86,7 @@ public: void testMinorTickMarksDefaultValue2013XLSX(); void testAxisTitleDefaultRotationXLSX(); + void testSecondaryAxisTitleDefaultRotationXLSX(); CPPUNIT_TEST_SUITE(Chart2ImportTest); CPPUNIT_TEST(Fdo60083); @@ -133,6 +134,7 @@ public: CPPUNIT_TEST(testMajorTickMarksDefaultValue2013XLSX); CPPUNIT_TEST(testMinorTickMarksDefaultValue2013XLSX); CPPUNIT_TEST(testAxisTitleDefaultRotationXLSX); + CPPUNIT_TEST(testSecondaryAxisTitleDefaultRotationXLSX); CPPUNIT_TEST_SUITE_END(); private: @@ -1042,6 +1044,23 @@ void Chart2ImportTest::testAxisTitleDefaultRotationXLSX() CPPUNIT_ASSERT_EQUAL(90.0, nRotation); } +void Chart2ImportTest::testSecondaryAxisTitleDefaultRotationXLSX() +{ + load("/chart2/qa/extras/data/xlsx/", "secondary_axis_title_default_rotation.xlsx"); + Reference<chart2::XChartDocument> xChartDoc = getChartDocFromSheet(0, mxComponent); + CPPUNIT_ASSERT_MESSAGE("failed to load chart", xChartDoc.is()); + Reference<chart2::XAxis> xYAxis = getAxisFromDoc(xChartDoc, 0, 1, 1); + CPPUNIT_ASSERT(xYAxis.is()); + Reference<chart2::XTitled> xTitled(xYAxis, uno::UNO_QUERY_THROW); + Reference<chart2::XTitle> xTitle = xTitled->getTitleObject(); + CPPUNIT_ASSERT(xTitle.is()); + Reference<beans::XPropertySet> xPropSet(xTitle, uno::UNO_QUERY_THROW); + uno::Any aAny = xPropSet->getPropertyValue("TextRotation"); + double nRotation = 0; + CPPUNIT_ASSERT(aAny >>= nRotation); + CPPUNIT_ASSERT_EQUAL(90.0, nRotation); +} + CPPUNIT_TEST_SUITE_REGISTRATION(Chart2ImportTest); CPPUNIT_PLUGIN_IMPLEMENT(); diff --git a/chart2/qa/extras/data/xlsx/secondary_axis_title_default_rotation.xlsx b/chart2/qa/extras/data/xlsx/secondary_axis_title_default_rotation.xlsx Binary files differnew file mode 100644 index 000000000000..de5d0391d2b9 --- /dev/null +++ b/chart2/qa/extras/data/xlsx/secondary_axis_title_default_rotation.xlsx |