summaryrefslogtreecommitdiff
path: root/svx/source/svdraw
diff options
context:
space:
mode:
authorArmin Le Grand <Armin.Le.Grand@cib.de>2018-05-18 16:15:02 +0200
committerArmin Le Grand <Armin.Le.Grand@cib.de>2018-05-19 00:29:26 +0200
commite1a8338876bd161de4e9d9a4b22d4bc5335f7cee (patch)
tree4e24e44f240d2638d4163b15475da9fa4cd8cd02 /svx/source/svdraw
parent44a468323f3f011c41f892117f418987f9c98477 (diff)
tdf#116979 Fixed 3D operator= to correct copy/paste
Change-Id: I81483a4d23523650cd9098794dd6101253b88e1c Reviewed-on: https://gerrit.libreoffice.org/54546 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Armin Le Grand <Armin.Le.Grand@cib.de>
Diffstat (limited to 'svx/source/svdraw')
-rw-r--r--svx/source/svdraw/svdogrp.cxx19
-rw-r--r--svx/source/svdraw/svdotext.cxx5
2 files changed, 17 insertions, 7 deletions
diff --git a/svx/source/svdraw/svdogrp.cxx b/svx/source/svdraw/svdogrp.cxx
index 8969b5713f24..47a71bdb9a31 100644
--- a/svx/source/svdraw/svdogrp.cxx
+++ b/svx/source/svdraw/svdogrp.cxx
@@ -215,11 +215,20 @@ SdrObjGroup& SdrObjGroup::operator=(const SdrObjGroup& rObj)
// copy SdrObject stuff
SdrObject::operator=(rObj);
- // #i36404#
- // copy SubList, init model and page first
- SdrObjList& rSourceSubList = *rObj.GetSubList();
- maSdrObjList.SetPage(rSourceSubList.GetPage());
- maSdrObjList.CopyObjects(*rObj.GetSubList());
+ // copy child SdrObjects
+ if(nullptr != rObj.GetSubList())
+ {
+ // #i36404# Copy SubList, init model and page first
+ const SdrObjList& rSourceSubList(*rObj.GetSubList());
+
+ maSdrObjList.SetPage(rSourceSubList.GetPage());
+ maSdrObjList.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;
diff --git a/svx/source/svdraw/svdotext.cxx b/svx/source/svdraw/svdotext.cxx
index 686a1b76e5d1..9469e79843a1 100644
--- a/svx/source/svdraw/svdotext.cxx
+++ b/svx/source/svdraw/svdotext.cxx
@@ -1014,8 +1014,9 @@ SdrTextObj& SdrTextObj::operator=(const SdrTextObj& rObj)
{
if( this == &rObj )
return *this;
- // call parent
- SdrObject::operator=(rObj);
+
+ // call parent. tdf#116979: use the correct parent class
+ SdrAttrObj::operator=(rObj);
maRect = rObj.maRect;
aGeo =rObj.aGeo;