[Libreoffice-commits] core.git: sd/source

Noel Grandin noel at peralex.com
Fri Feb 12 06:50:44 UTC 2016


 sd/source/ui/animations/CustomAnimationPane.cxx |   27 ++++++++++++++++++++++++
 sd/source/ui/animations/CustomAnimationPane.hxx |    1 
 2 files changed, 28 insertions(+)

New commits:
commit ffc7e42fc925a5e1073ec1b0025b4a1848683007
Author: Noel Grandin <noel at peralex.com>
Date:   Fri Feb 12 08:49:34 2016 +0200

    revert part of "loplugin:unusedmethods"
    
    commit 198f3ec116996788be1d73f9462ecb808b78f309
    
    Change-Id: I606ddcb721fce8551ece0c9375cb2b3f535f1318

diff --git a/sd/source/ui/animations/CustomAnimationPane.cxx b/sd/source/ui/animations/CustomAnimationPane.cxx
index ac3b1ae..0349e85 100644
--- a/sd/source/ui/animations/CustomAnimationPane.cxx
+++ b/sd/source/ui/animations/CustomAnimationPane.cxx
@@ -1744,6 +1744,33 @@ bool getTextSelection( const Any& rSelection, Reference< XShape >& xShape, std::
     return false;
 }
 
+void CustomAnimationPane::animationChange()
+{
+    if( maListSelection.size() == 1 )
+    {
+        CustomAnimationPresetPtr* pPreset = static_cast< CustomAnimationPresetPtr* >(mpLBAnimation->GetSelectEntryData());
+        const double fDuration = (*pPreset)->getDuration();
+        CustomAnimationPresetPtr pDescriptor(*pPreset);
+        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, pDescriptor, fDuration );
+        }
+        onPreview(true);
+    }
+
+}
+
 void CustomAnimationPane::onChange()
 {
     bool bHasText = true;
diff --git a/sd/source/ui/animations/CustomAnimationPane.hxx b/sd/source/ui/animations/CustomAnimationPane.hxx
index 04305d5..8eda015 100644
--- a/sd/source/ui/animations/CustomAnimationPane.hxx
+++ b/sd/source/ui/animations/CustomAnimationPane.hxx
@@ -71,6 +71,7 @@ public:
     void onSelectionChanged();
     void onChangeCurrentPage();
     void onChange();
+    void animationChange();
     void onRemove();
     void onChangeStart();
     void onChangeStart( sal_Int16 nNodeType );


More information about the Libreoffice-commits mailing list