summaryrefslogtreecommitdiff
path: root/chart2/qa
diff options
context:
space:
mode:
authorTünde Tóth <toth.tunde@nisz.hu>2020-08-14 13:45:38 +0200
committerLászló Németh <nemeth@numbertext.org>2020-08-19 10:31:51 +0200
commita8950d08a33e7aded31d4591c98a03d1edf8c5a4 (patch)
tree7b8d50403c2207c25e6dd5ff75e1f25297389ecf /chart2/qa
parent6724040e61c1efbee0b1456e3480b1e7b0827732 (diff)
tdf#123647 Chart XLSX export: fix missing empty chart
Save empty chart as empty bar chart, because a chart without chart type is invalid. Change-Id: Ieb9cc4300070b5280565fe814ba0343640dfff0a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100844 Tested-by: Jenkins 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.cxx10
-rw-r--r--chart2/qa/extras/data/xlsx/empty_chart.xlsxbin0 -> 13370 bytes
2 files changed, 10 insertions, 0 deletions
diff --git a/chart2/qa/extras/chart2export.cxx b/chart2/qa/extras/chart2export.cxx
index 754768880054..948aaec6700a 100644
--- a/chart2/qa/extras/chart2export.cxx
+++ b/chart2/qa/extras/chart2export.cxx
@@ -174,6 +174,7 @@ public:
void testTdf132594();
void testTdf134255();
void testTdf134977();
+ void testTdf123647();
CPPUNIT_TEST_SUITE(Chart2ExportTest);
CPPUNIT_TEST(testErrorBarXLSX);
@@ -311,6 +312,7 @@ public:
CPPUNIT_TEST(testTdf132594);
CPPUNIT_TEST(testTdf134255);
CPPUNIT_TEST(testTdf134977);
+ CPPUNIT_TEST(testTdf123647);
CPPUNIT_TEST_SUITE_END();
@@ -2861,6 +2863,14 @@ void Chart2ExportTest::testTdf134977()
assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:barChart/c:ser/c:dLbls/c:dLbl/c:tx/c:rich/a:p/a:r/a:rPr", "sz", "900");
}
+void Chart2ExportTest::testTdf123647()
+{
+ load("/chart2/qa/extras/data/xlsx/", "empty_chart.xlsx");
+ xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart","Calc Office Open XML");
+ CPPUNIT_ASSERT(pXmlDoc);
+
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:barChart", 1);
+}
CPPUNIT_TEST_SUITE_REGISTRATION(Chart2ExportTest);
CPPUNIT_PLUGIN_IMPLEMENT();
diff --git a/chart2/qa/extras/data/xlsx/empty_chart.xlsx b/chart2/qa/extras/data/xlsx/empty_chart.xlsx
new file mode 100644
index 000000000000..449902146af6
--- /dev/null
+++ b/chart2/qa/extras/data/xlsx/empty_chart.xlsx
Binary files differ