summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
Diffstat (limited to 'sc')
-rw-r--r--sc/source/core/data/drwlayer.cxx5
1 files changed, 1 insertions, 4 deletions
diff --git a/sc/source/core/data/drwlayer.cxx b/sc/source/core/data/drwlayer.cxx
index 25dfc5c7d6cc..04c7c008a4d6 100644
--- a/sc/source/core/data/drwlayer.cxx
+++ b/sc/source/core/data/drwlayer.cxx
@@ -1786,8 +1786,7 @@ void ScDrawLayer::CopyToClip( ScDocument* pClipDoc, SCTAB nTab, const tools::Rec
ScRange aClipRange = lcl_getClipRangeFromClipDoc(pClipDoc, nTab);
SdrObjListIter aIter( pSrcPage, SdrIterMode::Flat );
- SdrObject* pOldObject = aIter.Next();
- while (pOldObject)
+ while (SdrObject* pOldObject = aIter.Next())
{
// Catch objects where the object itself is inside the rectangle to be copied.
bool bObjectInArea = rRange.Contains(pOldObject->GetCurrentBoundRect());
@@ -1854,8 +1853,6 @@ void ScDrawLayer::CopyToClip( ScDocument* pClipDoc, SCTAB nTab, const tools::Rec
// charts are not updated
}
}
-
- pOldObject = aIter.Next();
}
}