diff options
author | Szymon Kłos <szymon.klos@collabora.com> | 2017-09-20 16:29:54 +0200 |
---|---|---|
committer | Andras Timar <andras.timar@collabora.com> | 2017-09-26 12:29:50 +0200 |
commit | 38c924c55e5b4fe35c53e3b0ec6c07f4dad80320 (patch) | |
tree | 5bf8f05bbd3981be702123b51aebeafc4e3ab108 /oox | |
parent | 7ec18dc333ef110c842f0b153c01cf18b864ba8c (diff) |
tdf#112089 add charts to the ShapeMap
Charts weren't added to the collection what resulted
in missing ids during export (target field).
Change-Id: Ie96a4e33a52c5448342a3c3dcec0d8e8b244e270
Reviewed-on: https://gerrit.libreoffice.org/42552
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
Diffstat (limited to 'oox')
-rw-r--r-- | oox/source/export/chartexport.cxx | 10 | ||||
-rw-r--r-- | oox/source/export/shapes.cxx | 2 |
2 files changed, 2 insertions, 10 deletions
diff --git a/oox/source/export/chartexport.cxx b/oox/source/export/chartexport.cxx index 41faecacdbdb..b1e9368d7c7a 100644 --- a/oox/source/export/chartexport.cxx +++ b/oox/source/export/chartexport.cxx @@ -452,12 +452,6 @@ ChartExport::ChartExport( sal_Int32 nXmlNamespace, FSHelperPtr pFS, Reference< f { } -sal_Int32 ChartExport::GetChartID( ) -{ - sal_Int32 nID = GetFB()->GetUniqueId(); - return nID; -} - sal_Int32 ChartExport::getChartType( ) { OUString sChartType = mxDiagram->getDiagramType(); @@ -509,7 +503,7 @@ OUString ChartExport::parseFormula( const OUString& rRange ) return aResult; } -void ChartExport::WriteChartObj( const Reference< XShape >& xShape, sal_Int32 nChartCount ) +void ChartExport::WriteChartObj( const Reference< XShape >& xShape, sal_Int32 nID, sal_Int32 nChartCount ) { FSHelperPtr pFS = GetFS(); @@ -523,8 +517,6 @@ void ChartExport::WriteChartObj( const Reference< XShape >& xShape, sal_Int32 nC if (xNamed.is()) sName = xNamed->getName(); - sal_Int32 nID = GetChartID(); - pFS->singleElementNS( mnXmlNamespace, XML_cNvPr, XML_id, I32S( nID ), XML_name, USS( sName ), diff --git a/oox/source/export/shapes.cxx b/oox/source/export/shapes.cxx index c9661684535e..871873c968b1 100644 --- a/oox/source/export/shapes.cxx +++ b/oox/source/export/shapes.cxx @@ -1941,7 +1941,7 @@ ShapeExport& ShapeExport::WriteOLE2Shape( const Reference< XShape >& xShape ) Reference< XModel > xModel( xChartDoc, UNO_QUERY ); ChartExport aChartExport( mnXmlNamespace, GetFS(), xModel, GetFB(), GetDocumentType() ); static sal_Int32 nChartCount = 0; - aChartExport.WriteChartObj( xShape, ++nChartCount ); + aChartExport.WriteChartObj( xShape, GetNewShapeID( xShape ), ++nChartCount ); return *this; } |