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

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Sun Feb 24 21:13:06 UTC 2019


 slideshow/source/engine/animationnodes/animationcommandnode.cxx |   22 ----------
 slideshow/source/engine/animationnodes/animationcommandnode.hxx |    2 
 2 files changed, 24 deletions(-)

New commits:
commit 7927bfcf46aaaee8a5ab4eeb10549436416cfc3a
Author:     Mark Hung <marklh9 at gmail.com>
AuthorDate: Sat Feb 23 22:01:46 2019 +0800
Commit:     Caolán McNamara <caolanm at redhat.com>
CommitDate: Sun Feb 24 22:12:46 2019 +0100

    slideshow: do not toggle pause when deactivate.
    
    The command animation node schdules deactivation immediately after it is
    activated, it turns what it might pause shortly then toggle the media to
    play again, and it will not possible for user to insert many pause
    commands to achieve toggling between play-pause-play-pause.
    
    This commit will revert
    1aa10fcb668f67f4313b7170a4090027e52164c5 tdf#121830 and the follwing
    f820f6eb6036197bbb53e2d5e4bf4d5341ad280d tdf#121942
    
    PowerPoint does not play the video file when the slide start. Instead it
    insert a pause command in a interaction sequence that is triggered by
    clicking the video file. I'm working on tdf#123557 to import start and
    end condtions of a time node and tdf#123653 to allow triggering events
    by clicking on the video. But there are still some more strange things
    in the attachment of tdf#121830 that I have to investigate its start
    condition and its media file format to understand whether it really
    should play automatically ( or just a bogus file) and why it didn't
    play.
    
    Change-Id: I823afb4d1048471cebe43deb597f17a6e2611f06
    Reviewed-on: https://gerrit.libreoffice.org/68245
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/slideshow/source/engine/animationnodes/animationcommandnode.cxx b/slideshow/source/engine/animationnodes/animationcommandnode.cxx
index 1b764b1c5a4a..e765f2a5a531 100644
--- a/slideshow/source/engine/animationnodes/animationcommandnode.cxx
+++ b/slideshow/source/engine/animationnodes/animationcommandnode.cxx
@@ -38,7 +38,6 @@ AnimationCommandNode::AnimationCommandNode( uno::Reference<animations::XAnimatio
                                              ::std::shared_ptr<BaseContainerNode> const& pParent,
                                              NodeContext const& rContext ) :
     BaseNode( xNode, pParent, rContext ),
-    mbToggled(false),
     mpShape(),
     mxCommandNode( xNode, css::uno::UNO_QUERY_THROW )
 {
@@ -87,7 +86,6 @@ void AnimationCommandNode::activate_st()
                 mpShape->pause();
             else
                 mpShape->play();
-            mbToggled = true;
         }
         break;
     }
@@ -111,26 +109,6 @@ 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 && mbToggled)
-        {
-            if( mpShape->isPlaying() )
-                mpShape->pause();
-            else
-                mpShape->play();
-            mbToggled = false;
-        }
-        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 1aacd1b6a071..675da7c3b0e8 100644
--- a/slideshow/source/engine/animationnodes/animationcommandnode.hxx
+++ b/slideshow/source/engine/animationnodes/animationcommandnode.hxx
@@ -46,11 +46,9 @@ protected:
 
 private:
     virtual void activate_st() override;
-    virtual void deactivate_st( NodeState eDestState ) override;
     virtual bool hasPendingAnimation() const override;
 
 private:
-    bool mbToggled;
     IExternalMediaShapeBaseSharedPtr mpShape;
     css::uno::Reference<css::animations::XCommand > mxCommandNode;
 };


More information about the Libreoffice-commits mailing list