diff options
author | Armin Weiss <aw@openoffice.org> | 2006-11-28 10:03:58 +0000 |
---|---|---|
committer | Armin Weiss <aw@openoffice.org> | 2006-11-28 10:03:58 +0000 |
commit | e84d5561a05b41041c034a0b66600568e19c85d3 (patch) | |
tree | 9c1c6d7bc13efed66c9f2ef6c8d5e9348c0b3488 /drawinglayer/source/primitive2d/groupprimitive2d.cxx | |
parent | b3cffefc6143c3ce56771736f173d92678ce1357 (diff) |
#i39532#
Diffstat (limited to 'drawinglayer/source/primitive2d/groupprimitive2d.cxx')
-rw-r--r-- | drawinglayer/source/primitive2d/groupprimitive2d.cxx | 42 |
1 files changed, 40 insertions, 2 deletions
diff --git a/drawinglayer/source/primitive2d/groupprimitive2d.cxx b/drawinglayer/source/primitive2d/groupprimitive2d.cxx index 5fefcf374f8c..bc48579bd220 100644 --- a/drawinglayer/source/primitive2d/groupprimitive2d.cxx +++ b/drawinglayer/source/primitive2d/groupprimitive2d.cxx @@ -4,9 +4,9 @@ * * $RCSfile: groupprimitive2d.cxx,v $ * - * $Revision: 1.2 $ + * $Revision: 1.3 $ * - * last change: $Author: aw $ $Date: 2006-11-07 15:49:08 $ + * last change: $Author: aw $ $Date: 2006-11-28 11:03:57 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -75,6 +75,44 @@ namespace drawinglayer return false; } + bool GroupPrimitive2D::mayDecompositionBeAnimated() const + { + // check children. If one returns true, return true + if(!maChildren.hasElements()) + { + return false; + } + + const sal_Int32 nCount(maChildren.getLength()); + + for(sal_Int32 a(0L); a < nCount; a++) + { + // get reference + const primitive2d::Primitive2DReference xReference(maChildren[a]); + + if(xReference.is()) + { + // try to cast to BasePrimitive2D implementation + const primitive2d::BasePrimitive2D* pBasePrimitive = dynamic_cast< const primitive2d::BasePrimitive2D* >(xReference.get()); + + if(pBasePrimitive) + { + if(pBasePrimitive->mayDecompositionBeAnimated()) + { + return true; + } + } + else + { + // unknown implementation -> may contain animation + return true; + } + } + } + + return false; + } + // provide unique ID ImplPrimitrive2DIDBlock(GroupPrimitive2D, '2','G','r','o') |