svx/source/engine3d/scene3d.cxx | 8 +++++++- svx/source/svdraw/svdogrp.cxx | 19 ++++++++++++++----- svx/source/svdraw/svdotext.cxx | 5 +++-- 3 files changed, 24 insertions(+), 8 deletions(-)
New commits: commit e1a8338876bd161de4e9d9a4b22d4bc5335f7cee Author: Armin Le Grand <armin.le.gr...@cib.de> Date: Fri May 18 16:15:02 2018 +0200 tdf#116979 Fixed 3D operator= to correct copy/paste Change-Id: I81483a4d23523650cd9098794dd6101253b88e1c Reviewed-on: https://gerrit.libreoffice.org/54546 Tested-by: Jenkins <c...@libreoffice.org> Reviewed-by: Armin Le Grand <armin.le.gr...@cib.de> diff --git a/svx/source/engine3d/scene3d.cxx b/svx/source/engine3d/scene3d.cxx index 43661be94345..01fa06cc1b37 100644 --- a/svx/source/engine3d/scene3d.cxx +++ b/svx/source/engine3d/scene3d.cxx @@ -423,12 +423,18 @@ E3dScene& E3dScene::operator=(const E3dScene& rSource) // call parent E3dObject::operator=(rSource); - // copy local data + // copy child SdrObjects if (rSource.GetSubList()) { CopyObjects(*rSource.GetSubList()); + + // 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 data aCamera = rSource.aCamera; aCameraSet = rSource.aCameraSet; static_cast<sdr::properties::E3dSceneProperties&>(GetProperties()).SetSceneItemsFromCamera(); 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; _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits