summaryrefslogtreecommitdiff
path: root/chart2
diff options
context:
space:
mode:
authorYogeshBharate <yogesh.bharate@synerzip.com>2014-02-21 11:03:35 +0530
committerMarkus Mohrhard <markus.mohrhard@googlemail.com>2014-03-03 13:41:08 +0100
commit9ca4fa05eb5ec7d0d7c3f4a83489013e140d2f0b (patch)
tree2af14d2d09e6fc4173a7978f61e9794e15bef884 /chart2
parent4f7b96886ec2e98f270a9ec3c3509cd523fce7cc (diff)
fdo#74826: File corruption-Issue related to Series idx & order val.
Problem Description: - If the document contains more than one charts together. ex.Bar & Line chart - In that case, LO writes idx & order val equal to 0, instead of 1 for second chart series. - After roundtrip, the document get corrupted. Implementation: - Added varible to take the series count in case of multiple chart. Note: - Some of the UT's are failing when --enable-dbgutil is enabled. Change-Id: I40606b4d69026939fa19ae534dd7b2bb36ec97fc
Diffstat (limited to 'chart2')
-rw-r--r--chart2/qa/extras/chart2export.cxx10
-rw-r--r--chart2/qa/extras/data/docx/testSeriesIdxOrder.docxbin0 -> 25941 bytes
2 files changed, 10 insertions, 0 deletions
diff --git a/chart2/qa/extras/chart2export.cxx b/chart2/qa/extras/chart2export.cxx
index 8c7e7b3e13c5..e3554e5b8ffb 100644
--- a/chart2/qa/extras/chart2export.cxx
+++ b/chart2/qa/extras/chart2export.cxx
@@ -48,6 +48,7 @@ public:
void testBarChartRotation();
void testShapeFollowedByChart();
void testPieChartDataLabels();
+ void testSeriesIdxOrder();
CPPUNIT_TEST_SUITE(Chart2ExportTest);
CPPUNIT_TEST(test);
@@ -68,6 +69,7 @@ public:
CPPUNIT_TEST(testBarChartRotation);
CPPUNIT_TEST(testShapeFollowedByChart);
CPPUNIT_TEST(testPieChartDataLabels);
+ CPPUNIT_TEST(testSeriesIdxOrder);
CPPUNIT_TEST_SUITE_END();
protected:
@@ -610,6 +612,14 @@ void Chart2ExportTest::testPieChartDataLabels()
assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:pie3DChart/c:ser[1]/c:dLbls/c:dLbl[1]/c:dLblPos", "val", "bestFit");
}
+void Chart2ExportTest::testSeriesIdxOrder()
+{
+ load("/chart2/qa/extras/data/docx/", "testSeriesIdxOrder.docx");
+ xmlDocPtr pXmlDoc = parseExport("word/charts/chart", "Office Open XML Text");
+ CPPUNIT_ASSERT(pXmlDoc);
+ assertXPath(pXmlDoc, "/c:chartSpace[1]/c:chart[1]/c:plotArea[1]/c:lineChart[1]/c:ser[1]/c:idx[1]", "val", "1");
+ assertXPath(pXmlDoc, "/c:chartSpace[1]/c:chart[1]/c:plotArea[1]/c:lineChart[1]/c:ser[1]/c:order[1]", "val", "1");
+}
CPPUNIT_TEST_SUITE_REGISTRATION(Chart2ExportTest);
CPPUNIT_PLUGIN_IMPLEMENT();
diff --git a/chart2/qa/extras/data/docx/testSeriesIdxOrder.docx b/chart2/qa/extras/data/docx/testSeriesIdxOrder.docx
new file mode 100644
index 000000000000..9274e2c2c2d3
--- /dev/null
+++ b/chart2/qa/extras/data/docx/testSeriesIdxOrder.docx
Binary files differ