diff options
author | Marco Cecchetti <marco.cecchetti@collabora.com> | 2016-01-12 17:15:16 +0100 |
---|---|---|
committer | Marco Cecchetti <marco.cecchetti@collabora.com> | 2016-01-13 17:39:42 +0100 |
commit | 800040426b62169524e532f0e11e147c93e6850e (patch) | |
tree | 7b213fcc1eacd2bcd8d5fc2f9ad1b3565df731d2 /filter | |
parent | de1692e20f8a7f994268cec4f56fbf87cb3b105f (diff) |
svg export - group shape + indefinite duration - fixed
Fixed two issues:
- group shapes were not animated
- when smil:dur=indefinite final state of shapes was not frozen
Now when an audio or command node is hit a log message is printed
informing that such a type of animation nodes are not implemented.
Change-Id: I81853c982e6a2b68c3644b2ebc09e2d565d706af
Diffstat (limited to 'filter')
-rw-r--r-- | filter/source/svg/presentation_engine.js | 12 | ||||
-rw-r--r-- | filter/source/svg/svgexport.cxx | 5 |
2 files changed, 15 insertions, 2 deletions
diff --git a/filter/source/svg/presentation_engine.js b/filter/source/svg/presentation_engine.js index 56fec95c8885..757f4e149dbb 100644 --- a/filter/source/svg/presentation_engine.js +++ b/filter/source/svg/presentation_engine.js @@ -3876,7 +3876,9 @@ aAnimationNodeTypeInMap = { 'animatemotion' : ANIMATION_NODE_ANIMATEMOTION, 'animatecolor' : ANIMATION_NODE_ANIMATECOLOR, 'animatetransform' : ANIMATION_NODE_ANIMATETRANSFORM, - 'transitionfilter' : ANIMATION_NODE_TRANSITIONFILTER + 'transitionfilter' : ANIMATION_NODE_TRANSITIONFILTER, + 'audio' : ANIMATION_NODE_AUDIO, + 'command' : ANIMATION_NODE_COMMAND }; @@ -5246,7 +5248,7 @@ BaseNode.prototype.parseElement = function() { this.eFillMode = ( this.aEnd || ( this.nReapeatCount != 1) || - this.aDuration ) + ( this.aDuration && !this.aDuration.isIndefinite() ) ) ? FILL_MODE_REMOVE : FILL_MODE_FREEZE; } @@ -7158,6 +7160,12 @@ function createAnimationNode( aElement, aParentNode, aNodeContext ) case ANIMATION_NODE_TRANSITIONFILTER: aCreatedNode = new AnimationTransitionFilterNode( aElement, aParentNode, aNodeContext ); break; + case ANIMATION_NODE_AUDIO: + log( 'createAnimationNode: AUDIO not implemented' ); + return null; + case ANIMATION_NODE_COMMAND: + log( 'createAnimationNode: COMMAND not implemented' ); + return null; default: log( 'createAnimationNode: invalid Animation Node Type: ' + eAnimationNodeType ); return null; diff --git a/filter/source/svg/svgexport.cxx b/filter/source/svg/svgexport.cxx index e9b29dcfd894..53f681ba6ea8 100644 --- a/filter/source/svg/svgexport.cxx +++ b/filter/source/svg/svgexport.cxx @@ -1807,6 +1807,11 @@ bool SVGFilter::implExportShape( const Reference< XShape >& rxShape, if( xShapes.is() ) { mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, "class", "Group" ); + const OUString& rShapeId = implGetValidIDFromInterface( Reference<XInterface>(rxShape, UNO_QUERY) ); + if( !rShapeId.isEmpty() ) + { + mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, "id", rShapeId ); + } SvXMLElementExport aExp( *mpSVGExport, XML_NAMESPACE_NONE, "g", true, true ); bRet = implExportShapes( xShapes, bMaster ); |