[Libreoffice-commits] core.git: sd/source
Rishabh
kris.kr296 at gmail.com
Wed Feb 10 08:40:56 UTC 2016
sd/source/ui/animations/CustomAnimationPane.cxx | 34 ------------------------
1 file changed, 1 insertion(+), 33 deletions(-)
New commits:
commit a04b458821cd4b34b56f406af4620c8df2d5ea12
Author: Rishabh <kris.kr296 at gmail.com>
Date: Tue Feb 9 20:18:22 2016 +0530
tdf#87813: Reduce duplicate code
Change-Id: Ib546849de5101d7e9ebdf20f98f080575ce5f9cc
Reviewed-on: https://gerrit.libreoffice.org/22192
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Katarina Behrens <Katarina.Behrens at cib.de>
diff --git a/sd/source/ui/animations/CustomAnimationPane.cxx b/sd/source/ui/animations/CustomAnimationPane.cxx
index 9535844..f7589cf 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)
More information about the Libreoffice-commits
mailing list