filter/source/svg/presentation_engine.js |   15 +++++++++++++--
 1 file changed, 13 insertions(+), 2 deletions(-)

New commits:
commit 75358177ccbd6c27106a350108a18e7085541479
Author: Marco Cecchetti <marco.cecche...@collabora.com>
Date:   Fri Jan 15 11:28:28 2016 +0100

    svg export: fall back to crossfade for not supported transitions
    
    If we do not support the requested transition type we fall back to
    crossfade transition.
    If we do not provide an alternative transition and we set the state of
    the animation node to 'invalid' the animation engine stops itself.
    
    Change-Id: Ie476dd579248e9d776e27797dca2ea867f3e5e54
    Reviewed-on: https://gerrit.libreoffice.org/21490
    Tested-by: Jenkins <c...@libreoffice.org>
    Reviewed-by: Marco Cecchetti <mrcek...@gmail.com>

diff --git a/filter/source/svg/presentation_engine.js 
b/filter/source/svg/presentation_engine.js
index 09bf196..d2afe9c 100644
--- a/filter/source/svg/presentation_engine.js
+++ b/filter/source/svg/presentation_engine.js
@@ -7024,6 +7024,7 @@ AnimationTransitionFilterNode.prototype.createActivity = 
function()
 AnimationTransitionFilterNode.prototype.parseElement = function()
 {
     var bRet = AnimationTransitionFilterNode.superclass.parseElement.call( 
this );
+    var bIsValidTransition = true;
 
     var aAnimElem = this.aElement;
 
@@ -7036,7 +7037,7 @@ AnimationTransitionFilterNode.prototype.parseElement = 
function()
     }
     else
     {
-        this.eCurrentState = INVALID_NODE;
+        bIsValidTransition = false;
         log( 'AnimationTransitionFilterNode.parseElement: transition type not 
valid: ' + sTypeAttr );
     }
 
@@ -7051,10 +7052,20 @@ AnimationTransitionFilterNode.prototype.parseElement = 
function()
     }
     else
     {
-        this.eCurrentState = INVALID_NODE;
+        bIsValidTransition = false;
         log( 'AnimationTransitionFilterNode.parseElement: transition subtype 
not valid: ' + sSubTypeAttr );
     }
 
+    // if we do not support the requested transition type we fall back to 
crossfade transition;
+    // note: if we do not provide an alternative transition and we set the 
state of the animation node to 'invalid'
+    // the animation engine stops itself;
+    if( !bIsValidTransition )
+    {
+        this.eTransitionType = FADE_TRANSITION;
+        this.eTransitionSubType = CROSSFADE_TRANS_SUBTYPE;
+        log( 'AnimationTransitionFilterNode.parseElement: in place of the 
invalid transition a crossfade transition is used' );
+    }
+
     // direction attribute
     this.bReverseDirection = false;
     var sDirectionAttr = aAnimElem.getAttributeNS( NSS['smil'], 'direction' );
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to