summaryrefslogtreecommitdiff
path: root/chart2
diff options
context:
space:
mode:
authorBalazs Varga <balazs.varga991@gmail.com>2019-11-07 10:31:49 +0100
committerLászló Németh <nemeth@numbertext.org>2019-11-08 12:33:31 +0100
commit271bdc3469b694c113e4449750866dee032e2d34 (patch)
tree357ae20751f6ad2eb3db5767db7781190888ee15 /chart2
parent63f7efe613f4f7436eddd90933c1916d2e689648 (diff)
tdf#128633 Chart OOXML Export: Fix position of bar in charts
Fix export of c:crossBetween tag if the category axis is deleted. Regression from commit: e0b0502516a10181bbd1737b93b38b2bba4c98e8 (tdf#128016 Chart OOXML Import: fix duplicated category labels) Change-Id: I46ab45f3ba4f3d0fdde3ddf017a7f512b6e2e403 Reviewed-on: https://gerrit.libreoffice.org/82194 Tested-by: Jenkins Reviewed-by: László Németh <nemeth@numbertext.org> Tested-by: László Németh <nemeth@numbertext.org>
Diffstat (limited to 'chart2')
-rw-r--r--chart2/qa/extras/chart2export.cxx11
-rw-r--r--chart2/qa/extras/data/xlsx/tdf128633.xlsxbin0 -> 15018 bytes
2 files changed, 11 insertions, 0 deletions
diff --git a/chart2/qa/extras/chart2export.cxx b/chart2/qa/extras/chart2export.cxx
index 5f2b9ee6825b..dd07808b1d05 100644
--- a/chart2/qa/extras/chart2export.cxx
+++ b/chart2/qa/extras/chart2export.cxx
@@ -123,6 +123,7 @@ public:
void testCombinedChartSecondaryAxisXLSX();
void testCombinedChartSecondaryAxisODS();
void testCrossBetweenXLSX();
+ void testCrossBetweenWithDeletedAxis();
void testCrossBetweenODS();
void testAxisTitleRotationXLSX();
void testAxisTitlePositionDOCX();
@@ -231,6 +232,7 @@ public:
CPPUNIT_TEST(testCombinedChartSecondaryAxisXLSX);
CPPUNIT_TEST(testCombinedChartSecondaryAxisODS);
CPPUNIT_TEST(testCrossBetweenXLSX);
+ CPPUNIT_TEST(testCrossBetweenWithDeletedAxis);
CPPUNIT_TEST(testCrossBetweenODS);
CPPUNIT_TEST(testAxisTitleRotationXLSX);
CPPUNIT_TEST(testAxisTitlePositionDOCX);
@@ -1944,6 +1946,15 @@ void Chart2ExportTest::testCrossBetweenXLSX()
assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:valAx/c:crossBetween", "val", "between");
}
+void Chart2ExportTest::testCrossBetweenWithDeletedAxis()
+{
+ // Original file was created with MS Office (the category axis is deleted in the file)
+ load("/chart2/qa/extras/data/xlsx/", "tdf128633.xlsx");
+ xmlDocPtr pXmlDoc = parseExport("xl/charts/chart", "Calc Office Open XML");
+ CPPUNIT_ASSERT(pXmlDoc);
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:valAx/c:crossBetween", "val", "between");
+}
+
void Chart2ExportTest::testCrossBetweenODS()
{
// Original file was created with LibreOffice
diff --git a/chart2/qa/extras/data/xlsx/tdf128633.xlsx b/chart2/qa/extras/data/xlsx/tdf128633.xlsx
new file mode 100644
index 000000000000..fa186895d65e
--- /dev/null
+++ b/chart2/qa/extras/data/xlsx/tdf128633.xlsx
Binary files differ