summaryrefslogtreecommitdiff
path: root/chart2/qa/extras/chart2import.cxx
diff options
context:
space:
mode:
authorMarkus Mohrhard <markus.mohrhard@googlemail.com>2015-05-08 14:39:30 +0200
committerMarkus Mohrhard <markus.mohrhard@googlemail.com>2015-05-08 14:56:42 +0200
commit5d69cd2eabb39c9a1be6d641f3bc901c84ea3608 (patch)
treefdbf9bd3a6d0c278826f3e2cb1937ce4cf4dc55b /chart2/qa/extras/chart2import.cxx
parent28ca767e57e00990428b804154bf15b940c63bd1 (diff)
add test for tdf#75316
Change-Id: Ic9f20c90e54f53484d67c1c38530dbac9638cbfe
Diffstat (limited to 'chart2/qa/extras/chart2import.cxx')
-rw-r--r--chart2/qa/extras/chart2import.cxx20
1 files changed, 20 insertions, 0 deletions
diff --git a/chart2/qa/extras/chart2import.cxx b/chart2/qa/extras/chart2import.cxx
index f7c7799d0e09..a25449e21091 100644
--- a/chart2/qa/extras/chart2import.cxx
+++ b/chart2/qa/extras/chart2import.cxx
@@ -85,6 +85,8 @@ public:
void testMajorTickMarksDefaultValue2013XLSX();
void testMinorTickMarksDefaultValue2013XLSX();
+ void testAxisTitleDefaultRotationXLSX();
+
CPPUNIT_TEST_SUITE(Chart2ImportTest);
CPPUNIT_TEST(Fdo60083);
CPPUNIT_TEST(testSteppedLines);
@@ -130,6 +132,7 @@ public:
CPPUNIT_TEST(testRAngAxDefaultValue2013XLSX);
CPPUNIT_TEST(testMajorTickMarksDefaultValue2013XLSX);
CPPUNIT_TEST(testMinorTickMarksDefaultValue2013XLSX);
+ CPPUNIT_TEST(testAxisTitleDefaultRotationXLSX);
CPPUNIT_TEST_SUITE_END();
private:
@@ -1022,6 +1025,23 @@ void Chart2ImportTest::testMinorTickMarksDefaultValue2013XLSX()
CPPUNIT_ASSERT_EQUAL(chart2::TickmarkStyle::INNER | chart2::TickmarkStyle::OUTER, nMajorTickmarks);
}
+void Chart2ImportTest::testAxisTitleDefaultRotationXLSX()
+{
+ load("/chart2/qa/extras/data/xlsx/", "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, 0);
+ 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();