diff --git a/filter/source/svg/presentation_engine.js b/filter/source/svg/presentation_engine.js index df69b14143953..14017ab31593e 100644 --- a/filter/source/svg/presentation_engine.js +++ b/filter/source/svg/presentation_engine.js @@ -1886,6 +1886,20 @@ function Rectangle( aSVGRectElem ) this.bottom = y + height; } +/* + * Returns key corresponding to a value in object, null otherwise. + * + * @param Object + * @param value + */ +function getKeyByValue(aObj, value) { + for(var key in aObj) { + if(aObj[key] == value) + return key; + } + return null; +} + function log( message ) { if( typeof console == 'object' ) @@ -5164,14 +5178,9 @@ aTransitionTypeInMap = { 'irisWipe' : IRISWIPE_TRANSITION }; -aTransitionTypeOutMap = [ '', 'barWipe', 'boxWipe', 'fourBoxWipe', 'ellipseWipe', - 'clockWipe', 'pinWheelWipe', 'pushWipe', 'slideWipe', - 'fade', 'randomBarWipe', 'checkerBoardWipe', 'dissolve' , 'irisWipe']; - - /* * All Transition subtypes should be in sync with aTransitionSubtypeInMap: - * Comments '//' followed by integers represent the transition values in their + * Comments '//' followed by integers represent the transition values in their * C++ implementations. */ // Transition Subtypes @@ -5256,16 +5265,6 @@ aTransitionSubtypeInMap = { 'leftCenter' : LEFTCENTER_TRANS_SUBTYPE }; -aTransitionSubtypeOutMap = [ 'default', 'leftToRight', 'topToBottom', 'cornersIn', - 'cornersOut', 'vertical', 'horizontal', 'down', 'circle', - 'clockwiseTwelve', 'clockwiseThree', 'clockwiseSix', - 'clockwiseNine', 'twoBladeVertical', 'twoBladeHorizontal', - 'fourBlade', 'fromLeft', 'fromTop', 'fromRight', - 'fromBottom', 'crossfade', 'fadeToColor', 'fadeFromColor', - 'fadeOverColor', 'threeBlade', 'eightBlade', 'oneBlade', - 'across', 'rectangle', 'diamond']; - - // Transition Modes TRANSITION_MODE_IN = 1; TRANSITION_MODE_OUT = 0; @@ -8246,10 +8245,10 @@ AnimationTransitionFilterNode.prototype.info = function( bVerbose ) if( bVerbose ) { // transition type - sInfo += '; type: ' + aTransitionTypeOutMap[ String( this.getTransitionType() ) ]; + sInfo += '; type: ' + getKeyByValue(aTransitionTypeInMap, this.getTransitionType()); // transition subtype - sInfo += '; subtype: ' + aTransitionSubtypeOutMap[ this.getTransitionSubType() ]; + sInfo += '; subtype: ' + getKeyByValue(aTransitionSubtypeInMap, this.getTransitionSubType()); // transition direction if( this.getReverseDirection() ) @@ -11090,10 +11089,10 @@ SlideTransition.prototype.info = function() var sInfo ='slide transition <' + this.sSlideId + '>: '; // transition type - sInfo += '; type: ' + aTransitionTypeOutMap[ String( this.getTransitionType() ) ]; + sInfo += '; type: ' + getKeyByValue(aTransitionTypeInMap, this.getTransitionType()); // transition subtype - sInfo += '; subtype: ' + aTransitionSubtypeOutMap[ this.getTransitionSubType() ]; + sInfo += '; subtype: ' + getKeyByValue(aTransitionSubtypeInMap, this.getTransitionSubType()); // transition direction if( !this.isDirectionForward() ) @@ -15022,6 +15021,7 @@ ElapsedTime.prototype.getElapsedTimeImpl = function() }; + /***** * @libreofficeend *