diff options
author | Szymon Kłos <szymon.klos@collabora.com> | 2017-09-20 16:29:54 +0200 |
---|---|---|
committer | Szymon Kłos <szymon.klos@collabora.com> | 2017-09-23 17:43:20 +0200 |
commit | c0a61832965aff202d72a2bf51556c5c6b6d594b (patch) | |
tree | 8e6483ba355010202911dce4d831baad0eaeb503 /oox | |
parent | 1264964de70c0b1d9442005f731f14c4635c4579 (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 60bdc4d8c6c7..bbf0cf113f14 100644 --- a/oox/source/export/chartexport.cxx +++ b/oox/source/export/chartexport.cxx @@ -377,12 +377,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(); @@ -434,7 +428,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(); @@ -448,8 +442,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 b3d42048ec6d..05ea273d2612 100644 --- a/oox/source/export/shapes.cxx +++ b/oox/source/export/shapes.cxx @@ -1935,7 +1935,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; } |