summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/oox/export/drawingml.hxx1
-rw-r--r--sc/source/filter/excel/xeescher.cxx3
2 files changed, 2 insertions, 2 deletions
diff --git a/include/oox/export/drawingml.hxx b/include/oox/export/drawingml.hxx
index 5dc243e8536c..59c9ace37113 100644
--- a/include/oox/export/drawingml.hxx
+++ b/include/oox/export/drawingml.hxx
@@ -365,6 +365,7 @@ public:
static sal_Int32 getNewDrawingUniqueId() { return ++mnDrawingMLCount; }
static sal_Int32 getNewVMLUniqueId() { return ++mnVmlCount; }
+ static sal_Int32 getNewChartUniqueId() { return ++mnChartCount; }
// A Helper to decide the script type for given text in order to call WriteRunProperties.
static sal_Int16 GetScriptType(const OUString& rStr);
diff --git a/sc/source/filter/excel/xeescher.cxx b/sc/source/filter/excel/xeescher.cxx
index 4e9491cc94c3..44e1225cf17c 100644
--- a/sc/source/filter/excel/xeescher.cxx
+++ b/sc/source/filter/excel/xeescher.cxx
@@ -1604,8 +1604,7 @@ void XclExpChartObj::SaveXml( XclExpXmlStream& rStrm )
ChartExport aChartExport(XML_xdr, pDrawing, GetChartDoc(), &rStrm, drawingml::DOCUMENT_XLSX);
auto pURLTransformer = std::make_shared<ScURLTransformer>(*mpDoc);
aChartExport.SetURLTranslator(pURLTransformer);
- static sal_Int32 nChartCount = 0;
- nChartCount++;
+ sal_Int32 nChartCount = oox::drawingml::DrawingML::getNewChartUniqueId();
sal_Int32 nID = rStrm.GetUniqueId();
aChartExport.WriteChartObj( mxShape, nID, nChartCount );
// TODO: get the correcto chart number