[Libreoffice-commits] core.git: 2 commits - chart2/qa oox/source
Caolán McNamara
caolanm at redhat.com
Wed Sep 9 19:56:29 PDT 2015
chart2/qa/extras/chart2export.cxx | 9 +++++++++
chart2/qa/extras/data/odt/axis-position.odt |binary
oox/source/export/chartexport.cxx | 12 +++++++++++-
3 files changed, 20 insertions(+), 1 deletion(-)
New commits:
commit 694419d813c14f6135aa4463d77f72c3a24a5cc5
Author: Caolán McNamara <caolanm at redhat.com>
Date: Thu Sep 10 04:16:06 2015 +0200
Related: tdf#93676 in msword chart appears with axis positioned between ticks
Change-Id: Ibd16d255a45a220faf7681a74785549c32969f78
diff --git a/chart2/qa/extras/chart2export.cxx b/chart2/qa/extras/chart2export.cxx
index 1e73718..7004e97 100644
--- a/chart2/qa/extras/chart2export.cxx
+++ b/chart2/qa/extras/chart2export.cxx
@@ -99,6 +99,7 @@ public:
void testBarChartVaryColorsXLSX();
void testMultipleAxisXLSX();
void testAxisTitleRotationXLSX();
+ void testAxisCrossBetweenXSLX();
CPPUNIT_TEST_SUITE(Chart2ExportTest);
CPPUNIT_TEST(testErrorBarXLSX);
@@ -162,6 +163,7 @@ public:
CPPUNIT_TEST(testBarChartVaryColorsXLSX);
CPPUNIT_TEST(testMultipleAxisXLSX);
CPPUNIT_TEST(testAxisTitleRotationXLSX);
+ CPPUNIT_TEST(testAxisCrossBetweenXSLX);
CPPUNIT_TEST_SUITE_END();
protected:
@@ -1473,6 +1475,13 @@ void Chart2ExportTest::testAxisTitleRotationXLSX()
assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:valAx/c:title/c:tx/c:rich/a:bodyPr", "rot", "0");
}
+void Chart2ExportTest::testAxisCrossBetweenXSLX()
+{
+ load("/chart2/qa/extras/data/odt/", "axis-position.odt");
+ xmlDocPtr pXmlDoc = parseExport("word/charts/chart", "Office Open XML Text");
+ assertXPath(pXmlDoc, "(//c:crossBetween)[1]", "val", "midCat");
+}
+
CPPUNIT_TEST_SUITE_REGISTRATION(Chart2ExportTest);
CPPUNIT_PLUGIN_IMPLEMENT();
diff --git a/chart2/qa/extras/data/odt/axis-position.odt b/chart2/qa/extras/data/odt/axis-position.odt
new file mode 100644
index 0000000..35ea152
Binary files /dev/null and b/chart2/qa/extras/data/odt/axis-position.odt differ
diff --git a/oox/source/export/chartexport.cxx b/oox/source/export/chartexport.cxx
index 2aab1ae..7cbd8a9 100644
--- a/oox/source/export/chartexport.cxx
+++ b/oox/source/export/chartexport.cxx
@@ -2896,6 +2896,17 @@ void ChartExport::_exportAxis(
FSEND );
}
+ // TODO: MSO does not support random axis cross position for
+ // category axis, so we ideally need an algorithm that decides
+ // when to map the crossing to the tick mark and when to the
+ // middle of the category
+ if (nAxisType == XML_valAx)
+ {
+ pFS->singleElement( FSNS( XML_c, XML_crossBetween ),
+ XML_val, "midCat",
+ FSEND );
+ }
+
// majorUnit
bool bAutoStepMain = false;
if(GetProperty( xAxisProp, "AutoStepMain" ) )
commit c70d012935659606591ad50346c252bb234994ea
Author: Markus Mohrhard <markus.mohrhard at googlemail.com>
Date: Thu Sep 10 04:12:22 2015 +0200
remove old comment
Change-Id: Ibf40c2c2f35832114eb74d32f05e87a5cfe7d810
diff --git a/oox/source/export/chartexport.cxx b/oox/source/export/chartexport.cxx
index 5438db3..2aab1ae 100644
--- a/oox/source/export/chartexport.cxx
+++ b/oox/source/export/chartexport.cxx
@@ -2949,7 +2949,6 @@ void ChartExport::_exportAxis(
}
}
}
- // TODO: text properties
pFS->endElement( FSNS( XML_c, nAxisType ) );
}
More information about the Libreoffice-commits
mailing list