summaryrefslogtreecommitdiff
path: root/reportdesign/inc
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 /reportdesign/inc
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 'reportdesign/inc')
-rw-r--r--reportdesign/inc/RptObject.hxx8
1 files changed, 4 insertions, 4 deletions
diff --git a/reportdesign/inc/RptObject.hxx b/reportdesign/inc/RptObject.hxx
index fa2c7c3890ed..fe8b49d08738 100644
--- a/reportdesign/inc/RptObject.hxx
+++ b/reportdesign/inc/RptObject.hxx
@@ -190,8 +190,6 @@ public:
virtual OOle2Obj* CloneSdrObject(SdrModel& rTargetModel) const override;
virtual void initializeOle() override;
- OOle2Obj& operator=(const OOle2Obj& rObj);
-
void initializeChart( const css::uno::Reference< css::frame::XModel>& _xModel);
private:
@@ -203,6 +201,8 @@ private:
SdrModel& rSdrModel,
const OUString& _sComponentName,
SdrObjKind _nType);
+ // copy constructor
+ OOle2Obj(SdrModel& rSdrModel, const OOle2Obj& rSource);
virtual void NbcMove( const Size& rSize ) override;
virtual void NbcResize(const Point& rRef, const Fraction& xFact, const Fraction& yFact) override;
@@ -241,6 +241,8 @@ protected:
const css::uno::Reference< css::report::XReportComponent>& _xComponent,
const OUString& rModelName,
SdrObjKind _nObjectType);
+ // copy constructor
+ OUnoObject(SdrModel& rSdrModel, OUnoObject const & rSource);
// protected destructor
virtual ~OUnoObject() override;
@@ -270,8 +272,6 @@ public:
virtual SdrInventor GetObjInventor() const override;
virtual OUnoObject* CloneSdrObject(SdrModel& rTargetModel) const override;
- OUnoObject& operator=(const OUnoObject& rObj);
-
private:
virtual void impl_setUnoShape( const css::uno::Reference< css::uno::XInterface >& rxUnoShape ) override;
void impl_initializeModel_nothrow();