From cf5c3e97b66ef31f2b8db4dca4c8eb179754e694 Mon Sep 17 00:00:00 2001 From: Nikhil Walvekar Date: Thu, 12 Dec 2013 17:50:37 +0530 Subject: fdo#72304 Write Chart Data Table information back to XML. During export access properties stored during import and write back those. Currently we just support basic chart data table information such as border and outline, there are more properties, which are pending. Conflicts: chart2/qa/extras/chart2export.cxx Change-Id: Icbc1245fc829f49833a8c307e029c3dd3dc2e0bd --- chart2/qa/extras/chart2export.cxx | 13 ++++++++++++- chart2/qa/extras/data/docx/testChartDataTable.docx | Bin 0 -> 18084 bytes 2 files changed, 12 insertions(+), 1 deletion(-) create mode 100644 chart2/qa/extras/data/docx/testChartDataTable.docx (limited to 'chart2') diff --git a/chart2/qa/extras/chart2export.cxx b/chart2/qa/extras/chart2export.cxx index dbc0a0d2c9fc..eee9161d8bbb 100644 --- a/chart2/qa/extras/chart2export.cxx +++ b/chart2/qa/extras/chart2export.cxx @@ -35,6 +35,7 @@ public: void testStockChart(); void testBarChart(); void testCrosses(); + void testChartDataTable(); CPPUNIT_TEST_SUITE(Chart2ExportTest); CPPUNIT_TEST(test); @@ -43,7 +44,7 @@ public: CPPUNIT_TEST(testStockChart); CPPUNIT_TEST(testBarChart); CPPUNIT_TEST(testCrosses); - + CPPUNIT_TEST(testChartDataTable); CPPUNIT_TEST_SUITE_END(); protected: @@ -434,6 +435,16 @@ void Chart2ExportTest::testCrosses() assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:catAx/c:crosses", "val", "autoZero"); } +void Chart2ExportTest::testChartDataTable() +{ + load("/chart2/qa/extras/data/docx/", "testChartDataTable.docx"); + + xmlDocPtr pXmlDoc = parseExport("word/charts/chart", "Office Open XML Text"); + CPPUNIT_ASSERT(pXmlDoc); + assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:dTable/c:showHorzBorder", "val", "1"); + assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:dTable/c:showVertBorder", "val", "1"); + assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:dTable/c:showOutline", "val", "1"); +} CPPUNIT_TEST_SUITE_REGISTRATION(Chart2ExportTest); diff --git a/chart2/qa/extras/data/docx/testChartDataTable.docx b/chart2/qa/extras/data/docx/testChartDataTable.docx new file mode 100644 index 000000000000..8663e8937ea9 Binary files /dev/null and b/chart2/qa/extras/data/docx/testChartDataTable.docx differ -- cgit