From 9cbde4be33d82fc822b11394e713b8d2492bcac8 Mon Sep 17 00:00:00 2001 From: Tünde Tóth Date: Tue, 19 May 2020 10:46:01 +0200 Subject: tdf#125812 Chart: fix OOXML export of gradient center MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit See also: commit 898e4ae1364e76af8be22183ac64d73b6a6d8d90 (tdf#128794 Chart: Fix OOXML import/export of Radial gradient) Change-Id: I9486c5b1dfcfd25bbf00d5f11b90c3c02459f634 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94486 Reviewed-by: Balazs Varga Reviewed-by: László Németh Tested-by: László Németh --- chart2/qa/extras/chart2export.cxx | 14 ++++++++++++++ chart2/qa/extras/data/odp/ellipticalGradientFill.odp | Bin 0 -> 17071 bytes 2 files changed, 14 insertions(+) create mode 100644 chart2/qa/extras/data/odp/ellipticalGradientFill.odp (limited to 'chart2/qa') diff --git a/chart2/qa/extras/chart2export.cxx b/chart2/qa/extras/chart2export.cxx index 84a38b258733..08086d8ae2ab 100644 --- a/chart2/qa/extras/chart2export.cxx +++ b/chart2/qa/extras/chart2export.cxx @@ -167,6 +167,7 @@ public: void testTdf127792(); void testTdf131979(); void testTdf132076(); + void testTdf125812(); CPPUNIT_TEST_SUITE(Chart2ExportTest); CPPUNIT_TEST(testErrorBarXLSX); @@ -297,6 +298,7 @@ public: CPPUNIT_TEST(testTdf127792); CPPUNIT_TEST(testTdf131979); CPPUNIT_TEST(testTdf132076); + CPPUNIT_TEST(testTdf125812); CPPUNIT_TEST_SUITE_END(); @@ -2752,6 +2754,18 @@ void Chart2ExportTest::testTdf132076() } } +void Chart2ExportTest::testTdf125812() +{ + load("/chart2/qa/extras/data/odp/", "ellipticalGradientFill.odp"); + xmlDocUniquePtr pXmlDoc = parseExport("ppt/charts/chart", "Impress MS PowerPoint 2007 XML"); + CPPUNIT_ASSERT(pXmlDoc); + assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:spPr/a:gradFill/a:path", "path", "circle"); + assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:spPr/a:gradFill/a:path/a:fillToRect", "l", "50000"); + assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:spPr/a:gradFill/a:path/a:fillToRect", "t", "49000"); + assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:spPr/a:gradFill/a:path/a:fillToRect", "r", "50000"); + assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:spPr/a:gradFill/a:path/a:fillToRect", "b", "51000"); +} + CPPUNIT_TEST_SUITE_REGISTRATION(Chart2ExportTest); CPPUNIT_PLUGIN_IMPLEMENT(); diff --git a/chart2/qa/extras/data/odp/ellipticalGradientFill.odp b/chart2/qa/extras/data/odp/ellipticalGradientFill.odp new file mode 100644 index 000000000000..754f439e5864 Binary files /dev/null and b/chart2/qa/extras/data/odp/ellipticalGradientFill.odp differ -- cgit