You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openoffice.apache.org by af...@apache.org on 2012/08/29 16:56:11 UTC

svn commit: r1378592 - /incubator/ooo/trunk/main/slideshow/source/engine/activities/activitiesfactory.cxx

Author: af
Date: Wed Aug 29 14:56:11 2012
New Revision: 1378592

URL: http://svn.apache.org/viewvc?rev=1378592&view=rev
Log:
#i120749# Fixed interpolation of "smil:to" animation when "smil:from"
          is missing.

          Original patch by: Wang Zhe
          Fixed by: Andre Fischer

Modified:
    incubator/ooo/trunk/main/slideshow/source/engine/activities/activitiesfactory.cxx

Modified: incubator/ooo/trunk/main/slideshow/source/engine/activities/activitiesfactory.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/slideshow/source/engine/activities/activitiesfactory.cxx?rev=1378592&r1=1378591&r2=1378592&view=diff
==============================================================================
--- incubator/ooo/trunk/main/slideshow/source/engine/activities/activitiesfactory.cxx (original)
+++ incubator/ooo/trunk/main/slideshow/source/engine/activities/activitiesfactory.cxx Wed Aug 29 14:56:11 2012
@@ -166,7 +166,6 @@ public:
           maEndValue(),
           mpAnim( rAnim ),
           maInterpolator( rInterpolator ),
-          mbDynamicStartValue( false ),
           mbCumulative( bCumulative )
     {
         ENSURE_OR_THROW( mpAnim, "Invalid animation object" );
@@ -223,12 +222,7 @@ public:
             if( maTo ) 
             {
                 // To animation
-                
-                // According to the SMIL spec
-                // (http://www.w3.org/TR/smil20/animation.html#animationNS-ToAnimation),
-                // the to animation interpolates between
-                // the _running_ underlying value and the to value (as the end value)
-                mbDynamicStartValue = true;
+                maStartValue = aAnimationStartValue;
                 maEndValue = *maTo;
             }
             else if( maBy ) 
@@ -256,9 +250,7 @@ public:
             getPresentationValue(
                 accumulate( maEndValue, 
                             mbCumulative * nRepeatCount, // means: mbCumulative ? nRepeatCount : 0,
-                            maInterpolator( (mbDynamicStartValue
-                                             ? mpAnim->getUnderlyingValue()
-                                             : maStartValue),
+                            maInterpolator( maStartValue,
                                             maEndValue,
                                             nModifiedTime ) ) ) );
     }
@@ -274,9 +266,7 @@ public:
             getPresentationValue(
                 accumulate( maEndValue, mbCumulative ? nRepeatCount : 0,
                             lerp( maInterpolator,
-                                  (mbDynamicStartValue
-                                   ? mpAnim->getUnderlyingValue()
-                                   : maStartValue),
+                                  maStartValue,
                                   maEndValue,
                                   nFrame, 
                                   BaseType::getNumberOfKeyTimes() ) ) ) );
@@ -315,7 +305,6 @@ private:
     
     ::boost::shared_ptr< AnimationType >    mpAnim;
     Interpolator< ValueType >               maInterpolator;
-    bool                                    mbDynamicStartValue;
     bool                                    mbCumulative;
 };