slideshow/source/engine/slide/shapemanagerimpl.cxx | 35 ++++++++++++++++++--- slideshow/source/engine/slide/shapemanagerimpl.hxx | 2 + 2 files changed, 33 insertions(+), 4 deletions(-)
New commits: commit 21009ded43206124264a17992cb554f89aac6b75 Author: Michael Jaumann <meta_...@yahoo.com> Date: Fri Mar 6 14:01:53 2015 +0000 added updateSprites in shapemangerimpl Change-Id: I72e768be6bfaae1d6eccc25cebc12f995efdf55e diff --git a/slideshow/source/engine/slide/shapemanagerimpl.cxx b/slideshow/source/engine/slide/shapemanagerimpl.cxx index 47d12bf..0db4f80 100644 --- a/slideshow/source/engine/slide/shapemanagerimpl.cxx +++ b/slideshow/source/engine/slide/shapemanagerimpl.cxx @@ -343,8 +343,7 @@ void ShapeManagerImpl::viewsChanged() bool ShapeManagerImpl::update() { - //if( mbEnabled) - // return mpLayerManager->update(); + updateSprites(); return false; } @@ -381,8 +380,36 @@ void ShapeManagerImpl::leaveAnimationMode( const AnimatableShapeSharedPtr& rShap void ShapeManagerImpl::notifyShapeUpdate( const ShapeSharedPtr& rShape ) { - // if( mbEnabled ) - // mpLayerManager->notifyShapeUpdate(rShape); + if( rShape->isVisible() || rShape->isBackgroundDetached() ) + maUpdateShapes.insert( rShape ); +} + +bool ShapeManagerImpl::updateSprites() +{ + bool bRet(true); + + // send update() calls to every shape in the + // maUpdateShapes set, which is _animated_ (i.e. a + // sprite). + const ShapeUpdateSet::const_iterator aEnd=maUpdateShapes.end(); + ShapeUpdateSet::const_iterator aCurrShape=maUpdateShapes.begin(); + while( aCurrShape != aEnd ) + { + if( (*aCurrShape)->isBackgroundDetached() ) + { + // can update shape directly, without + // affecting layer content (shape is + // currently displayed in a sprite) + if( !(*aCurrShape)->update() ) + bRet = false; // delay error exit + } + + ++aCurrShape; + } + + maUpdateShapes.clear(); + + return bRet; } ShapeSharedPtr ShapeManagerImpl::lookupShape( uno::Reference< drawing::XShape > const & xShape ) const diff --git a/slideshow/source/engine/slide/shapemanagerimpl.hxx b/slideshow/source/engine/slide/shapemanagerimpl.hxx index ab98c6a..c1b9916 100644 --- a/slideshow/source/engine/slide/shapemanagerimpl.hxx +++ b/slideshow/source/engine/slide/shapemanagerimpl.hxx @@ -198,6 +198,8 @@ private: ::com::sun::star::drawing::XShape>& xShape, sal_Int16 nCursor ); + bool updateSprites(); + /** Common stuff when adding a shape */ void implAddShape( const ShapeSharedPtr& rShape ); _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits