summaryrefslogtreecommitdiff
path: root/chart2/qa/extras/chart2import.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'chart2/qa/extras/chart2import.cxx')
-rw-r--r--chart2/qa/extras/chart2import.cxx19
1 files changed, 19 insertions, 0 deletions
diff --git a/chart2/qa/extras/chart2import.cxx b/chart2/qa/extras/chart2import.cxx
index 2a684ed1ae1f..f0ab60648040 100644
--- a/chart2/qa/extras/chart2import.cxx
+++ b/chart2/qa/extras/chart2import.cxx
@@ -36,6 +36,7 @@ public:
void testPPTChartSeries();
void testODPChartSeries();
void testChartAreaStyleBackgroundXLSX();
+ void testAxisTextRotationXLSX();
void testNumberFormatsXLSX();
CPPUNIT_TEST_SUITE(Chart2ImportTest);
@@ -58,6 +59,7 @@ public:
// CPPUNIT_TEST(testPPTXChartSeries);
// CPPUNIT_TEST(testODPChartSeries);
CPPUNIT_TEST(testChartAreaStyleBackgroundXLSX);
+ CPPUNIT_TEST(testAxisTextRotationXLSX);
CPPUNIT_TEST(testNumberFormatsXLSX);
CPPUNIT_TEST_SUITE_END();
@@ -317,6 +319,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);
+}
+
void Chart2ImportTest::testNumberFormatsXLSX()
{