summaryrefslogtreecommitdiff
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-11-28 00:13:17 -0500
commitcde9409ac3069cd91a1cde6e4fbb68e9fea3f5f9 (patch)
tree4d5816d668df4a54e1be54d88d1e1150f2c5c87b
parent67e7354564cf52eef45f5c405b5cc8f10f75d76a (diff)
first GraphicManager* arg of ImplSetGraphicManager is thus always null
Change-Id: I3da98280d3c1d95663e6e43ce7a5ca82c001c334 (cherry picked from commit 8564b5beb1c49104d555e70d3c6134908fc0811f)
-rw-r--r--include/svtools/grfmgr.hxx1
-rw-r--r--svtools/source/graphic/grfmgr.cxx20
2 files changed, 10 insertions, 11 deletions
diff --git a/include/svtools/grfmgr.hxx b/include/svtools/grfmgr.hxx
index 929fe89587b0..7a8291f2fc75 100644
--- a/include/svtools/grfmgr.hxx
+++ b/include/svtools/grfmgr.hxx
@@ -203,7 +203,6 @@ private:
void SVT_DLLPRIVATE ImplConstruct();
void SVT_DLLPRIVATE ImplAssignGraphicData();
void SVT_DLLPRIVATE ImplSetGraphicManager(
- const GraphicManager* pMgr,
const OString* pID = nullptr,
const GraphicObject* pCopyObj = nullptr
);
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,