diff options
author | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2015-04-25 01:54:07 +0200 |
---|---|---|
committer | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2015-04-25 02:17:47 +0200 |
commit | af46ffafb73ff305e53be8768033d69ca9e6e5e1 (patch) | |
tree | 4096ccca5d00cd1238ccd479e54ad4baf2f0d0ac /chart2/qa | |
parent | d55cb0845a094601dcc0149e9a59e360021d231c (diff) |
add test for tdf#75015
Change-Id: Idb1cbb9bf016d102705089b44486810affe7e3b0
Diffstat (limited to 'chart2/qa')
-rw-r--r-- | chart2/qa/extras/chart2export.cxx | 20 | ||||
-rw-r--r-- | chart2/qa/extras/data/xlsx/title_manual_layout.xlsx | bin | 0 -> 13160 bytes |
2 files changed, 20 insertions, 0 deletions
diff --git a/chart2/qa/extras/chart2export.cxx b/chart2/qa/extras/chart2export.cxx index 87b7032a97de..fcc91a2e6354 100644 --- a/chart2/qa/extras/chart2export.cxx +++ b/chart2/qa/extras/chart2export.cxx @@ -90,6 +90,7 @@ public: void testInvertIfNegativeXLSX(); void testBubble3DXLSX(); void testNoMarkerXLSX(); + void testTitleManualLayoutXLSX(); CPPUNIT_TEST_SUITE(Chart2ExportTest); CPPUNIT_TEST(testErrorBarXLSX); @@ -144,6 +145,7 @@ public: CPPUNIT_TEST(testInvertIfNegativeXLSX); CPPUNIT_TEST(testBubble3DXLSX); CPPUNIT_TEST(testNoMarkerXLSX); + CPPUNIT_TEST(testTitleManualLayoutXLSX); CPPUNIT_TEST_SUITE_END(); protected: @@ -1316,6 +1318,24 @@ void Chart2ExportTest::testNoMarkerXLSX() assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:lineChart/c:marker", "val", "0"); } +void Chart2ExportTest::testTitleManualLayoutXLSX() +{ + load("/chart2/qa/extras/data/xlsx/", "title_manual_layout.xlsx"); + xmlDocPtr pXmlDoc = parseExport("xl/charts/chart", "Calc Office Open XML"); + CPPUNIT_ASSERT(pXmlDoc); + assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:layout/c:manualLayout/c:xMode", "val", "edge"); + assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:layout/c:manualLayout/c:yMode", "val", "edge"); + + OUString aXVal = getXPath(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:layout/c:manualLayout/c:x", "val"); + double nX = aXVal.toDouble(); + CPPUNIT_ASSERT(nX > 0 && nX < 1); + + OUString aYVal = getXPath(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:layout/c:manualLayout/c:y", "val"); + double nY = aYVal.toDouble(); + CPPUNIT_ASSERT(nY > 0 && nY < 1); + CPPUNIT_ASSERT(nX != nY); +} + CPPUNIT_TEST_SUITE_REGISTRATION(Chart2ExportTest); CPPUNIT_PLUGIN_IMPLEMENT(); diff --git a/chart2/qa/extras/data/xlsx/title_manual_layout.xlsx b/chart2/qa/extras/data/xlsx/title_manual_layout.xlsx Binary files differnew file mode 100644 index 000000000000..c89b2af4dc62 --- /dev/null +++ b/chart2/qa/extras/data/xlsx/title_manual_layout.xlsx |