From 657ea0d1250624312e104f9acfb6a04a3ba4cce3 Mon Sep 17 00:00:00 2001 From: Tünde Tóth Date: Fri, 16 Oct 2020 08:57:53 +0200 Subject: tdf#134121 pie chart: add leader lines MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit to data labels with custom position. See commit 769433ad93040bc81f06672c8a2c01e2b76fece3 (tdf#90749 chart: add leader lines to custom data label positions) Change-Id: If5d912cc04993e59bd5ab93b644ea49ba8642b49 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104410 Tested-by: László Németh Reviewed-by: László Németh --- sw/qa/extras/layout/data/piechart_leaderline.odt | Bin 0 -> 15625 bytes sw/qa/extras/layout/layout2.cxx | 15 +++++++++++++++ 2 files changed, 15 insertions(+) create mode 100644 sw/qa/extras/layout/data/piechart_leaderline.odt (limited to 'sw') diff --git a/sw/qa/extras/layout/data/piechart_leaderline.odt b/sw/qa/extras/layout/data/piechart_leaderline.odt new file mode 100644 index 000000000000..77c61a691eb1 Binary files /dev/null and b/sw/qa/extras/layout/data/piechart_leaderline.odt differ diff --git a/sw/qa/extras/layout/layout2.cxx b/sw/qa/extras/layout/layout2.cxx index f0bb71e9b9f5..1107f3cff20e 100644 --- a/sw/qa/extras/layout/layout2.cxx +++ b/sw/qa/extras/layout/layout2.cxx @@ -878,6 +878,21 @@ CPPUNIT_TEST_FIXTURE(SwLayoutWriter2, testTdf130242) CPPUNIT_ASSERT_DOUBLES_EQUAL(3018, nY, 50); } +CPPUNIT_TEST_FIXTURE(SwLayoutWriter2, testTdf134121) +{ + SwDoc* pDoc = createDoc("piechart_leaderline.odt"); + SwDocShell* pShell = pDoc->GetDocShell(); + + // Dump the rendering of the first page as an XML file. + std::shared_ptr xMetaFile = pShell->GetPreviewMetaFile(); + MetafileXmlDump dumper; + xmlDocUniquePtr pXmlDoc = dumpAndParse(dumper, *xMetaFile); + CPPUNIT_ASSERT(pXmlDoc); + + // Check the custom leader line on pie chart. + assertXPath(pXmlDoc, "//polyline", 1); +} + CPPUNIT_TEST_FIXTURE(SwLayoutWriter2, testTdf130380) { SwDoc* pDoc = createDoc("tdf130380.docx"); -- cgit