diff options
author | Arkadiy Illarionov <qarkai@gmail.com> | 2018-12-08 18:27:03 +0300 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-12-10 10:18:46 +0100 |
commit | 7c7ec84c26a3a92635811e4cf491b7e21796e1fa (patch) | |
tree | a53b2dfcb3c717a4c13c4ebe7d5c6b5165054272 /sd/source/ui/slideshow/slideshowimpl.cxx | |
parent | 86abd3ec30bac181df228569b70aaf9086ed5f4a (diff) |
Simplify containers iterations in sd/source/ui/[s-v]*
Use range-based loop or replace with STL functions
Change-Id: I13c9982ad1e1aadbc6189068c5a5e29dfb171e97
Reviewed-on: https://gerrit.libreoffice.org/64811
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sd/source/ui/slideshow/slideshowimpl.cxx')
-rw-r--r-- | sd/source/ui/slideshow/slideshowimpl.cxx | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/sd/source/ui/slideshow/slideshowimpl.cxx b/sd/source/ui/slideshow/slideshowimpl.cxx index dc9549be6888..1fe733db069a 100644 --- a/sd/source/ui/slideshow/slideshowimpl.cxx +++ b/sd/source/ui/slideshow/slideshowimpl.cxx @@ -1183,13 +1183,10 @@ void SlideshowImpl::removeShapeEvents() { if( mxShow.is() && mxListenerProxy.is() ) try { - WrappedShapeEventImplMap::iterator aIter; - const WrappedShapeEventImplMap::iterator aEnd( maShapeEventMap.end() ); - - for( aIter = maShapeEventMap.begin(); aIter != aEnd; ++aIter ) + for( const auto& rEntry : maShapeEventMap ) { - mxListenerProxy->removeShapeEventListener( (*aIter).first ); - mxShow->setShapeCursor( (*aIter).first, awt::SystemPointer::ARROW ); + mxListenerProxy->removeShapeEventListener( rEntry.first ); + mxShow->setShapeCursor( rEntry.first, awt::SystemPointer::ARROW ); } maShapeEventMap.clear(); @@ -2283,11 +2280,9 @@ void SlideshowImpl::createSlideList( bool bAll, const OUString& rPresSlide ) mpSlideController->insertSlideNumber( static_cast<sal_uInt16>(nSlide) ); } - sal_Int32 nSlideIndex = 0; - for( SdCustomShow::PageVec::iterator it = pCustomShow->PagesVector().begin(); - it != pCustomShow->PagesVector().end(); ++it, nSlideIndex++ ) + for( const auto& rpPage : pCustomShow->PagesVector() ) { - const sal_uInt16 nSdSlide = ( (*it)->GetPageNum() - 1 ) / 2; + const sal_uInt16 nSdSlide = ( rpPage->GetPageNum() - 1 ) / 2; if( ! mpDoc->GetSdPage( nSdSlide, PageKind::Standard )->IsExcluded()) mpSlideController->insertSlideNumber( nSdSlide ); |