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/source/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/source/inc')
-rw-r--r-- | svx/source/inc/fmobj.hxx | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/svx/source/inc/fmobj.hxx b/svx/source/inc/fmobj.hxx index d53ec819a808..6e6b2d0edb4f 100644 --- a/svx/source/inc/fmobj.hxx +++ b/svx/source/inc/fmobj.hxx @@ -56,6 +56,8 @@ public: SdrModel& rSdrModel, const OUString& rModelName); FmFormObj(SdrModel& rSdrModel); + // Copy constructor + FmFormObj(SdrModel& rSdrModel, FmFormObj const & rSource); SAL_DLLPRIVATE const css::uno::Reference< css::container::XIndexContainer>& GetOriginalParent() const { return m_xParent; } @@ -79,9 +81,6 @@ public: SAL_DLLPRIVATE virtual void NbcReformatText() override; SAL_DLLPRIVATE virtual FmFormObj* CloneSdrObject(SdrModel& rTargetModel) const override; - SAL_DLLPRIVATE FmFormObj& operator= (const FmFormObj& rObj); - - SAL_DLLPRIVATE void clonedFrom(const FmFormObj* _pSource); SAL_DLLPRIVATE static css::uno::Reference< css::uno::XInterface> ensureModelEnv( const css::uno::Reference< css::uno::XInterface>& _rSourceContainer, |