Kaydet (Commit) 10654c03 authored tarafından Caolán McNamara's avatar Caolán McNamara

Related: tdf#93676 in msword chart appears with axis positioned between ticks

not on them

Change-Id: I048f86270ee12a38967c81e832619fd5018db6b1
üst cd631a16
......@@ -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();
......
......@@ -2806,6 +2806,13 @@ void ChartExport::_exportAxis(
exportTextProps(xAxisProp);
if (nAxisType == XML_valAx)
{
pFS->singleElement( FSNS( XML_c, XML_crossBetween ),
XML_val, "midCat",
FSEND );
}
pFS->singleElement( FSNS( XML_c, XML_crossAx ),
XML_val, I32S( rAxisIdPair.nCrossAx ),
FSEND );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment