summaryrefslogtreecommitdiff
path: root/include/svx/svdomedia.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/svdomedia.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/svdomedia.hxx')
-rw-r--r--include/svx/svdomedia.hxx3
1 files changed, 2 insertions, 1 deletions
diff --git a/include/svx/svdomedia.hxx b/include/svx/svdomedia.hxx
index 9eab605e8ef4..bc80acfff76c 100644
--- a/include/svx/svdomedia.hxx
+++ b/include/svx/svdomedia.hxx
@@ -41,6 +41,8 @@ private:
public:
SdrMediaObj(SdrModel& rSdrModel);
+ // Copy constructor
+ SdrMediaObj(SdrModel& rSdrModel, SdrMediaObj const & rSource);
SdrMediaObj(
SdrModel& rSdrModel,
const tools::Rectangle& rRect);
@@ -54,7 +56,6 @@ public:
virtual OUString TakeObjNamePlural() const override;
virtual SdrMediaObj* CloneSdrObject(SdrModel& rTargetModel) const override;
- SdrMediaObj& operator=(const SdrMediaObj& rObj);
virtual void AdjustToMaxRect( const tools::Rectangle& rMaxRect, bool bShrinkOnly = false ) override;