Kaydet (Commit) 8065e336 authored tarafından Caolán McNamara's avatar Caolán McNamara

move the ImplRegisterObj outside ImplSetGraphicManager and rename it

Change-Id: I1eded3ee41787b9a3339e01cf6e1157724bba1a6
üst f0ab4138
......@@ -202,10 +202,7 @@ private:
void SVT_DLLPRIVATE ImplConstruct();
void SVT_DLLPRIVATE ImplAssignGraphicData();
void SVT_DLLPRIVATE ImplSetGraphicManager(
const OString* pID = nullptr,
const GraphicObject* pCopyObj = nullptr
);
void SVT_DLLPRIVATE ImplEnsureGraphicManager();
void SVT_DLLPRIVATE ImplAutoSwapIn();
bool SVT_DLLPRIVATE ImplGetCropParams(
OutputDevice* pOut,
......
......@@ -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()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment