diff options
author | Noel <noel.grandin@collabora.co.uk> | 2021-02-09 13:42:22 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-02-10 07:35:41 +0100 |
commit | 09cb778b6eb7d3a5b9029965a1320b49c90e7295 (patch) | |
tree | 63d75bc66ddbe4af5f6a52f4a0d65e9b199dbae7 /svx/inc | |
parent | ccdee8eebaa56619248e35001017226eecfe4e83 (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 'svx/inc')
-rw-r--r-- | svx/inc/extrud3d.hxx | 4 | ||||
-rw-r--r-- | svx/inc/polygn3d.hxx | 4 |
2 files changed, 2 insertions, 6 deletions
diff --git a/svx/inc/extrud3d.hxx b/svx/inc/extrud3d.hxx index 6836359a6ab5..1b0e5a248171 100644 --- a/svx/inc/extrud3d.hxx +++ b/svx/inc/extrud3d.hxx @@ -58,6 +58,7 @@ public: const E3dDefaultAttributes& rDefault, const basegfx::B2DPolyPolygon& rPP, double fDepth); + E3dExtrudeObj(SdrModel& rSdrModel, E3dExtrudeObj const & rSource); E3dExtrudeObj(SdrModel& rSdrModel); // PercentDiagonal: 0..100, before 0.0..0.5 @@ -96,9 +97,6 @@ public: virtual E3dExtrudeObj* CloneSdrObject(SdrModel& rTargetModel) const override; - // implemented mainly for the purposes of Clone() - E3dExtrudeObj& operator=(const E3dExtrudeObj& rObj); - // TakeObjName...() is for the display in the UI (for example "3 frames selected") virtual OUString TakeObjNameSingul() const override; virtual OUString TakeObjNamePlural() const override; diff --git a/svx/inc/polygn3d.hxx b/svx/inc/polygn3d.hxx index 2665efdffcb8..5a4a234eb191 100644 --- a/svx/inc/polygn3d.hxx +++ b/svx/inc/polygn3d.hxx @@ -46,6 +46,7 @@ public: E3dPolygonObj(SdrModel& rSdrModel, const basegfx::B3DPolyPolygon& rPolyPoly3D); E3dPolygonObj(SdrModel& rSdrModel); + E3dPolygonObj(SdrModel& rSdrModel, E3dPolygonObj const& rSource); const basegfx::B3DPolyPolygon& GetPolyPolygon3D() const { return aPolyPoly3D; } const basegfx::B3DPolyPolygon& GetPolyNormals3D() const { return aPolyNormals3D; } @@ -56,9 +57,6 @@ public: virtual E3dPolygonObj* CloneSdrObject(SdrModel& rTargetModel) const override; - // implemented mainly for the purposes of Clone() - E3dPolygonObj& operator=(const E3dPolygonObj& rObj); - // LineOnly? bool GetLineOnly() const { return bLineOnly; } void SetLineOnly(bool bNew); |