diff options
author | Julien Nabet <serval2412@yahoo.fr> | 2017-11-11 21:07:56 +0100 |
---|---|---|
committer | Julien Nabet <serval2412@yahoo.fr> | 2017-11-12 08:53:02 +0100 |
commit | 582182ad2ad9c399fd41bff2446507eb954730f7 (patch) | |
tree | 4e7c7dbb34cd9b18059aa49d0a16a972b23606f5 /sd/source/ui/animations | |
parent | ecc3b1fcaddd4066d90161faf4a3f532b445c85a (diff) |
Replace list by vector for InteractiveSequence (sd)
+ use for range loops (there's still work about this)
Change-Id: Ib1d1584f3f4456dfa79834f89c51b4528b776096
Reviewed-on: https://gerrit.libreoffice.org/44642
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Diffstat (limited to 'sd/source/ui/animations')
-rw-r--r-- | sd/source/ui/animations/CustomAnimationList.cxx | 8 | ||||
-rw-r--r-- | sd/source/ui/animations/CustomAnimationPane.cxx | 12 |
2 files changed, 8 insertions, 12 deletions
diff --git a/sd/source/ui/animations/CustomAnimationList.cxx b/sd/source/ui/animations/CustomAnimationList.cxx index 981b61e36470..58d6d6b475b1 100644 --- a/sd/source/ui/animations/CustomAnimationList.cxx +++ b/sd/source/ui/animations/CustomAnimationList.cxx @@ -619,13 +619,11 @@ void CustomAnimationList::update() std::for_each( mpMainSequence->getBegin(), mpMainSequence->getEnd(), stl_append_effect_func( *this ) ); mpLastParentEntry = nullptr; - const InteractiveSequenceList& rISL = mpMainSequence->getInteractiveSequenceList(); + auto rInteractiveSequenceVector = mpMainSequence->getInteractiveSequenceVector(); - InteractiveSequenceList::const_iterator aIter( rISL.begin() ); - const InteractiveSequenceList::const_iterator aEnd( rISL.end() ); - while( aIter != aEnd ) + for (auto const& interactiveSequence : rInteractiveSequenceVector) { - InteractiveSequencePtr pIS( (*aIter++) ); + InteractiveSequencePtr pIS( interactiveSequence ); Reference< XShape > xShape( pIS->getTriggerShape() ); if( xShape.is() ) diff --git a/sd/source/ui/animations/CustomAnimationPane.cxx b/sd/source/ui/animations/CustomAnimationPane.cxx index aa74265556f3..c00aedf6c607 100644 --- a/sd/source/ui/animations/CustomAnimationPane.cxx +++ b/sd/source/ui/animations/CustomAnimationPane.cxx @@ -259,9 +259,8 @@ void CustomAnimationPane::dispose() MotionPathTagVector aTags; aTags.swap( maMotionPathTags ); - MotionPathTagVector::iterator aIter; - for( aIter = aTags.begin(); aIter != aTags.end(); ++aIter ) - (*aIter)->Dispose(); + for (auto const& tag : aTags) + tag->Dispose(); mpPBAddEffect.clear(); mpPBRemoveEffect.clear(); @@ -828,11 +827,10 @@ void CustomAnimationPane::updateMotionPathTags() { bChanges = updateMotionPathImpl( *this, *pView, mpMainSequence->getBegin(), mpMainSequence->getEnd(), aTags, maMotionPathTags ); - const InteractiveSequenceList& rISL = mpMainSequence->getInteractiveSequenceList(); - InteractiveSequenceList::const_iterator aISI( rISL.begin() ); - while( aISI != rISL.end() ) + auto rInteractiveSequenceVector = mpMainSequence->getInteractiveSequenceVector(); + for (auto const& interactiveSequence : rInteractiveSequenceVector) { - InteractiveSequencePtr pIS( (*aISI++) ); + InteractiveSequencePtr pIS(interactiveSequence); bChanges |= updateMotionPathImpl( *this, *pView, pIS->getBegin(), pIS->getEnd(), aTags, maMotionPathTags ); } } |