Kaydet (Commit) 7927bfcf authored tarafından Mark Hung's avatar Mark Hung Kaydeden (comit) Caolán McNamara

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
1aa10fcb tdf#121830 and the follwing
f820f6eb 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: 's avatarCaolán McNamara <caolanm@redhat.com>
Tested-by: 's avatarCaolán McNamara <caolanm@redhat.com>
üst 663de296
......@@ -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;
......
......@@ -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;
};
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment