summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sc/source/filter/xml/XMLTableShapeResizer.cxx14
-rw-r--r--sc/source/filter/xml/XMLTableShapeResizer.hxx6
2 files changed, 8 insertions, 12 deletions
diff --git a/sc/source/filter/xml/XMLTableShapeResizer.cxx b/sc/source/filter/xml/XMLTableShapeResizer.cxx
index e71445f9a4d9..92bcc9388f10 100644
--- a/sc/source/filter/xml/XMLTableShapeResizer.cxx
+++ b/sc/source/filter/xml/XMLTableShapeResizer.cxx
@@ -121,30 +121,28 @@ void ScMyOLEFixer::FixupOLEs()
if (!aShapes.empty() && rImport.GetModel().is())
{
OUString sPersistName ("PersistName");
- ScMyToFixupOLEs::iterator aItr(aShapes.begin());
- ScMyToFixupOLEs::iterator aEndItr(aShapes.end());
ScDocument* pDoc(rImport.GetDocument());
ScXMLImport::MutexGuard aGuard(rImport);
- while (aItr != aEndItr)
+ for (auto const& shape : aShapes)
{
// #i78086# also call CreateChartListener for invalid position (anchored to sheet)
- if (!IsOLE(aItr->xShape))
+ if (!IsOLE(shape.xShape))
OSL_FAIL("Only OLEs should be in here now");
- if (IsOLE(aItr->xShape))
+ if (IsOLE(shape.xShape))
{
- uno::Reference < beans::XPropertySet > xShapeProps ( aItr->xShape, uno::UNO_QUERY );
+ uno::Reference < beans::XPropertySet > xShapeProps ( shape.xShape, uno::UNO_QUERY );
uno::Reference < beans::XPropertySetInfo > xShapeInfo(xShapeProps->getPropertySetInfo());
OUString sName;
if (pDoc && xShapeProps.is() && xShapeInfo.is() && xShapeInfo->hasPropertyByName(sPersistName) &&
(xShapeProps->getPropertyValue(sPersistName) >>= sName))
- CreateChartListener(pDoc, sName, aItr->sRangeList);
+ CreateChartListener(pDoc, sName, shape.sRangeList);
}
- aItr = aShapes.erase(aItr);
}
+ aShapes.clear();
}
}
diff --git a/sc/source/filter/xml/XMLTableShapeResizer.hxx b/sc/source/filter/xml/XMLTableShapeResizer.hxx
index be6a97b5e812..43401c1a9e6e 100644
--- a/sc/source/filter/xml/XMLTableShapeResizer.hxx
+++ b/sc/source/filter/xml/XMLTableShapeResizer.hxx
@@ -21,7 +21,7 @@
#define INCLUDED_SC_SOURCE_FILTER_XML_XMLTABLESHAPERESIZER_HXX
#include <com/sun/star/drawing/XShape.hpp>
-#include <list>
+#include <vector>
class ScXMLImport;
class ScChartListenerCollection;
@@ -33,12 +33,10 @@ struct ScMyToFixupOLE
OUString sRangeList;
};
-typedef std::list<ScMyToFixupOLE> ScMyToFixupOLEs;
-
class ScMyOLEFixer
{
ScXMLImport& rImport;
- ScMyToFixupOLEs aShapes;
+ std::vector<ScMyToFixupOLE> aShapes;
ScChartListenerCollection* pCollection;
void CreateChartListener(ScDocument* pDoc,