diff options
author | Rishabh <kris.kr296@gmail.com> | 2016-02-09 20:18:22 +0530 |
---|---|---|
committer | Katarina Behrens <Katarina.Behrens@cib.de> | 2016-02-10 08:40:34 +0000 |
commit | a04b458821cd4b34b56f406af4620c8df2d5ea12 (patch) | |
tree | 72f9250910cbd37f2982f800536080a960387619 /sd | |
parent | 0c517ab1bf7f17b9d070f0a79fc2e6d637309d11 (diff) |
tdf#87813: Reduce duplicate code
Change-Id: Ib546849de5101d7e9ebdf20f98f080575ce5f9cc
Reviewed-on: https://gerrit.libreoffice.org/22192
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Katarina Behrens <Katarina.Behrens@cib.de>
Diffstat (limited to 'sd')
-rw-r--r-- | sd/source/ui/animations/CustomAnimationPane.cxx | 34 |
1 files changed, 1 insertions, 33 deletions
diff --git a/sd/source/ui/animations/CustomAnimationPane.cxx b/sd/source/ui/animations/CustomAnimationPane.cxx index 953584408a51..f7589cf09814 100644 --- a/sd/source/ui/animations/CustomAnimationPane.cxx +++ b/sd/source/ui/animations/CustomAnimationPane.cxx @@ -2125,39 +2125,7 @@ IMPL_LINK_NOARG_TYPED(CustomAnimationPane, implPropertyHdl, LinkParamNone*, void IMPL_LINK_NOARG_TYPED(CustomAnimationPane, AnimationSelectHdl, ListBox&, void) { - CustomAnimationPresetPtr* pPreset = static_cast< CustomAnimationPresetPtr* >(mpLBAnimation->GetSelectEntryData()); - const double fDuration = (*pPreset)->getDuration(); - sal_uInt32 nPos = LISTBOX_ENTRY_NOTFOUND; - if( fDuration == 5.0 ) - nPos = 0; - else if( fDuration == 3.0 ) - nPos = 1; - else if( fDuration == 2.0 ) - nPos = 2; - else if( fDuration == 1.0 ) - nPos = 3; - else if( fDuration == 0.5 ) - nPos = 4; - mpCBSpeed->SelectEntryPos( nPos ); - bool bHasSpeed = (*pPreset)->getDuration() > 0.001; - mpCBSpeed->Enable( bHasSpeed ); - mpFTSpeed->Enable( bHasSpeed ); - MainSequenceRebuildGuard aGuard( mpMainSequence ); - - // get selected effect - EffectSequence::iterator aIter( maListSelection.begin() ); - const EffectSequence::iterator aEnd( maListSelection.end() ); - while( aIter != aEnd ) - { - CustomAnimationEffectPtr pEffect = (*aIter++); - - EffectSequenceHelper* pEffectSequence = pEffect->getEffectSequence(); - if( !pEffectSequence ) - pEffectSequence = mpMainSequence.get(); - - pEffectSequence->replace( pEffect, *pPreset, fDuration ); - } - onPreview(true); + animationChange(); } IMPL_LINK_NOARG_TYPED(CustomAnimationPane, UpdateAnimationLB, ListBox&, void) |