summaryrefslogtreecommitdiff
path: root/svtools
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2017-01-09 15:48:36 +0000
committerAshod Nakashian <ashod.nakashian@collabora.co.uk>2017-12-05 08:17:37 -0500
commit2bd14132fc324506de8310401ced77f26e5415da (patch)
tree26b106fd74a2406c3a1d762e00c813971a4d8f46 /svtools
parent6d204e0ae881917946e7a9b56e666a36fd04aa7a (diff)
first GraphicManager* arg of ImplSetGraphicManager is thus always null
Change-Id: I3da98280d3c1d95663e6e43ce7a5ca82c001c334 (cherry picked from commit 8564b5beb1c49104d555e70d3c6134908fc0811f) (cherry picked from commit cde9409ac3069cd91a1cde6e4fbb68e9fea3f5f9)
Diffstat (limited to 'svtools')
-rw-r--r--svtools/source/graphic/grfmgr.cxx20
1 files changed, 10 insertions, 10 deletions
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<GraphicManager*>(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,