From fe272a757b60fdf267539102b0a9927f68e1526a Mon Sep 17 00:00:00 2001 From: Zolnai Tamás Date: Mon, 3 Nov 2014 07:52:03 +0100 Subject: Always call ImplAfterDataChange() when data is changed Call it inside ImplAssignGraphicData() which assign GraphicObject members using Graphic's data. With that ImplAfterDataChange() method also called in constructors. It's important to call ImplAfterDataChange(), because this will trigger the auto swaping mechanism. Change-Id: I45af91f8df2fb5b0143fcc5eb05e82e4d408d0bc --- svtools/source/graphic/grfmgr.cxx | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/svtools/source/graphic/grfmgr.cxx b/svtools/source/graphic/grfmgr.cxx index 05c34a311f83..6c7c93326529 100644 --- a/svtools/source/graphic/grfmgr.cxx +++ b/svtools/source/graphic/grfmgr.cxx @@ -160,6 +160,9 @@ void GraphicObject::ImplAssignGraphicData() mbAnimated = maGraphic.IsAnimated(); mbEPS = maGraphic.IsEPS(); mnAnimationLoopCount = ( mbAnimated ? maGraphic.GetAnimationLoopCount() : 0 ); + + // Handle evtl. needed AfterDataChanges + ImplAfterDataChange(); } void GraphicObject::ImplSetGraphicManager( const GraphicManager* pMgr, const OString* pID, const GraphicObject* pCopyObj ) @@ -260,9 +263,6 @@ void GraphicObject::ImplAutoSwapIn() if( !mbAutoSwapped && mpMgr ) mpMgr->ImplGraphicObjectWasSwappedIn( *this ); } - - // Handle evtl. needed AfterDataChanges - ImplAfterDataChange(); } } @@ -800,8 +800,7 @@ void GraphicObject::SetGraphic( const Graphic& rGraphic, const GraphicObject* pC if( mpSwapOutTimer ) mpSwapOutTimer->Start(); - // Handle evtl. needed AfterDataChanges - ImplAfterDataChange(); + } void GraphicObject::SetGraphic( const Graphic& rGraphic, const OUString& rLink ) @@ -1132,9 +1131,6 @@ bool GraphicObject::SwapIn() if( bRet ) { ImplAssignGraphicData(); - - // Handle evtl. needed AfterDataChanges - ImplAfterDataChange(); } return bRet; -- cgit