summaryrefslogtreecommitdiff
path: root/svtools
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2017-01-09 16:05:35 +0000
committerAshod Nakashian <ashod.nakashian@collabora.co.uk>2017-12-05 08:17:41 -0500
commitb5acc9b74024ebc5be06e4ac6c309b61999aa22b (patch)
tree0f6032e37f2fd0c3882df827b958755894e72415 /svtools
parent598f5ef097f2390d364342f1b30e859bcaa57881 (diff)
move the ImplRegisterObj outside ImplSetGraphicManager and rename it
Change-Id: I1eded3ee41787b9a3339e01cf6e1157724bba1a6 (cherry picked from commit 8065e33626b8b9cf02caaa12b345b538535a8acf) (cherry picked from commit 4c13d773bf597fc31f97cdd6fdd6085d6aec44b6)
Diffstat (limited to 'svtools')
-rw-r--r--svtools/source/graphic/grfmgr.cxx15
1 files changed, 9 insertions, 6 deletions
diff --git a/svtools/source/graphic/grfmgr.cxx b/svtools/source/graphic/grfmgr.cxx
index 9c5b89f15595..003063d7c0a6 100644
--- a/svtools/source/graphic/grfmgr.cxx
+++ b/svtools/source/graphic/grfmgr.cxx
@@ -77,7 +77,8 @@ GraphicObject::GraphicObject() :
{
ImplConstruct();
ImplAssignGraphicData();
- ImplSetGraphicManager();
+ ImplEnsureGraphicManager();
+ mpMgr->ImplRegisterObj(*this, maGraphic, nullptr, nullptr);
}
GraphicObject::GraphicObject( const Graphic& rGraphic ) :
@@ -87,7 +88,8 @@ GraphicObject::GraphicObject( const Graphic& rGraphic ) :
{
ImplConstruct();
ImplAssignGraphicData();
- ImplSetGraphicManager();
+ ImplEnsureGraphicManager();
+ mpMgr->ImplRegisterObj(*this, maGraphic, nullptr, nullptr);
}
GraphicObject::GraphicObject( const GraphicObject& rGraphicObj ) :
@@ -98,7 +100,8 @@ GraphicObject::GraphicObject( const GraphicObject& rGraphicObj ) :
{
ImplConstruct();
ImplAssignGraphicData();
- ImplSetGraphicManager(nullptr, &rGraphicObj);
+ ImplEnsureGraphicManager();
+ mpMgr->ImplRegisterObj(*this, maGraphic, nullptr, &rGraphicObj);
if( rGraphicObj.HasUserData() && rGraphicObj.IsSwappedOut() )
SetSwapState();
}
@@ -112,7 +115,8 @@ GraphicObject::GraphicObject( const OString& rUniqueID ) :
// assign default properties
ImplAssignGraphicData();
- ImplSetGraphicManager(&rUniqueID);
+ ImplEnsureGraphicManager();
+ mpMgr->ImplRegisterObj(*this, maGraphic, &rUniqueID, nullptr);
// update properties
ImplAssignGraphicData();
@@ -161,7 +165,7 @@ void GraphicObject::ImplAssignGraphicData()
ImplAfterDataChange();
}
-void GraphicObject::ImplSetGraphicManager(const OString* pID, const GraphicObject* pCopyObj)
+void GraphicObject::ImplEnsureGraphicManager()
{
if (!mpGlobalMgr)
{
@@ -187,7 +191,6 @@ void GraphicObject::ImplSetGraphicManager(const OString* pID, const GraphicObjec
}
mpMgr = mpGlobalMgr;
- mpMgr->ImplRegisterObj( *this, maGraphic, pID, pCopyObj );
}
void GraphicObject::ImplAutoSwapIn()