summaryrefslogtreecommitdiff
path: root/xmloff
diff options
context:
space:
mode:
Diffstat (limited to 'xmloff')
-rw-r--r--xmloff/source/draw/shapeimport.cxx9
1 files changed, 3 insertions, 6 deletions
diff --git a/xmloff/source/draw/shapeimport.cxx b/xmloff/source/draw/shapeimport.cxx
index b2614a144ea6..c6db306d632e 100644
--- a/xmloff/source/draw/shapeimport.cxx
+++ b/xmloff/source/draw/shapeimport.cxx
@@ -837,14 +837,11 @@ void ShapeSortContext::popGroupAndSort()
sal_Int32 nIndex = 0;
for (ZOrderHint& rHint : maZOrderList)
{
- while( nIndex < rHint.nShould && !maUnsortedList.empty() )
+ for (vector<ZOrderHint>::iterator aIt = maUnsortedList.begin(); aIt != maUnsortedList.end() && nIndex < rHint.nShould; )
{
- auto it = maUnsortedList.begin();
+ moveShape( (*aIt).nIs, nIndex++ );
+ aIt = maUnsortedList.erase(aIt);
- ZOrderHint aGapHint(*it);
- maUnsortedList.erase(it);
-
- moveShape( aGapHint.nIs, nIndex++ );
}
if(rHint.nIs != nIndex )