diff options
author | Mark Hung <marklh9@gmail.com> | 2019-02-23 22:01:46 +0800 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2019-02-24 22:12:46 +0100 |
commit | 7927bfcf46aaaee8a5ab4eeb10549436416cfc3a (patch) | |
tree | 375a927bf8ecfcd95d79cb0d9d0c5916cf88df2a /slideshow | |
parent | 663de29651e2cf5d8f4c695a9413b4e8883820c4 (diff) |
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@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'slideshow')
-rw-r--r-- | slideshow/source/engine/animationnodes/animationcommandnode.cxx | 22 | ||||
-rw-r--r-- | slideshow/source/engine/animationnodes/animationcommandnode.hxx | 2 |
2 files changed, 0 insertions, 24 deletions
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; }; |