summaryrefslogtreecommitdiff
path: root/include/svx/svdovirt.hxx
diff options
context:
space:
mode:
authorNoel <noel.grandin@collabora.co.uk>2021-02-09 13:42:22 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2021-02-10 07:35:41 +0100
commit09cb778b6eb7d3a5b9029965a1320b49c90e7295 (patch)
tree63d75bc66ddbe4af5f6a52f4a0d65e9b199dbae7 /include/svx/svdovirt.hxx
parentccdee8eebaa56619248e35001017226eecfe4e83 (diff)
clean up SdrObject cloning
using operator= implies that overwriting an SdrObject is a useful operation, but that is not at all true - they are typically linked into and referred to by many other things. So rather use a copy-constructor. Also clean up a couple of weird "do some stuff after the clone" code into the main copy constructor. Change-Id: Iefc1481b527602748b5f3abed06e7cca66c0581c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110633 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'include/svx/svdovirt.hxx')
-rw-r--r--include/svx/svdovirt.hxx3
1 files changed, 2 insertions, 1 deletions
diff --git a/include/svx/svdovirt.hxx b/include/svx/svdovirt.hxx
index eade82c13c42..420fb6caed26 100644
--- a/include/svx/svdovirt.hxx
+++ b/include/svx/svdovirt.hxx
@@ -52,6 +52,8 @@ protected:
public:
SdrVirtObj(SdrModel& rSdrModel, SdrObject& rNewObj);
+ // Copy constructor
+ SdrVirtObj(SdrModel& rSdrModel, SdrVirtObj const& rSource);
SdrObject& ReferencedObj();
const SdrObject& GetReferencedObj() const;
@@ -66,7 +68,6 @@ public:
virtual const tools::Rectangle& GetLastBoundRect() const override;
virtual void RecalcBoundRect() override;
virtual SdrVirtObj* CloneSdrObject(SdrModel& rTargetModel) const override;
- SdrVirtObj& operator=(const SdrVirtObj& rObj);
virtual OUString TakeObjNameSingul() const override;
virtual OUString TakeObjNamePlural() const override;