summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarco Cecchetti <marco.cecchetti@collabora.com>2016-01-12 17:15:16 +0100
committerMarco Cecchetti <mrcekets@gmail.com>2016-01-15 13:12:28 +0000
commit2f20ee7a6a871fe60194518044110c8d2a97acbe (patch)
tree53560078e145c4c05ccb3b5f0b3ae23d013e88ee
parent804094be2514d099f6bb2be63d1536bebf6f06bc (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>
-rw-r--r--filter/source/svg/presentation_engine.js12
-rw-r--r--filter/source/svg/svgexport.cxx5
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 ef97fd954009..794f5b01881e 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 );