diff options
author | Tünde Tóth <tundeth@gmail.com> | 2019-12-04 16:17:09 +0100 |
---|---|---|
committer | László Németh <nemeth@numbertext.org> | 2019-12-14 17:46:00 +0100 |
commit | 92f96e41223ad174ff32901f71ce0d64b6a0eade (patch) | |
tree | 5ad9b4957fac39d949b9ecee4f0d0fbbb48cfd9f /chart2 | |
parent | f12c5078facde462343ddfa2c8ed4edb0f5626c9 (diff) |
tdf#121991 Chart OOXML import: fix deleted legend entries
The legend showed deleted legend entries too.
Change-Id: I1e205cdfc4262c73d2bb189237d6bc316781931d
Reviewed-on: https://gerrit.libreoffice.org/84516
Reviewed-by: László Németh <nemeth@numbertext.org>
Tested-by: László Németh <nemeth@numbertext.org>
(cherry picked from commit cea1ae2a4f7abdcfc3874d714bdafef801910c1c)
Reviewed-on: https://gerrit.libreoffice.org/85024
Tested-by: Jenkins
Reviewed-by: Tünde Tóth <tundeth@gmail.com>
Diffstat (limited to 'chart2')
-rw-r--r-- | chart2/qa/extras/chart2import.cxx | 15 | ||||
-rw-r--r-- | chart2/qa/extras/data/xlsx/deleted_legend_entry.xlsx | bin | 0 -> 14346 bytes |
2 files changed, 15 insertions, 0 deletions
diff --git a/chart2/qa/extras/chart2import.cxx b/chart2/qa/extras/chart2import.cxx index f4bfb53fbf34..be010f3b309f 100644 --- a/chart2/qa/extras/chart2import.cxx +++ b/chart2/qa/extras/chart2import.cxx @@ -148,6 +148,7 @@ public: void testXaxisValues(); void testTdf123504(); void testTdf122765(); + void testTdf121991(); CPPUNIT_TEST_SUITE(Chart2ImportTest); CPPUNIT_TEST(Fdo60083); @@ -245,6 +246,7 @@ public: CPPUNIT_TEST(testXaxisValues); CPPUNIT_TEST(testTdf123504); CPPUNIT_TEST(testTdf122765); + CPPUNIT_TEST(testTdf121991); CPPUNIT_TEST_SUITE_END(); @@ -2281,6 +2283,19 @@ void Chart2ImportTest::testTdf122765() CPPUNIT_ASSERT_GREATER(sal_Int32(7000), aSlicePosition.X); } +void Chart2ImportTest::testTdf121991() +{ + load("/chart2/qa/extras/data/xlsx/", "deleted_legend_entry.xlsx"); + Reference< chart2::XChartDocument > xChartDoc = getChartDocFromSheet(0, mxComponent); + CPPUNIT_ASSERT(xChartDoc.is()); + Reference<chart2::XDataSeries> xDataSeries(getDataSeriesFromDoc(xChartDoc, 1)); + CPPUNIT_ASSERT(xDataSeries.is()); + Reference<beans::XPropertySet> xPropertySet(xDataSeries, uno::UNO_QUERY_THROW); + bool bShowLegendEntry = true; + CPPUNIT_ASSERT(xPropertySet->getPropertyValue("ShowLegendEntry") >>= bShowLegendEntry); + CPPUNIT_ASSERT(!bShowLegendEntry); +} + CPPUNIT_TEST_SUITE_REGISTRATION(Chart2ImportTest); CPPUNIT_PLUGIN_IMPLEMENT(); diff --git a/chart2/qa/extras/data/xlsx/deleted_legend_entry.xlsx b/chart2/qa/extras/data/xlsx/deleted_legend_entry.xlsx Binary files differnew file mode 100644 index 000000000000..06a052646f1e --- /dev/null +++ b/chart2/qa/extras/data/xlsx/deleted_legend_entry.xlsx |