diff options
author | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2015-04-27 06:28:52 +0200 |
---|---|---|
committer | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2015-04-27 06:26:18 +0200 |
commit | ea4e3d6970aaa2ff567c027bf3b5a6902c9dabed (patch) | |
tree | eb3308460e21c7205501964f691bc79d3e3a4023 /chart2/qa/extras | |
parent | e7232574e2050fea57b06cf1e87177bc419974da (diff) |
add test for axis character properties, tdf#90532
Change-Id: Ica4dc4c621d722bdad1d3c47c2e5389c8a6b8d04
Diffstat (limited to 'chart2/qa/extras')
-rw-r--r-- | chart2/qa/extras/chart2export.cxx | 19 | ||||
-rw-r--r-- | chart2/qa/extras/data/xlsx/axis_character_properties.xlsx | bin | 0 -> 10381 bytes |
2 files changed, 19 insertions, 0 deletions
diff --git a/chart2/qa/extras/chart2export.cxx b/chart2/qa/extras/chart2export.cxx index f087463cac6c..f31d0bfb387f 100644 --- a/chart2/qa/extras/chart2export.cxx +++ b/chart2/qa/extras/chart2export.cxx @@ -93,6 +93,7 @@ public: void testTitleManualLayoutXLSX(); void testPlotAreaManualLayoutXLSX(); void testLegendManualLayoutXLSX(); + void testAxisCharacterPropertiesXLSX(); CPPUNIT_TEST_SUITE(Chart2ExportTest); CPPUNIT_TEST(testErrorBarXLSX); @@ -150,6 +151,7 @@ public: CPPUNIT_TEST(testTitleManualLayoutXLSX); CPPUNIT_TEST(testPlotAreaManualLayoutXLSX); CPPUNIT_TEST(testLegendManualLayoutXLSX); + CPPUNIT_TEST(testAxisCharacterPropertiesXLSX); CPPUNIT_TEST_SUITE_END(); protected: @@ -1389,6 +1391,23 @@ void Chart2ExportTest::testLegendManualLayoutXLSX() CPPUNIT_ASSERT(nX != nY); } +void Chart2ExportTest::testAxisCharacterPropertiesXLSX() +{ + load("/chart2/qa/extras/data/xlsx/", "axis_character_properties.xlsx"); + xmlDocPtr pXmlDoc = parseExport("xl/charts/chart", "Calc Office Open XML"); + CPPUNIT_ASSERT(pXmlDoc); + + assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:catAx/c:txPr/a:p/a:pPr/a:defRPr", "sz", "1000"); + assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:catAx/c:txPr/a:p/a:pPr/a:defRPr", "b", "1"); + assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:catAx/c:txPr/a:p/a:pPr/a:defRPr", "i", "1"); + assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:catAx/c:txPr/a:p/a:pPr/a:defRPr", "u", "sng"); + + assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:valAx/c:txPr/a:p/a:pPr/a:defRPr", "sz", "900"); + assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:valAx/c:txPr/a:p/a:pPr/a:defRPr", "b", "1"); + assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:valAx/c:txPr/a:p/a:pPr/a:defRPr", "strike", "sngStrike"); + assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:valAx/c:txPr/a:p/a:pPr/a:defRPr/a:solidFill/a:srgbClr", "val", "ff0000"); +} + CPPUNIT_TEST_SUITE_REGISTRATION(Chart2ExportTest); CPPUNIT_PLUGIN_IMPLEMENT(); diff --git a/chart2/qa/extras/data/xlsx/axis_character_properties.xlsx b/chart2/qa/extras/data/xlsx/axis_character_properties.xlsx Binary files differnew file mode 100644 index 000000000000..635aafe81bf4 --- /dev/null +++ b/chart2/qa/extras/data/xlsx/axis_character_properties.xlsx |