From c7cfe0876d7ca3d861cc6d8c1f84970f9f71def9 Mon Sep 17 00:00:00 2001 From: Rajashri Date: Fri, 6 Dec 2013 16:20:54 +0530 Subject: fdo#72217 : Fix for corruption area chart with data labels after Round Trip. For labels under one series, there were child tags created for every data label individually. for example, if under one series there are five labels, then under there were 5 tags created separately. This issue is resolved now. Conflicts: chart2/qa/extras/chart2export.cxx Change-Id: I7ae214f413bc27728df8a3d4cb8f4d703cba2f77 --- chart2/qa/extras/chart2export.cxx | 12 ++++++++++++ chart2/qa/extras/data/docx/testAreaChartLoad.docx | Bin 0 -> 23962 bytes 2 files changed, 12 insertions(+) create mode 100644 chart2/qa/extras/data/docx/testAreaChartLoad.docx (limited to 'chart2/qa') diff --git a/chart2/qa/extras/chart2export.cxx b/chart2/qa/extras/chart2export.cxx index 6cef73b26831..7b1629af69d2 100644 --- a/chart2/qa/extras/chart2export.cxx +++ b/chart2/qa/extras/chart2export.cxx @@ -39,6 +39,7 @@ public: void testChartDataTable(); void testChartExternalData(); void testEmbeddingsGrabBag(); + void testAreaChartLoad(); CPPUNIT_TEST_SUITE(Chart2ExportTest); CPPUNIT_TEST(test); @@ -50,6 +51,7 @@ public: CPPUNIT_TEST(testChartDataTable); CPPUNIT_TEST(testChartExternalData); CPPUNIT_TEST(testEmbeddingsGrabBag); + CPPUNIT_TEST(testAreaChartLoad); CPPUNIT_TEST_SUITE_END(); protected: @@ -440,6 +442,7 @@ 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"); @@ -500,6 +503,15 @@ void Chart2ExportTest::testEmbeddingsGrabBag() CPPUNIT_ASSERT(bEmbeddings); // Grab Bag has all the expected elements } +void Chart2ExportTest::testAreaChartLoad() +{ + load ("/chart2/qa/extras/data/docx/", "testAreaChartLoad.docx"); + xmlDocPtr pXmlDoc = parseExport("word/charts/chart","Office Open XML Text"); + CPPUNIT_ASSERT(pXmlDoc); + assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:areaChart/c:ser/c:dLbls/c:showVal", "val", "1"); + assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:areaChart/c:ser/c:dLbls/c:dLbl", 0); +} + CPPUNIT_TEST_SUITE_REGISTRATION(Chart2ExportTest); CPPUNIT_PLUGIN_IMPLEMENT(); diff --git a/chart2/qa/extras/data/docx/testAreaChartLoad.docx b/chart2/qa/extras/data/docx/testAreaChartLoad.docx new file mode 100644 index 000000000000..9383f75cde34 Binary files /dev/null and b/chart2/qa/extras/data/docx/testAreaChartLoad.docx differ -- cgit