diff options
Diffstat (limited to 'svx/source/svdraw/svdogrp.cxx')
-rwxr-xr-x | svx/source/svdraw/svdogrp.cxx | 43 |
1 files changed, 24 insertions, 19 deletions
diff --git a/svx/source/svdraw/svdogrp.cxx b/svx/source/svdraw/svdogrp.cxx index 5c73ea0a78..bd751c4a86 100755 --- a/svx/source/svdraw/svdogrp.cxx +++ b/svx/source/svdraw/svdogrp.cxx @@ -295,26 +295,31 @@ const Rectangle& SdrObjGroup::GetSnapRect() const } } -void SdrObjGroup::operator=(const SdrObject& rObj) +SdrObjGroup* SdrObjGroup::Clone() const { - if(rObj.IsGroupObject()) - { - // copy SdrObject stuff - SdrObject::operator=(rObj); - - // #i36404# - // copy SubList, init model and page first - SdrObjList& rSourceSubList = *rObj.GetSubList(); - pSub->SetPage(rSourceSubList.GetPage()); - pSub->SetModel(rSourceSubList.GetModel()); - pSub->CopyObjects(*rObj.GetSubList()); - - // copy local paremeters - nDrehWink =((SdrObjGroup&)rObj).nDrehWink; - nShearWink =((SdrObjGroup&)rObj).nShearWink; - aRefPoint =((SdrObjGroup&)rObj).aRefPoint; - bRefPoint =((SdrObjGroup&)rObj).bRefPoint; - } + return CloneHelper< SdrObjGroup >(); +} + +SdrObjGroup& SdrObjGroup::operator=(const SdrObjGroup& rObj) +{ + if( this == &rObj ) + return *this; + // copy SdrObject stuff + SdrObject::operator=(rObj); + + // #i36404# + // copy SubList, init model and page first + SdrObjList& rSourceSubList = *rObj.GetSubList(); + pSub->SetPage(rSourceSubList.GetPage()); + pSub->SetModel(rSourceSubList.GetModel()); + pSub->CopyObjects(*rObj.GetSubList()); + + // copy local paremeters + nDrehWink = rObj.nDrehWink; + nShearWink = rObj.nShearWink; + aRefPoint = rObj.aRefPoint; + bRefPoint = rObj.bRefPoint; + return *this; } |