summaryrefslogtreecommitdiff
path: root/svx/source/svdraw/svdoattr.cxx
diff options
context:
space:
mode:
authorArmin Le Grand <Armin.Le.Grand@cib.de>2018-04-06 22:32:24 +0200
committerArmin Le Grand <Armin.Le.Grand@cib.de>2018-04-06 22:32:24 +0200
commiteba4d5b2b76cefde90cb3d6638c736f435023a45 (patch)
tree43befa620475c11f3dde00e5ea141e1efd95a334 /svx/source/svdraw/svdoattr.cxx
parent6c14c27c75a03e2363f2b363ddf0a6f2f46cfa91 (diff)
Revert "SOSAW080: Added first bunch of basic changes to helpers"
This reverts commit 6c14c27c75a03e2363f2b363ddf0a6f2f46cfa91.
Diffstat (limited to 'svx/source/svdraw/svdoattr.cxx')
-rw-r--r--svx/source/svdraw/svdoattr.cxx22
1 files changed, 20 insertions, 2 deletions
diff --git a/svx/source/svdraw/svdoattr.cxx b/svx/source/svdraw/svdoattr.cxx
index f33a47e63ee5..1f118f838f84 100644
--- a/svx/source/svdraw/svdoattr.cxx
+++ b/svx/source/svdraw/svdoattr.cxx
@@ -80,8 +80,7 @@ sdr::properties::BaseProperties* SdrAttrObj::CreateObjectSpecificProperties()
}
-SdrAttrObj::SdrAttrObj(SdrModel& rSdrModel)
-: SdrObject(rSdrModel)
+SdrAttrObj::SdrAttrObj()
{
}
@@ -100,7 +99,26 @@ const tools::Rectangle& SdrAttrObj::GetSnapRect() const
return maSnapRect;
}
+void SdrAttrObj::SetModel(SdrModel* pNewModel)
+{
+ SdrModel* pOldModel = pModel;
+
+ // test for correct pool in ItemSet; move to new pool if necessary
+ if(pNewModel && &GetObjectItemPool() != &pNewModel->GetItemPool())
+ {
+ MigrateItemPool(&GetObjectItemPool(), &pNewModel->GetItemPool(), pNewModel);
+ }
+
+ // call parent
+ SdrObject::SetModel(pNewModel);
+
+ // modify properties
+ GetProperties().SetModel(pOldModel, pNewModel);
+}
+
+
// syntactical sugar for ItemSet accesses
+
void SdrAttrObj::Notify(SfxBroadcaster& /*rBC*/, const SfxHint& rHint)
{
bool bDataChg(SfxHintId::DataChanged == rHint.GetId());