diff options
Diffstat (limited to 'sfx2/source/control/thumbnailviewacc.cxx')
-rw-r--r-- | sfx2/source/control/thumbnailviewacc.cxx | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/sfx2/source/control/thumbnailviewacc.cxx b/sfx2/source/control/thumbnailviewacc.cxx index fc4311536262..21b15be4d347 100644 --- a/sfx2/source/control/thumbnailviewacc.cxx +++ b/sfx2/source/control/thumbnailviewacc.cxx @@ -307,18 +307,17 @@ void SAL_CALL ThumbnailViewAcc::removeAccessibleEventListener( const uno::Refere if( rxListener.is() ) { - std::vector< uno::Reference< accessibility::XAccessibleEventListener > >::iterator aIter = mxEventListeners.begin(); - bool bFound = false; + std::vector< uno::Reference< accessibility::XAccessibleEventListener > >::const_iterator aEnd = mxEventListeners.end(); - while( !bFound && ( aIter != mxEventListeners.end() ) ) + for (std::vector< uno::Reference< accessibility::XAccessibleEventListener > >::iterator aIter = mxEventListeners.begin(); + aIter != aEnd; + ++aIter) { if( *aIter == rxListener ) { mxEventListeners.erase( aIter ); - bFound = true; + break; } - else - ++aIter; } } } |