summaryrefslogtreecommitdiffstats
path: root/include/svx/svdoole2.hxx
diff options
context:
space:
mode:
authorArmin Le Grand <Armin.Le.Grand@cib.de>2018-05-07 11:44:26 +0200
committerArmin Le Grand <Armin.Le.Grand@cib.de>2018-05-08 01:53:46 +0200
commit91b0d2122bdee361bf5412a42d48ff051159cbf2 (patch)
tree003ef60b93668847803a812486534ebc805e6546 /include/svx/svdoole2.hxx
parentRefactor CommonSalLayout font handling (diff)
downloadcore-91b0d2122bdee361bf5412a42d48ff051159cbf2.tar.gz
core-91b0d2122bdee361bf5412a42d48ff051159cbf2.zip
tdf#116977 secured ::Clone methods
Renamed SdrPage::Clone -> SdrPage::CloneSdrPage Renamed SdrObject::Clone -> SdrObject::CloneSdrObject Giving SdrModel is no longer an option, but a must (as reference). This makes future changes more safe by force usage to think about it. Also equals the constructors which already require a target SdrModel. Done the same for ::CloneSdrPage. Change-Id: I06f0129e15140bd8693db27a445037d7e2f7f652 Reviewed-on: https://gerrit.libreoffice.org/53933 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Armin Le Grand <Armin.Le.Grand@cib.de>
Diffstat (limited to 'include/svx/svdoole2.hxx')
-rw-r--r--include/svx/svdoole2.hxx7
1 files changed, 4 insertions, 3 deletions
diff --git a/include/svx/svdoole2.hxx b/include/svx/svdoole2.hxx
index 6122eef9c5dc..7dc190b33b67 100644
--- a/include/svx/svdoole2.hxx
+++ b/include/svx/svdoole2.hxx
@@ -65,6 +65,9 @@ protected:
virtual sdr::contact::ViewContact* CreateObjectSpecificViewContact() override;
virtual sdr::properties::BaseProperties* CreateObjectSpecificProperties() override;
+ // protected destructor
+ virtual ~SdrOle2Obj() override;
+
public:
OUString GetStyleString();
@@ -77,8 +80,6 @@ public:
const OUString& rNewObjName,
const tools::Rectangle& rNewRect);
- virtual ~SdrOle2Obj() override;
-
const svt::EmbeddedObjectRef& getEmbeddedObjectRef() const;
sal_Int64 GetAspect() const;
@@ -136,7 +137,7 @@ public:
virtual OUString TakeObjNameSingul() const override;
virtual OUString TakeObjNamePlural() const override;
- virtual SdrOle2Obj* Clone(SdrModel* pTargetModel = nullptr) const override;
+ virtual SdrOle2Obj* CloneSdrObject(SdrModel& rTargetModel) const override;
SdrOle2Obj& assignFrom(const SdrOle2Obj& rObj);
SdrOle2Obj& operator=(const SdrOle2Obj& rObj);