diff options
author | Tünde Tóth <tundeth@gmail.com> | 2020-03-02 14:57:20 +0100 |
---|---|---|
committer | László Németh <nemeth@numbertext.org> | 2020-03-05 12:45:54 +0100 |
commit | 65123d41f62597053bc3893ee4fb46868a6b1f2d (patch) | |
tree | e099c27ca8b6cf3c3cabdce3eda40f096ceeb8d1 /chart2 | |
parent | 9fab1ba8ddc59924c633aa17c65f7330a4762726 (diff) |
tdf#75330 chart: implement ODF import/export of legend overlay feature
Follow-up of commit 9fab1ba8ddc59924c633aa17c65f7330a4762726
(tdf#75330 add a new overlay/no-overlay feature for the legend).
Change-Id: I7781fd8b926d4add56f3db0d56dceab8e27e5f85
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89836
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 | 16 | ||||
-rw-r--r-- | chart2/qa/extras/data/ods/legend_overlay.ods | bin | 0 -> 12314 bytes |
2 files changed, 16 insertions, 0 deletions
diff --git a/chart2/qa/extras/chart2export.cxx b/chart2/qa/extras/chart2export.cxx index 217e766e42fc..c3bd2283bf4e 100644 --- a/chart2/qa/extras/chart2export.cxx +++ b/chart2/qa/extras/chart2export.cxx @@ -158,6 +158,7 @@ public: void testDeletedLegendEntries(); void testTdf130225(); void testTdf126076(); + void testTdf75330(); CPPUNIT_TEST_SUITE(Chart2ExportTest); CPPUNIT_TEST(testErrorBarXLSX); @@ -279,6 +280,7 @@ public: CPPUNIT_TEST(testDeletedLegendEntries); CPPUNIT_TEST(testTdf130225); CPPUNIT_TEST(testTdf126076); + CPPUNIT_TEST(testTdf75330); CPPUNIT_TEST_SUITE_END(); @@ -2580,6 +2582,20 @@ void Chart2ExportTest::testTdf126076() assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:lineChart/c:ser/c:marker", 0); } +void Chart2ExportTest::testTdf75330() +{ + mbSkipValidation = true; + load("/chart2/qa/extras/data/ods/", "legend_overlay.ods"); + reload("calc8"); + uno::Reference< chart2::XChartDocument > xChart2Doc = getChartDocFromSheet(0, mxComponent); + uno::Reference< chart::XChartDocument > xChartDoc (xChart2Doc, uno::UNO_QUERY); + uno::Reference<drawing::XShape> xLegend = xChartDoc->getLegend(); + Reference<beans::XPropertySet> xPropertySet(xLegend, uno::UNO_QUERY_THROW); + bool bOverlay = false; + CPPUNIT_ASSERT(xPropertySet->getPropertyValue("Overlay") >>= bOverlay); + CPPUNIT_ASSERT(bOverlay); +} + CPPUNIT_TEST_SUITE_REGISTRATION(Chart2ExportTest); CPPUNIT_PLUGIN_IMPLEMENT(); diff --git a/chart2/qa/extras/data/ods/legend_overlay.ods b/chart2/qa/extras/data/ods/legend_overlay.ods Binary files differnew file mode 100644 index 000000000000..fade626405c1 --- /dev/null +++ b/chart2/qa/extras/data/ods/legend_overlay.ods |