diff options
author | Noel Grandin <noelgrandin@gmail.com> | 2023-04-17 19:25:26 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2023-04-18 07:51:55 +0200 |
commit | 94e505b9ffbeb1695393d5dea0da84a0bf887fba (patch) | |
tree | a06f800f6404c0bf91722ce7e68db5092aaa4665 /xmloff/source/draw | |
parent | b1684730ccbbca83df4dcb07d4759eebebbc4d66 (diff) |
no need to perform lookup twice in XMLShapeExport::seekShapes
Change-Id: I833da530fdc43233e14482a17a60beadb6ef6043
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150530
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'xmloff/source/draw')
-rw-r--r-- | xmloff/source/draw/shapeexport.cxx | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/xmloff/source/draw/shapeexport.cxx b/xmloff/source/draw/shapeexport.cxx index 056c3ce98267..94b7ad8e78a0 100644 --- a/xmloff/source/draw/shapeexport.cxx +++ b/xmloff/source/draw/shapeexport.cxx @@ -1092,11 +1092,9 @@ void XMLShapeExport::seekShapes( const uno::Reference< drawing::XShapes >& xShap maCurrentShapesIter = maShapesInfos.find( xShapes ); if( maCurrentShapesIter == maShapesInfos.end() ) { - ImplXMLShapeExportInfoVector aNewInfoVector; - aNewInfoVector.resize( static_cast<ShapesInfos::size_type>(xShapes->getCount()) ); - maShapesInfos[ xShapes ] = aNewInfoVector; + auto itPair = maShapesInfos.emplace( xShapes, ImplXMLShapeExportInfoVector( static_cast<ShapesInfos::size_type>(xShapes->getCount()) ) ); - maCurrentShapesIter = maShapesInfos.find( xShapes ); + maCurrentShapesIter = itPair.first; SAL_WARN_IF( maCurrentShapesIter == maShapesInfos.end(), "xmloff", "XMLShapeExport::seekShapes(): insert into stl::map failed" ); } |