diff options
author | YogeshBharate <yogesh.bharate@synerzip.com> | 2014-02-21 11:03:35 +0530 |
---|---|---|
committer | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2014-03-03 13:41:08 +0100 |
commit | 9ca4fa05eb5ec7d0d7c3f4a83489013e140d2f0b (patch) | |
tree | 2af14d2d09e6fc4173a7978f61e9794e15bef884 /oox | |
parent | 4f7b96886ec2e98f270a9ec3c3509cd523fce7cc (diff) |
fdo#74826: File corruption-Issue related to Series idx & order val.
Problem Description:
- If the document contains more than one charts together.
ex.Bar & Line chart
- In that case, LO writes idx & order val equal to 0,
instead of 1 for second chart series.
- After roundtrip, the document get corrupted.
Implementation:
- Added varible to take the series count
in case of multiple chart.
Note:
- Some of the UT's are failing when --enable-dbgutil is enabled.
Change-Id: I40606b4d69026939fa19ae534dd7b2bb36ec97fc
Diffstat (limited to 'oox')
-rw-r--r-- | oox/source/export/chartexport.cxx | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/oox/source/export/chartexport.cxx b/oox/source/export/chartexport.cxx index 4250cb72dfbd..9f8df564c5b3 100644 --- a/oox/source/export/chartexport.cxx +++ b/oox/source/export/chartexport.cxx @@ -438,6 +438,7 @@ sal_Int32 lcl_generateRandomValue() ChartExport::ChartExport( sal_Int32 nXmlNamespace, FSHelperPtr pFS, Reference< frame::XModel >& xModel, XmlFilterBase* pFB, DocumentType eDocumentType ) : DrawingML( pFS, pFB, eDocumentType ) , mnXmlNamespace( nXmlNamespace ) + , mnSeriesCount(0) , maFraction( 1, 576 ) , mxChartModel( xModel ) , mbHasCategoryLabels( sal_False ) @@ -1041,9 +1042,11 @@ void ChartExport::exportPlotArea( ) aCooSysSeq( xBCooSysCnt->getCoordinateSystems()); for( sal_Int32 nCSIdx=0; nCSIdx<aCooSysSeq.getLength(); ++nCSIdx ) { + Reference< chart2::XChartTypeContainer > xCTCnt( aCooSysSeq[nCSIdx], uno::UNO_QUERY ); if( ! xCTCnt.is()) continue; + mnSeriesCount=0; Sequence< Reference< chart2::XChartType > > aCTSeq( xCTCnt->getChartTypes()); for( sal_Int32 nCTIdx=0; nCTIdx<aCTSeq.getLength(); ++nCTIdx ) { @@ -1689,10 +1692,10 @@ void ChartExport::exportSeries( Reference< chart2::XChartType > xChartType, sal_ // TODO: idx and order pFS->singleElement( FSNS( XML_c, XML_idx ), - XML_val, I32S(nSeriesIdx), + XML_val, I32S(mnSeriesCount), FSEND ); pFS->singleElement( FSNS( XML_c, XML_order ), - XML_val, I32S(nSeriesIdx), + XML_val, I32S(mnSeriesCount++), FSEND ); // export label |