diff options
author | Markus Mohrhard <markus.mohrhard@collabora.co.uk> | 2015-02-19 01:03:48 +0100 |
---|---|---|
committer | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2015-02-19 01:06:11 +0100 |
commit | b13534de022972131b46f93f5ada90af155eec9e (patch) | |
tree | daceb078eaf5d2465d360c989730615b24543dc7 /chart2 | |
parent | 0d1bd8c4f12d4e60d1f33f7df0a201d2affb7767 (diff) |
add test for tdf#89454
Change-Id: Iefb52f6fa77cf90955dbb47c1b9ca7ab699a43eb
Diffstat (limited to 'chart2')
-rw-r--r-- | chart2/qa/extras/chart2import.cxx | 19 | ||||
-rw-r--r-- | chart2/qa/extras/data/xlsx/axis-label-rotation.xlsx | bin | 0 -> 13698 bytes |
2 files changed, 19 insertions, 0 deletions
diff --git a/chart2/qa/extras/chart2import.cxx b/chart2/qa/extras/chart2import.cxx index 1eaa74de11de..c334713be22a 100644 --- a/chart2/qa/extras/chart2import.cxx +++ b/chart2/qa/extras/chart2import.cxx @@ -57,6 +57,7 @@ public: void testFdo54361_1(); void testAutoBackgroundXLSX(); void testChartAreaStyleBackgroundXLSX(); + void testAxisTextRotationXLSX(); // void testTextCanOverlapXLSX(); // TODO : temporarily disabled. void testNumberFormatsXLSX(); @@ -89,6 +90,7 @@ public: CPPUNIT_TEST(testFdo54361_1); CPPUNIT_TEST(testAutoBackgroundXLSX); CPPUNIT_TEST(testChartAreaStyleBackgroundXLSX); + CPPUNIT_TEST(testAxisTextRotationXLSX); // CPPUNIT_TEST(testTextCanOverlapXLSX); // TODO : temporarily disabled. CPPUNIT_TEST(testNumberFormatsXLSX); CPPUNIT_TEST_SUITE_END(); @@ -658,6 +660,23 @@ void Chart2ImportTest::testChartAreaStyleBackgroundXLSX() sal_Int32(0), nColor); } +void Chart2ImportTest::testAxisTextRotationXLSX() +{ + load("/chart2/qa/extras/data/xlsx/", "axis-label-rotation.xlsx"); + uno::Reference<chart2::XChartDocument> xChartDoc = getChartDocFromSheet(0, mxComponent); + CPPUNIT_ASSERT_MESSAGE("failed to load chart", xChartDoc.is()); + + Reference<chart2::XAxis> xYAxis = getAxisFromDoc(xChartDoc, 0, 0, 0); + CPPUNIT_ASSERT(xYAxis.is()); + + Reference<beans::XPropertySet> xPS(xYAxis, uno::UNO_QUERY_THROW); + double nRotation = 0; + bool bSuccess = xPS->getPropertyValue("TextRotation") >>= nRotation; + + CPPUNIT_ASSERT(bSuccess); + CPPUNIT_ASSERT_DOUBLES_EQUAL(90, nRotation, 1e-10); +} + /* TODO : temporarily disabled. void Chart2ImportTest::testTextCanOverlapXLSX() { diff --git a/chart2/qa/extras/data/xlsx/axis-label-rotation.xlsx b/chart2/qa/extras/data/xlsx/axis-label-rotation.xlsx Binary files differnew file mode 100644 index 000000000000..cc3b1df8a4eb --- /dev/null +++ b/chart2/qa/extras/data/xlsx/axis-label-rotation.xlsx |