diff options
author | Tünde Tóth <tundeth@gmail.com> | 2020-05-26 13:34:32 +0200 |
---|---|---|
committer | László Németh <nemeth@numbertext.org> | 2020-05-27 10:53:54 +0200 |
commit | 47e45d75f7789f0178ea3e1b22ef7b8adc77018e (patch) | |
tree | aa7c49b1ddf61d165f58bed886a4adb89d52c2db /chart2 | |
parent | befaaa3165091d4fce21fe6e5f5781e3d6ea242b (diff) |
tdf#132594 Chart XLSX import: fix legend entries in pie charts
Legend entry text of pie chart wasn't imported correctly
in XLSX documents created with Excel 2007.
Regression from commit: e0b0502516a10181bbd1737b93b38b2bba4c98e8
(tdf#128016 Chart OOXML Import: fix duplicated category labels)
Change-Id: I4567437a41fe66e124dccbd148c0c49196d5c007
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94864
Tested-by: Jenkins
Tested-by: László Németh <nemeth@numbertext.org>
Reviewed-by: László Németh <nemeth@numbertext.org>
Diffstat (limited to 'chart2')
-rw-r--r-- | chart2/qa/extras/chart2export.cxx | 11 | ||||
-rw-r--r-- | chart2/qa/extras/data/xlsx/chart_pie2007.xlsx | bin | 0 -> 11299 bytes |
2 files changed, 11 insertions, 0 deletions
diff --git a/chart2/qa/extras/chart2export.cxx b/chart2/qa/extras/chart2export.cxx index 429ea41c5a5a..81b79439a9ff 100644 --- a/chart2/qa/extras/chart2export.cxx +++ b/chart2/qa/extras/chart2export.cxx @@ -170,6 +170,7 @@ public: void testTdf125812(); void testTdf133190(); void testTdf133191(); + void testTdf132594(); CPPUNIT_TEST_SUITE(Chart2ExportTest); CPPUNIT_TEST(testErrorBarXLSX); @@ -303,6 +304,7 @@ public: CPPUNIT_TEST(testTdf125812); CPPUNIT_TEST(testTdf133190); CPPUNIT_TEST(testTdf133191); + CPPUNIT_TEST(testTdf132594); CPPUNIT_TEST_SUITE_END(); @@ -2791,6 +2793,15 @@ void Chart2ExportTest::testTdf133191() assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:pieChart/c:ser/c:dLbls/c:dLbl[3]/c:txPr/a:bodyPr", "rot", "-4500000"); } +void Chart2ExportTest::testTdf132594() +{ + load("/chart2/qa/extras/data/xlsx/", "chart_pie2007.xlsx"); + xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart","Calc Office Open XML"); + CPPUNIT_ASSERT(pXmlDoc); + + assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:pieChart/c:ser/c:cat", 1); +} + CPPUNIT_TEST_SUITE_REGISTRATION(Chart2ExportTest); CPPUNIT_PLUGIN_IMPLEMENT(); diff --git a/chart2/qa/extras/data/xlsx/chart_pie2007.xlsx b/chart2/qa/extras/data/xlsx/chart_pie2007.xlsx Binary files differnew file mode 100644 index 000000000000..b122680257c0 --- /dev/null +++ b/chart2/qa/extras/data/xlsx/chart_pie2007.xlsx |