Kaydet (Commit) f3961ea1 authored tarafından Caolán McNamara's avatar Caolán McNamara

tdf#120626 'rewind' doesn't stick when effect duration is changed

Change-Id: I1c65168b68bba2928030f89836d2b127655d6066
Reviewed-on: https://gerrit.libreoffice.org/61814
Tested-by: Jenkins
Reviewed-by: 's avatarCaolán McNamara <caolanm@redhat.com>
Tested-by: 's avatarCaolán McNamara <caolanm@redhat.com>
üst fbec372b
......@@ -81,7 +81,7 @@ public:
SAL_DLLPRIVATE css::uno::Any getEnd() const;
SAL_DLLPRIVATE void setEnd( const css::uno::Any& rEnd );
SAL_DLLPRIVATE sal_Int16 getFill() const;
SAL_DLLPRIVATE sal_Int16 getFill() const { return mnFill; }
SAL_DLLPRIVATE void setFill( sal_Int16 nFill );
SAL_DLLPRIVATE double getBegin() const { return mfBegin; }
......@@ -176,6 +176,7 @@ private:
OUString maPresetSubType;
OUString maProperty;
sal_Int16 mnPresetClass;
sal_Int16 mnFill;
double mfBegin;
double mfDuration; // this is the maximum duration of the subeffects
double mfAbsoluteDuration; // this is the maximum duration of the subeffects including possible iterations
......
......@@ -129,6 +129,7 @@ private:
CustomAnimationEffect::CustomAnimationEffect( const css::uno::Reference< css::animations::XAnimationNode >& xNode )
: mnNodeType(-1),
mnPresetClass(-1),
mnFill(AnimationFill::HOLD),
mfBegin(-1.0),
mfDuration(-1.0),
mfAbsoluteDuration(-1.0),
......@@ -195,6 +196,8 @@ void CustomAnimationEffect::setNode( const css::uno::Reference< css::animations:
mfDecelerate = mxNode->getDecelerate();
mbAutoReverse = mxNode->getAutoReverse();
mnFill = mxNode->getFill();
// get iteration data
Reference< XIterateContainer > xIter( mxNode, UNO_QUERY );
if( xIter.is() )
......@@ -819,6 +822,7 @@ void CustomAnimationEffect::replaceNode( const css::uno::Reference< css::animati
sal_Int16 nNodeType = mnNodeType;
Any aTarget = maTarget;
sal_Int16 nFill = mnFill;
double fBegin = mfBegin;
double fDuration = mfDuration;
double fAcceleration = mfAcceleration;
......@@ -837,6 +841,7 @@ void CustomAnimationEffect::replaceNode( const css::uno::Reference< css::animati
setTargetSubItem( nSubItem );
setDuration( fDuration );
setBegin( fBegin );
setFill( nFill );
setAcceleration( fAcceleration );
setDecelerate( fDecelerate );
......@@ -889,14 +894,6 @@ Any CustomAnimationEffect::getEnd() const
}
}
sal_Int16 CustomAnimationEffect::getFill() const
{
if( mxNode.is() )
return mxNode->getFill();
else
return 0;
}
void CustomAnimationEffect::setRepeatCount( const Any& rRepeatCount )
{
if( mxNode.is() )
......@@ -916,8 +913,11 @@ void CustomAnimationEffect::setEnd( const Any& rEnd )
void CustomAnimationEffect::setFill( sal_Int16 nFill )
{
if( mxNode.is() )
if (mxNode.is())
{
mnFill = nFill;
mxNode->setFill( nFill );
}
}
Reference< XAnimationNode > CustomAnimationEffect::createAfterEffectNode() const
......
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