Kaydet (Commit) 13ede60a authored tarafından Markus Mohrhard's avatar Markus Mohrhard

also add test for secondary axis, related tdf#75316

Change-Id: I88f46f7724296e1c58cf7604a0c514de91b5ae2a
üst 5d69cd2e
......@@ -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();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment