diff options
author | Armin Le Grand <Armin.Le.Grand@cib.de> | 2018-05-07 11:44:26 +0200 |
---|---|---|
committer | Armin Le Grand <Armin.Le.Grand@cib.de> | 2018-05-08 01:53:46 +0200 |
commit | 91b0d2122bdee361bf5412a42d48ff051159cbf2 (patch) | |
tree | 003ef60b93668847803a812486534ebc805e6546 /include/svx/svdopath.hxx | |
parent | bdccb7e9991d83029eb2f2f11327b54534a00db8 (diff) |
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/svdopath.hxx')
-rw-r--r-- | include/svx/svdopath.hxx | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/include/svx/svdopath.hxx b/include/svx/svdopath.hxx index 6c21fd06571a..d626747f31b6 100644 --- a/include/svx/svdopath.hxx +++ b/include/svx/svdopath.hxx @@ -61,6 +61,10 @@ private: void ImpForceLineAngle(); ImpPathForDragAndCreate& impGetDAC() const; +private: + // protected destructor - due to final, make private + virtual ~SdrPathObj() override; + public: SdrPathObj( SdrModel& rSdrModel, @@ -70,12 +74,10 @@ public: SdrObjKind eNewKind, const basegfx::B2DPolyPolygon& rPathPoly); - virtual ~SdrPathObj() override; - virtual void TakeObjInfo(SdrObjTransformInfoRec& rInfo) const override; virtual sal_uInt16 GetObjIdentifier() const override; virtual void TakeUnrotatedSnapRect(tools::Rectangle& rRect) const override; - virtual SdrPathObj* Clone(SdrModel* pTargetModel = nullptr) const override; + virtual SdrPathObj* CloneSdrObject(SdrModel& rTargetModel) const override; SdrPathObj& operator=(const SdrPathObj& rObj); virtual OUString TakeObjNameSingul() const override; |