diff options
author | Tünde Tóth <tundeth@gmail.com> | 2020-02-05 13:37:00 +0100 |
---|---|---|
committer | László Németh <nemeth@numbertext.org> | 2020-02-13 11:15:56 +0100 |
commit | a96ec04a07c35338f5f9a0cb361b9322e5ca9cec (patch) | |
tree | 20b109bd965560010312b19d1dd3d8b01f05d76e /chart2/qa/extras | |
parent | 8daffb60dd2863878bb04317ca2849d76df01f4b (diff) |
tdf#130225 implement ODF export of deleted legend entries of pie charts
Follow-up of the following commits related to the new UNO property
DeletedLegendEntries for pie charts:
commit 86be3422cd55fa9e44104f1628648061bb6a3495
(tdf#129857 Chart OOXML export: fix deleted legend entries)
commit 6e847aa817999ab18acd534f9e6a86685bb268fc
(tdf#129859 XLSX import: don't show deleted legend entries)
Change-Id: Id24cddefa83e50dde1ec6555d02891753483dd5f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88018
Tested-by: Jenkins
Reviewed-by: László Németh <nemeth@numbertext.org>
Diffstat (limited to 'chart2/qa/extras')
-rw-r--r-- | chart2/qa/extras/chart2export.cxx | 16 | ||||
-rw-r--r-- | chart2/qa/extras/data/docx/piechart_deleted_legend_entry.docx | bin | 0 -> 27165 bytes |
2 files changed, 16 insertions, 0 deletions
diff --git a/chart2/qa/extras/chart2export.cxx b/chart2/qa/extras/chart2export.cxx index 5ee135f5920b..1ff1064046e1 100644 --- a/chart2/qa/extras/chart2export.cxx +++ b/chart2/qa/extras/chart2export.cxx @@ -153,6 +153,7 @@ public: void testTdf115012(); void testTdf123206_customLabelText(); void testDeletedLegendEntries(); + void testTdf130225(); CPPUNIT_TEST_SUITE(Chart2ExportTest); CPPUNIT_TEST(testErrorBarXLSX); @@ -269,6 +270,7 @@ public: CPPUNIT_TEST(testTdf115012); CPPUNIT_TEST(testTdf123206_customLabelText); CPPUNIT_TEST(testDeletedLegendEntries); + CPPUNIT_TEST(testTdf130225); CPPUNIT_TEST_SUITE_END(); @@ -2469,6 +2471,20 @@ void Chart2ExportTest::testDeletedLegendEntries() } } +void Chart2ExportTest::testTdf130225() +{ + load("/chart2/qa/extras/data/docx/", "piechart_deleted_legend_entry.docx"); + reload("Office Open XML Text"); + Reference<chart2::XChartDocument> xChartDoc(getChartDocFromWriter(0), uno::UNO_QUERY); + CPPUNIT_ASSERT(xChartDoc.is()); + Reference<chart2::XDataSeries> xDataSeries(getDataSeriesFromDoc(xChartDoc, 0)); + CPPUNIT_ASSERT(xDataSeries.is()); + Reference<beans::XPropertySet> xPropertySet(xDataSeries, uno::UNO_QUERY_THROW); + Sequence<sal_Int32> deletedLegendEntriesSeq; + CPPUNIT_ASSERT(xPropertySet->getPropertyValue("DeletedLegendEntries") >>= deletedLegendEntriesSeq); + CPPUNIT_ASSERT_EQUAL(sal_Int32(1), deletedLegendEntriesSeq[0]); +} + CPPUNIT_TEST_SUITE_REGISTRATION(Chart2ExportTest); CPPUNIT_PLUGIN_IMPLEMENT(); diff --git a/chart2/qa/extras/data/docx/piechart_deleted_legend_entry.docx b/chart2/qa/extras/data/docx/piechart_deleted_legend_entry.docx Binary files differnew file mode 100644 index 000000000000..da6b2fa19a63 --- /dev/null +++ b/chart2/qa/extras/data/docx/piechart_deleted_legend_entry.docx |