diff options
author | Marco Cecchetti <marco.cecchetti@collabora.com> | 2016-01-12 17:15:16 +0100 |
---|---|---|
committer | Andras Timar <andras.timar@collabora.com> | 2016-06-12 12:27:52 +0200 |
commit | cbadf62350f6e45b77b3ba22c1fd45b6d36c2f20 (patch) | |
tree | fcea04778df50bf4af2194b3355fe1e6af87271a /filter | |
parent | 57ce435525e6b1fd7a82713f7844565fe3b22157 (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
Reviewed-on: https://gerrit.libreoffice.org/21446
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Marco Cecchetti <mrcekets@gmail.com>
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 a8b9f6bd7efd..9b0678b4846f 100644 --- a/filter/source/svg/presentation_engine.js +++ b/filter/source/svg/presentation_engine.js @@ -3873,7 +3873,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 }; @@ -5205,7 +5207,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; } @@ -7115,6 +7117,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 2fd65b335f35..b83fe226e1bb 100644 --- a/filter/source/svg/svgexport.cxx +++ b/filter/source/svg/svgexport.cxx @@ -1785,6 +1785,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 ); |