summaryrefslogtreecommitdiff
path: root/sw/qa/extras
diff options
context:
space:
mode:
authorTünde Tóth <toth.tunde@nisz.hu>2020-10-16 08:57:53 +0200
committerLászló Németh <nemeth@numbertext.org>2020-10-19 13:00:50 +0200
commit657ea0d1250624312e104f9acfb6a04a3ba4cce3 (patch)
treebcdae605c3f2bf9d9bd8cd3cc92c16e0e8df13e1 /sw/qa/extras
parent2646023729dd16c1a613fac7e8e6a37828d7a404 (diff)
tdf#134121 pie chart: add leader lines
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 <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org>
Diffstat (limited to 'sw/qa/extras')
-rw-r--r--sw/qa/extras/layout/data/piechart_leaderline.odtbin0 -> 15625 bytes
-rw-r--r--sw/qa/extras/layout/layout2.cxx15
2 files changed, 15 insertions, 0 deletions
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
--- /dev/null
+++ b/sw/qa/extras/layout/data/piechart_leaderline.odt
Binary files 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<GDIMetaFile> 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");