summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--xmloff/source/draw/shapeexport.cxx6
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" );
}