diff options
author | sushil_shinde <sushil.shinde@synerzip.com> | 2013-12-09 12:27:40 +0530 |
---|---|---|
committer | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2013-12-19 03:20:40 +0100 |
commit | a70dfc34a67e9fb240cc70853da0c49fa01c2e4f (patch) | |
tree | 97964cf2cc86a868a538db4fa71a112e010a6dec /chart2 | |
parent | 02a047365fccce91d5b1feae0addf79fe58ebe31 (diff) |
fdo#72306 Axis names were lost after saving file on LO.
While exporting chart "crosses" position values were
not handled properly in chartexport.
Fixed this issue by handling "autozero" value for c:crosses.
Added unit test.
Change-Id: I3489908d4c3d4b41a04debfecf95e65f373649ce
Diffstat (limited to 'chart2')
-rw-r--r-- | chart2/qa/extras/chart2export.cxx | 10 | ||||
-rw-r--r-- | chart2/qa/extras/data/docx/Bar_horizontal_cone.docx | bin | 0 -> 18237 bytes |
2 files changed, 10 insertions, 0 deletions
diff --git a/chart2/qa/extras/chart2export.cxx b/chart2/qa/extras/chart2export.cxx index 9830f0a91646..dbc0a0d2c9fc 100644 --- a/chart2/qa/extras/chart2export.cxx +++ b/chart2/qa/extras/chart2export.cxx @@ -34,6 +34,7 @@ public: void testTrendline(); void testStockChart(); void testBarChart(); + void testCrosses(); CPPUNIT_TEST_SUITE(Chart2ExportTest); CPPUNIT_TEST(test); @@ -41,6 +42,7 @@ public: CPPUNIT_TEST(testTrendline); CPPUNIT_TEST(testStockChart); CPPUNIT_TEST(testBarChart); + CPPUNIT_TEST(testCrosses); CPPUNIT_TEST_SUITE_END(); @@ -425,6 +427,14 @@ void Chart2ExportTest::testBarChart() assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:barChart/c:barDir", "val", "col"); } +void Chart2ExportTest::testCrosses() +{ + load("/chart2/qa/extras/data/docx/", "Bar_horizontal_cone.docx"); + xmlDocPtr pXmlDoc = parseExport("word/charts/chart", "Office Open XML Text"); + + assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:catAx/c:crosses", "val", "autoZero"); +} + CPPUNIT_TEST_SUITE_REGISTRATION(Chart2ExportTest); CPPUNIT_PLUGIN_IMPLEMENT(); diff --git a/chart2/qa/extras/data/docx/Bar_horizontal_cone.docx b/chart2/qa/extras/data/docx/Bar_horizontal_cone.docx Binary files differnew file mode 100644 index 000000000000..2280d89fc11a --- /dev/null +++ b/chart2/qa/extras/data/docx/Bar_horizontal_cone.docx |