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

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Wed Dec 5 12:52:24 UTC 2018


 slideshow/source/engine/animationnodes/animationcommandnode.cxx |   19 ++++++++++
 slideshow/source/engine/animationnodes/animationcommandnode.hxx |    1 
 2 files changed, 20 insertions(+)

New commits:
commit 1aa10fcb668f67f4313b7170a4090027e52164c5
Author:     Caolán McNamara <caolanm at redhat.com>
AuthorDate: Tue Dec 4 16:42:10 2018 +0000
Commit:     Thorsten Behrens <Thorsten.Behrens at CIB.de>
CommitDate: Wed Dec 5 13:51:59 2018 +0100

    tdf#121830 TogglePause should reset to original state on deactivate_st ?
    
    is that how it should work, or should there be an additional TogglePause
    created at import time to get the apparent intended pause effect
    
    Change-Id: I0573bd8d9534271f2b36d7ab3b8cdc20e0f985a1
    Reviewed-on: https://gerrit.libreoffice.org/64548
    Tested-by: Jenkins
    Reviewed-by: Thorsten Behrens <Thorsten.Behrens at CIB.de>

diff --git a/slideshow/source/engine/animationnodes/animationcommandnode.cxx b/slideshow/source/engine/animationnodes/animationcommandnode.cxx
index 0c9519589ed0..3bd05db936b2 100644
--- a/slideshow/source/engine/animationnodes/animationcommandnode.cxx
+++ b/slideshow/source/engine/animationnodes/animationcommandnode.cxx
@@ -109,6 +109,25 @@ void AnimationCommandNode::activate_st()
                    "AnimationCommandNode::deactivate" ) );
 }
 
+void AnimationCommandNode::deactivate_st( NodeState /*eDestState*/ )
+{
+    switch( mxCommandNode->getCommand() ) {
+    // the command toggles the pause status on a media object
+    case EffectCommands::TOGGLEPAUSE:
+    {
+        if( mpShape )
+        {
+            if( mpShape->isPlaying() )
+                mpShape->pause();
+            else
+                mpShape->play();
+        }
+        break;
+    }
+
+    }
+}
+
 bool AnimationCommandNode::hasPendingAnimation() const
 {
     return mxCommandNode->getCommand() == EffectCommands::STOPAUDIO || mpShape;
diff --git a/slideshow/source/engine/animationnodes/animationcommandnode.hxx b/slideshow/source/engine/animationnodes/animationcommandnode.hxx
index 675da7c3b0e8..cf753e001949 100644
--- a/slideshow/source/engine/animationnodes/animationcommandnode.hxx
+++ b/slideshow/source/engine/animationnodes/animationcommandnode.hxx
@@ -46,6 +46,7 @@ protected:
 
 private:
     virtual void activate_st() override;
+    virtual void deactivate_st( NodeState eDestState ) override;
     virtual bool hasPendingAnimation() const override;
 
 private:


More information about the Libreoffice-commits mailing list