[Libreoffice-commits] core.git: sd/inc sd/source
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Tue Oct 16 10:24:44 UTC 2018
sd/inc/CustomAnimationEffect.hxx | 3 ++-
sd/source/core/CustomAnimationEffect.cxx | 18 +++++++++---------
2 files changed, 11 insertions(+), 10 deletions(-)
New commits:
commit f3961ea18cf4f80d231f6bc63320af1454d1e7e9
Author: Caolán McNamara <caolanm at redhat.com>
AuthorDate: Tue Oct 16 09:20:42 2018 +0100
Commit: Caolán McNamara <caolanm at redhat.com>
CommitDate: Tue Oct 16 12:24:07 2018 +0200
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: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/sd/inc/CustomAnimationEffect.hxx b/sd/inc/CustomAnimationEffect.hxx
index c18d1437e730..b70bbdd07f91 100644
--- a/sd/inc/CustomAnimationEffect.hxx
+++ b/sd/inc/CustomAnimationEffect.hxx
@@ -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
diff --git a/sd/source/core/CustomAnimationEffect.cxx b/sd/source/core/CustomAnimationEffect.cxx
index e7890a5780d2..8835e7feabb4 100644
--- a/sd/source/core/CustomAnimationEffect.cxx
+++ b/sd/source/core/CustomAnimationEffect.cxx
@@ -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
More information about the Libreoffice-commits
mailing list