summaryrefslogtreecommitdiff
path: root/svx/source/unodraw
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2023-06-01 14:22:57 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2023-06-11 18:24:29 +0200
commit7c66fc45239d2589e90fd694d54b3ff826b1bd15 (patch)
tree064a3ba4eaeaf05ae13ebcebfc6d8beb9234d8f2 /svx/source/unodraw
parent3a6d360b5e585b8e92cc0d58d5fbc497448e11fb (diff)
use internal iterator for SfxBroadcaster
So we can avoid exposing the internal listener vector. (which allows further optimisations) Change-Id: If288141a37314dcc01d203029dc51c71ec2b7f54 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152857 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'svx/source/unodraw')
-rw-r--r--svx/source/unodraw/unoshap2.cxx15
1 files changed, 7 insertions, 8 deletions
diff --git a/svx/source/unodraw/unoshap2.cxx b/svx/source/unodraw/unoshap2.cxx
index b6dd018e6474..8ae6879ef337 100644
--- a/svx/source/unodraw/unoshap2.cxx
+++ b/svx/source/unodraw/unoshap2.cxx
@@ -260,15 +260,14 @@ void SAL_CALL SvxShapeGroup::remove( const uno::Reference< drawing::XShape >& xS
// #i29181#
// If the SdrObject which is about to be deleted is in any selection,
// deselect it first.
- SdrViewIter aIter( pSdrShape );
-
- for ( SdrView* pView = aIter.FirstView(); pView; pView = aIter.NextView() )
- {
- if(SAL_MAX_SIZE != pView->TryToFindMarkedObject(pSdrShape))
+ SdrViewIter::ForAllViews( pSdrShape,
+ [&pSdrShape] (SdrView* pView)
{
- pView->MarkObj(pSdrShape, pView->GetSdrPageView(), true);
- }
- }
+ if(SAL_MAX_SIZE != pView->TryToFindMarkedObject(pSdrShape))
+ {
+ pView->MarkObj(pSdrShape, pView->GetSdrPageView(), true);
+ }
+ });
rList.NbcRemoveObject( nObjNum );
}