Kaydet (Commit) ede99e0d authored tarafından Ravindra Vidhate's avatar Ravindra Vidhate Kaydeden (comit) Markus Mohrhard

fdo#75975 crash while saving the DOCX file containing charts

1. Open DOCX file containing Charts
2. Save this file into DOCX format.
3. LO crashed while saving/exporting to DOCX format.

Conflicts:
	chart2/qa/extras/chart2export.cxx

Change-Id: I14d4f2c214ce3513b4bd14831771d72498e4486d
üst 76aa23c5
...@@ -50,6 +50,7 @@ public: ...@@ -50,6 +50,7 @@ public:
void testPieChartDataLabels(); void testPieChartDataLabels();
void testSeriesIdxOrder(); void testSeriesIdxOrder();
void testErrorBarDataRangeODS(); void testErrorBarDataRangeODS();
void testChartCrash();
CPPUNIT_TEST_SUITE(Chart2ExportTest); CPPUNIT_TEST_SUITE(Chart2ExportTest);
CPPUNIT_TEST(test); CPPUNIT_TEST(test);
...@@ -72,6 +73,7 @@ public: ...@@ -72,6 +73,7 @@ public:
CPPUNIT_TEST(testPieChartDataLabels); CPPUNIT_TEST(testPieChartDataLabels);
CPPUNIT_TEST(testSeriesIdxOrder); CPPUNIT_TEST(testSeriesIdxOrder);
CPPUNIT_TEST(testErrorBarDataRangeODS); CPPUNIT_TEST(testErrorBarDataRangeODS);
CPPUNIT_TEST(testChartCrash);
CPPUNIT_TEST_SUITE_END(); CPPUNIT_TEST_SUITE_END();
protected: protected:
...@@ -653,6 +655,13 @@ void Chart2ExportTest::testErrorBarDataRangeODS() ...@@ -653,6 +655,13 @@ void Chart2ExportTest::testErrorBarDataRangeODS()
CPPUNIT_ASSERT_EQUAL(OUString("$Sheet1.$C$1:$C$3"), aNegRange); CPPUNIT_ASSERT_EQUAL(OUString("$Sheet1.$C$1:$C$3"), aNegRange);
} }
void Chart2ExportTest::testChartCrash()
{
load("/chart2/qa/extras/data/docx/", "FDO75975.docx");
xmlDocPtr pXmlDoc = parseExport("word/charts/chart", "Office Open XML Text");
CPPUNIT_ASSERT(pXmlDoc);
}
CPPUNIT_TEST_SUITE_REGISTRATION(Chart2ExportTest); CPPUNIT_TEST_SUITE_REGISTRATION(Chart2ExportTest);
CPPUNIT_PLUGIN_IMPLEMENT(); CPPUNIT_PLUGIN_IMPLEMENT();
......
...@@ -2307,7 +2307,7 @@ void ChartExport::_exportAxis( ...@@ -2307,7 +2307,7 @@ void ChartExport::_exportAxis(
{ {
pFS->startElement( FSNS( XML_c, XML_minorGridlines ), pFS->startElement( FSNS( XML_c, XML_minorGridlines ),
FSEND ); FSEND );
exportShapeProps( xMajorGrid ); exportShapeProps( xMinorGrid );
pFS->endElement( FSNS( XML_c, XML_minorGridlines ) ); pFS->endElement( FSNS( XML_c, XML_minorGridlines ) );
} }
......
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