summaryrefslogtreecommitdiff
path: root/svx/source/svdraw/svdogrp.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'svx/source/svdraw/svdogrp.cxx')
-rw-r--r--svx/source/svdraw/svdogrp.cxx54
1 files changed, 25 insertions, 29 deletions
diff --git a/svx/source/svdraw/svdogrp.cxx b/svx/source/svdraw/svdogrp.cxx
index 34ae1c55fe8a..1242ec6a5cf4 100644
--- a/svx/source/svdraw/svdogrp.cxx
+++ b/svx/source/svdraw/svdogrp.cxx
@@ -55,6 +55,30 @@ SdrObjGroup::SdrObjGroup(SdrModel& rSdrModel)
bClosedObj=false;
}
+SdrObjGroup::SdrObjGroup(SdrModel& rSdrModel, SdrObjGroup const & rSource)
+: SdrObject(rSdrModel, rSource),
+ SdrObjList()
+{
+ bClosedObj=false;
+
+ // copy child SdrObjects
+ if(nullptr != rSource.GetSubList())
+ {
+ // #i36404# Copy SubList, init model and page first
+ const SdrObjList& rSourceSubList(*rSource.GetSubList());
+
+ CopyObjects(rSourceSubList);
+
+ // tdf#116979: needed here, we need bSnapRectDirty to be true
+ // which it is after using SdrObject::operator= (see above),
+ // but set to false again using CopyObjects
+ SetRectsDirty();
+ }
+
+ // copy local parameters
+ aRefPoint = rSource.aRefPoint;
+}
+
SdrObjGroup::~SdrObjGroup()
{
}
@@ -196,37 +220,9 @@ const tools::Rectangle& SdrObjGroup::GetSnapRect() const
SdrObjGroup* SdrObjGroup::CloneSdrObject(SdrModel& rTargetModel) const
{
- return CloneHelper< SdrObjGroup >(rTargetModel);
+ return new SdrObjGroup(rTargetModel, *this);
}
-SdrObjGroup& SdrObjGroup::operator=(const SdrObjGroup& rObj)
-{
- if( this == &rObj )
- return *this;
-
- // copy SdrObject stuff
- SdrObject::operator=(rObj);
-
- // copy child SdrObjects
- if(nullptr != rObj.GetSubList())
- {
- // #i36404# Copy SubList, init model and page first
- const SdrObjList& rSourceSubList(*rObj.GetSubList());
-
- CopyObjects(rSourceSubList);
-
- // tdf#116979: needed here, we need bSnapRectDirty to be true
- // which it is after using SdrObject::operator= (see above),
- // but set to false again using CopyObjects
- SetRectsDirty();
- }
-
- // copy local parameters
- aRefPoint = rObj.aRefPoint;
- return *this;
-}
-
-
OUString SdrObjGroup::TakeObjNameSingul() const
{
OUStringBuffer sName;