diff options
author | Rohit Deshmukh <rohit.deshmukh@synerzip.com> | 2014-02-06 17:34:20 +0530 |
---|---|---|
committer | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2014-02-15 06:17:55 +0100 |
commit | a05ad6dd36f73647cdf0839d2c18dbc1d399c792 (patch) | |
tree | 74eafb973ad7368cafa815cd0caa5304921a7df0 /chart2 | |
parent | a357ef4546eccf6dcebb44e9d460f6028c335d2b (diff) |
fdo#74137: Fix for courruption of Pie chart after roundtrip.
Problem:
- Pie chart with data labels files gets corrupt because of label position is
bestFit in original file.
- But after round trip, data labels position gets changes to top, left and right.
For some data labels postion value is missing.
Implementaion:
- In LO, while converting data label from model, the position gets changed.
So we are ignoring this hack for Pie chart.
Conflicts:
chart2/qa/extras/chart2export.cxx
Change-Id: Ic51845cd6f39bc905439eea8971e878607d25dac
Diffstat (limited to 'chart2')
-rw-r--r-- | chart2/qa/extras/chart2export.cxx | 9 | ||||
-rw-r--r-- | chart2/qa/extras/data/docx/PieChartDataLabels.docx | bin | 0 -> 120403 bytes |
2 files changed, 9 insertions, 0 deletions
diff --git a/chart2/qa/extras/chart2export.cxx b/chart2/qa/extras/chart2export.cxx index c15f5af2f5c1..b7b36682dcff 100644 --- a/chart2/qa/extras/chart2export.cxx +++ b/chart2/qa/extras/chart2export.cxx @@ -47,6 +47,7 @@ public: void testFdo74115WallBitmapFill(); void testBarChartRotation(); void testShapeFollowedByChart(); + void testPieChartDataLabels(); CPPUNIT_TEST_SUITE(Chart2ExportTest); CPPUNIT_TEST(test); @@ -66,6 +67,7 @@ public: CPPUNIT_TEST(testFdo74115WallBitmapFill); CPPUNIT_TEST(testBarChartRotation); CPPUNIT_TEST(testShapeFollowedByChart); + CPPUNIT_TEST(testPieChartDataLabels); CPPUNIT_TEST_SUITE_END(); protected: @@ -598,7 +600,14 @@ void Chart2ExportTest::testShapeFollowedByChart() OUString aValueOfFirstDocPR = getXPath(pXmlDoc, "/w:document/w:body/w:p[3]/w:r[1]/w:drawing[1]/wp:inline[1]/wp:docPr[1]", "id"); OUString aValueOfSecondDocPR = getXPath(pXmlDoc, "/w:document/w:body/w:p[3]/w:r[2]/mc:AlternateContent[1]/mc:Choice[1]/w:drawing[1]/wp:anchor[1]/wp:docPr[1]", "id"); CPPUNIT_ASSERT( aValueOfFirstDocPR != aValueOfSecondDocPR ); +} +void Chart2ExportTest::testPieChartDataLabels() +{ + load("/chart2/qa/extras/data/docx/", "PieChartDataLabels.docx"); + xmlDocPtr pXmlDoc = parseExport("word/charts/chart", "Office Open XML Text"); + CPPUNIT_ASSERT(pXmlDoc); + assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:pie3DChart/c:ser[1]/c:dLbls/c:dLbl[1]/c:dLblPos", "val", "bestFit"); } CPPUNIT_TEST_SUITE_REGISTRATION(Chart2ExportTest); diff --git a/chart2/qa/extras/data/docx/PieChartDataLabels.docx b/chart2/qa/extras/data/docx/PieChartDataLabels.docx Binary files differnew file mode 100644 index 000000000000..99a72c0f290e --- /dev/null +++ b/chart2/qa/extras/data/docx/PieChartDataLabels.docx |