From 2bd14132fc324506de8310401ced77f26e5415da Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Mon, 9 Jan 2017 15:48:36 +0000 Subject: first GraphicManager* arg of ImplSetGraphicManager is thus always null Change-Id: I3da98280d3c1d95663e6e43ce7a5ca82c001c334 (cherry picked from commit 8564b5beb1c49104d555e70d3c6134908fc0811f) (cherry picked from commit cde9409ac3069cd91a1cde6e4fbb68e9fea3f5f9) --- svtools/source/graphic/grfmgr.cxx | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'svtools/source/graphic') diff --git a/svtools/source/graphic/grfmgr.cxx b/svtools/source/graphic/grfmgr.cxx index 0b04656bb8df..d0e27c408d80 100644 --- a/svtools/source/graphic/grfmgr.cxx +++ b/svtools/source/graphic/grfmgr.cxx @@ -77,7 +77,7 @@ GraphicObject::GraphicObject() : { ImplConstruct(); ImplAssignGraphicData(); - ImplSetGraphicManager( nullptr ); + ImplSetGraphicManager(); } GraphicObject::GraphicObject( const Graphic& rGraphic ) : @@ -87,7 +87,7 @@ GraphicObject::GraphicObject( const Graphic& rGraphic ) : { ImplConstruct(); ImplAssignGraphicData(); - ImplSetGraphicManager( nullptr ); + ImplSetGraphicManager(); } GraphicObject::GraphicObject( const GraphicObject& rGraphicObj ) : @@ -98,7 +98,7 @@ GraphicObject::GraphicObject( const GraphicObject& rGraphicObj ) : { ImplConstruct(); ImplAssignGraphicData(); - ImplSetGraphicManager( nullptr, nullptr, &rGraphicObj ); + ImplSetGraphicManager(nullptr, &rGraphicObj); if( rGraphicObj.HasUserData() && rGraphicObj.IsSwappedOut() ) SetSwapState(); } @@ -112,7 +112,7 @@ GraphicObject::GraphicObject( const OString& rUniqueID ) : // assign default properties ImplAssignGraphicData(); - ImplSetGraphicManager( nullptr, &rUniqueID ); + ImplSetGraphicManager(&rUniqueID); // update properties ImplAssignGraphicData(); @@ -161,11 +161,11 @@ void GraphicObject::ImplAssignGraphicData() ImplAfterDataChange(); } -void GraphicObject::ImplSetGraphicManager( const GraphicManager* pMgr, const OString* pID, const GraphicObject* pCopyObj ) +void GraphicObject::ImplSetGraphicManager(const OString* pID, const GraphicObject* pCopyObj) { - if( !mpMgr || ( pMgr != mpMgr ) ) + if (!mpMgr || mpMgr) { - if( !pMgr && mpMgr && ( mpMgr == mpGlobalMgr ) ) + if (mpMgr && mpMgr == mpGlobalMgr) return; else { @@ -180,7 +180,7 @@ void GraphicObject::ImplSetGraphicManager( const GraphicManager* pMgr, const OSt } } - if( !pMgr ) + if (true) { if( !mpGlobalMgr ) { @@ -208,7 +208,7 @@ void GraphicObject::ImplSetGraphicManager( const GraphicManager* pMgr, const OSt mpMgr = mpGlobalMgr; } else - mpMgr = const_cast(pMgr); + mpMgr = nullptr; mpMgr->ImplRegisterObj( *this, maGraphic, pID, pCopyObj ); } @@ -473,7 +473,7 @@ void GraphicObject::GraphicManagerDestroyed() { // we're alive, but our manager doesn't live anymore ==> connect to default manager mpMgr = nullptr; - ImplSetGraphicManager( nullptr ); + ImplSetGraphicManager(); } bool GraphicObject::IsCached( OutputDevice* pOut, const Point& rPt, const Size& rSz, -- cgit