summaryrefslogtreecommitdiffstats
path: root/chart2
diff options
context:
space:
mode:
authorJozsef Szakacs <zmx3@citromail.hu>2018-11-28 09:13:03 +0100
committerLászló Németh <nemeth@numbertext.org>2018-12-01 09:29:43 +0100
commit21399c7378be020e5e43fc07575f46e87e2d607b (patch)
tree3166d493b8bafacb34e437c0fa0e16288ca62e83 /chart2
parentconvert to range for (diff)
downloadcore-21399c7378be020e5e43fc07575f46e87e2d607b.tar.gz
core-21399c7378be020e5e43fc07575f46e87e2d607b.zip
tdf#121744 XLSX Export Combinated Chart (Column and Line)
Each of the Column and Line Chart creates it's own x and y Axes. So now the LineChart Exporter Method uses the same Axes as the BarChart. Thanks for the help: - Balazs Varga - Adam Kovacs Change-Id: Ie763cf831c2ce63ef204d1fdcbff634e7ca8fad5 Reviewed-on: https://gerrit.libreoffice.org/64146 Tested-by: Jenkins Reviewed-by: László Németh <nemeth@numbertext.org>
Diffstat (limited to 'chart2')
-rw-r--r--chart2/qa/extras/chart2export.cxx15
-rw-r--r--chart2/qa/extras/data/docx/tdf121744.docxbin0 -> 25221 bytes
2 files changed, 15 insertions, 0 deletions
diff --git a/chart2/qa/extras/chart2export.cxx b/chart2/qa/extras/chart2export.cxx
index e34f81a96daa..7ed7e6afaee9 100644
--- a/chart2/qa/extras/chart2export.cxx
+++ b/chart2/qa/extras/chart2export.cxx
@@ -123,6 +123,7 @@ public:
void testTdf116163();
void testTdf119029();
void testTdf108022();
+ void testTdf121744();
CPPUNIT_TEST_SUITE(Chart2ExportTest);
CPPUNIT_TEST(testErrorBarXLSX);
@@ -208,6 +209,7 @@ public:
CPPUNIT_TEST(testTdf116163);
CPPUNIT_TEST(testTdf119029);
CPPUNIT_TEST(testTdf108022);
+ CPPUNIT_TEST(testTdf121744);
CPPUNIT_TEST_SUITE_END();
protected:
@@ -1951,6 +1953,19 @@ void Chart2ExportTest::testTdf108022()
CPPUNIT_ASSERT(xChartDoc2.is());
}
+void Chart2ExportTest::testTdf121744()
+{
+ load("/chart2/qa/extras/data/docx/", "tdf121744.docx");
+ xmlDocPtr pXmlDoc = parseExport("word/charts/chart","Office Open XML Text");
+ CPPUNIT_ASSERT(pXmlDoc);
+
+ OUString XValueId = getXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:barChart/c:axId[1]", "val");
+ OUString YValueId = getXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:barChart/c:axId[2]", "val");
+
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:lineChart/c:axId[1]", "val", XValueId );
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:lineChart/c:axId[2]", "val", YValueId );
+}
+
CPPUNIT_TEST_SUITE_REGISTRATION(Chart2ExportTest);
CPPUNIT_PLUGIN_IMPLEMENT();
diff --git a/chart2/qa/extras/data/docx/tdf121744.docx b/chart2/qa/extras/data/docx/tdf121744.docx
new file mode 100644
index 000000000000..b5ff10098c6a
--- /dev/null
+++ b/chart2/qa/extras/data/docx/tdf121744.docx
Binary files differ