From a9bcd8a0c0afc4baa53570f7072e64b5ba72f89b Mon Sep 17 00:00:00 2001 From: Mike Kaganski Date: Sat, 2 Mar 2024 06:57:24 +0100 Subject: Simplify a bit Change-Id: I5909dfc0f19b13d53d370f78a5e2853b95f0c1a9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164201 Tested-by: Jenkins Reviewed-by: Mike Kaganski --- sc/source/core/data/drwlayer.cxx | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'sc') diff --git a/sc/source/core/data/drwlayer.cxx b/sc/source/core/data/drwlayer.cxx index 11a2a2a997fb..480b779918d5 100644 --- a/sc/source/core/data/drwlayer.cxx +++ b/sc/source/core/data/drwlayer.cxx @@ -1784,8 +1784,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()); @@ -1852,8 +1851,6 @@ void ScDrawLayer::CopyToClip( ScDocument* pClipDoc, SCTAB nTab, const tools::Rec // charts are not updated } } - - pOldObject = aIter.Next(); } } -- cgit