[Libreoffice-commits] core.git: Branch 'libreoffice-6-3' - chart2/qa oox/source
Balazs Varga (via logerrit)
logerrit at kemper.freedesktop.org
Wed Jun 19 09:30:08 UTC 2019
chart2/qa/extras/chart2export.cxx | 14 ++++++++++++++
chart2/qa/extras/data/xlsx/tdf111824.xlsx |binary
oox/source/export/chartexport.cxx | 2 ++
3 files changed, 16 insertions(+)
New commits:
commit 21be3e19d84a88224ed7e3825b6e39c7ad0b17c2
Author: Balazs Varga <balazs.varga991 at gmail.com>
AuthorDate: Mon Jun 17 14:58:54 2019 +0200
Commit: Xisco Faulí <xiscofauli at libreoffice.org>
CommitDate: Wed Jun 19 11:29:32 2019 +0200
tdf#111824 Chart OOXML Export: fix Z axis labels
Export 3D barchart Z ("deep") axis properties into
<serAx> xml tag, as the OOXML Standard requires.
Change-Id: I8ee2282a28e9b4bdea6e96c96256f832b1a1aada
Reviewed-on: https://gerrit.libreoffice.org/74170
Tested-by: Jenkins
Reviewed-by: László Németh <nemeth at numbertext.org>
Tested-by: László Németh <nemeth at numbertext.org>
(cherry picked from commit 1b26a6e7a4e3865d1555fa0612845c765b114b49)
Reviewed-on: https://gerrit.libreoffice.org/74339
Reviewed-by: Balazs Varga <balazs.varga991 at gmail.com>
Reviewed-by: Xisco Faulí <xiscofauli at libreoffice.org>
diff --git a/chart2/qa/extras/chart2export.cxx b/chart2/qa/extras/chart2export.cxx
index 2dafbaac8017..e43822f4acfd 100644
--- a/chart2/qa/extras/chart2export.cxx
+++ b/chart2/qa/extras/chart2export.cxx
@@ -128,6 +128,7 @@ public:
void testChartTitlePropertiesBitmapFillPPTX();
void testxAxisLabelsRotation();
void testTdf116163();
+ void testTdf111824();
void testTdf119029();
void testTdf108022();
void testTdf121744();
@@ -224,6 +225,7 @@ public:
CPPUNIT_TEST(testChartTitlePropertiesBitmapFillPPTX);
CPPUNIT_TEST(testxAxisLabelsRotation);
CPPUNIT_TEST(testTdf116163);
+ CPPUNIT_TEST(testTdf111824);
CPPUNIT_TEST(testTdf119029);
CPPUNIT_TEST(testTdf108022);
CPPUNIT_TEST(testTdf121744);
@@ -2081,6 +2083,18 @@ void Chart2ExportTest::testTdf116163()
assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:catAx/c:txPr/a:bodyPr", "rot", "-5400000");
}
+void Chart2ExportTest::testTdf111824()
+{
+ load("/chart2/qa/extras/data/xlsx/", "tdf111824.xlsx");
+ xmlDocPtr pXmlDoc = parseExport("xl/charts/chart", "Calc Office Open XML");
+ CPPUNIT_ASSERT(pXmlDoc);
+
+ // Collect 3D barchart Z axID
+ OUString zAxisIdOf3DBarchart = getXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:bar3DChart/c:axId[3]", "val");
+ // 3D barchart Z axis properties should be in a serAx OOXML tag instead of catAx
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:serAx/c:axId", "val", zAxisIdOf3DBarchart);
+}
+
void Chart2ExportTest::testTdf119029()
{
load("/chart2/qa/extras/data/odp/", "tdf119029.odp");
diff --git a/chart2/qa/extras/data/xlsx/tdf111824.xlsx b/chart2/qa/extras/data/xlsx/tdf111824.xlsx
new file mode 100644
index 000000000000..ae86756c47ee
Binary files /dev/null and b/chart2/qa/extras/data/xlsx/tdf111824.xlsx differ
diff --git a/oox/source/export/chartexport.cxx b/oox/source/export/chartexport.cxx
index 95962aa1d656..ffb7f8042179 100644
--- a/oox/source/export/chartexport.cxx
+++ b/oox/source/export/chartexport.cxx
@@ -2424,6 +2424,8 @@ void ChartExport::exportAxis(const AxisIdPair& rAxisIdPair)
nAxisType = XML_valAx;
else if( eChartType == chart::TYPEID_STOCK )
nAxisType = XML_dateAx;
+ else if( eChartType == chart::TYPEID_BAR )
+ nAxisType = XML_serAx;
// FIXME: axPos, need to check axis direction
sAxPos = "b";
break;
More information about the Libreoffice-commits
mailing list