summaryrefslogtreecommitdiff
path: root/chart2/qa
diff options
context:
space:
mode:
authorBalazs Varga <balazs.varga991@gmail.com>2020-02-12 13:47:50 +0100
committerLászló Németh <nemeth@numbertext.org>2020-02-20 11:18:40 +0100
commit769433ad93040bc81f06672c8a2c01e2b76fece3 (patch)
treef2f12845bc7486d4d7af0d0303dc201ebd6db4a6 /chart2/qa
parentc6f5e12ee3f91234b064222272d756670f3bb207 (diff)
tdf#90749 chart: add leader lines to custom data label positions
also export them as CustomXML extension for MSO interoperability. Note: pie chart is not yet supported. See commit 4223ff2be69f03e571464b0b09ad0d278918631b ( tdf#48436 Chart: add CustomLabelPosition UNO API property) Change-Id: Ia8142408414d4ad8f689d789386db50038ed13f6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88531 Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org>
Diffstat (limited to 'chart2/qa')
-rw-r--r--chart2/qa/extras/chart2export.cxx14
-rw-r--r--chart2/qa/extras/data/xlsx/testTdf90749.xlsxbin0 -> 14505 bytes
2 files changed, 13 insertions, 1 deletions
diff --git a/chart2/qa/extras/chart2export.cxx b/chart2/qa/extras/chart2export.cxx
index b9d5873052ba..88c7d154d170 100644
--- a/chart2/qa/extras/chart2export.cxx
+++ b/chart2/qa/extras/chart2export.cxx
@@ -136,6 +136,7 @@ public:
void testCustomDataLabel();
void testCustomPositionofDataLabel();
void testCustomDataLabelMultipleSeries();
+ void testLeaderLines();
void testNumberFormatExportPPTX();
void testLabelSeparatorExportDOCX();
void testChartTitlePropertiesColorFillPPTX();
@@ -254,6 +255,7 @@ public:
CPPUNIT_TEST(testCustomDataLabel);
CPPUNIT_TEST(testCustomPositionofDataLabel);
CPPUNIT_TEST(testCustomDataLabelMultipleSeries);
+ CPPUNIT_TEST(testLeaderLines);
CPPUNIT_TEST(testNumberFormatExportPPTX);
CPPUNIT_TEST(testLabelSeparatorExportDOCX);
CPPUNIT_TEST(testChartTitlePropertiesColorFillPPTX);
@@ -349,7 +351,8 @@ void Chart2ExportTest::registerNamespaces(xmlXPathContextPtr& pXmlXPathCtx)
{ "office", "urn:oasis:names:tc:opendocument:xmlns:office:1.0" },
{ "table", "urn:oasis:names:tc:opendocument:xmlns:table:1.0" },
{ "text", "urn:oasis:names:tc:opendocument:xmlns:text:1.0" },
- { "xlink", "http://www.w3c.org/1999/xlink" }
+ { "xlink", "http://www.w3c.org/1999/xlink" },
+ { "c15", "http://schemas.microsoft.com/office/drawing/2012/chart" }
};
for(size_t i = 0; i < SAL_N_ELEMENTS(aNamespaces); ++i)
{
@@ -2246,6 +2249,15 @@ void Chart2ExportTest::testCustomDataLabelMultipleSeries()
}
+void Chart2ExportTest::testLeaderLines()
+{
+ load("/chart2/qa/extras/data/xlsx/", "testTdf90749.xlsx");
+ xmlDocPtr pXmlDoc = parseExport("xl/charts/chart", "Calc Office Open XML");
+ CPPUNIT_ASSERT(pXmlDoc);
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:lineChart/c:ser[1]/c:dLbls/c:extLst/c:ext/c15:showLeaderLines", "val", "1");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:lineChart/c:ser[2]/c:dLbls/c:extLst/c:ext/c15:showLeaderLines", "val", "1");
+}
+
void Chart2ExportTest::testNumberFormatExportPPTX()
{
load("/chart2/qa/extras/data/pptx/", "tdf115859.pptx");
diff --git a/chart2/qa/extras/data/xlsx/testTdf90749.xlsx b/chart2/qa/extras/data/xlsx/testTdf90749.xlsx
new file mode 100644
index 000000000000..ca3bc806c03c
--- /dev/null
+++ b/chart2/qa/extras/data/xlsx/testTdf90749.xlsx
Binary files differ