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/svdograf.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/svdograf.hxx')
-rw-r--r-- | include/svx/svdograf.hxx | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/include/svx/svdograf.hxx b/include/svx/svdograf.hxx index 9b1a4631b376..e07864d3423b 100644 --- a/include/svx/svdograf.hxx +++ b/include/svx/svdograf.hxx @@ -84,7 +84,6 @@ private: friend class SdrExchangeView; // Only for a ForceSwapIn() call. friend class SdrGraphicLink; -private: virtual sdr::contact::ViewContact* CreateObjectSpecificViewContact() override; virtual sdr::properties::BaseProperties* CreateObjectSpecificProperties() override; @@ -115,8 +114,6 @@ private: bool mbIsSignatureLineCanAddComment; css::uno::Reference<css::graphic::XGraphic> mpSignatureLineUnsignedGraphic; -private: - void ImpRegisterLink(); void ImpDeregisterLink(); bool ImpUpdateGraphicLink( bool bAsynchron = true ) const; @@ -126,8 +123,11 @@ private: void onGraphicChanged(); GDIMetaFile GetMetaFile(GraphicType &rGraphicType) const; -public: +protected: + // protected destructor + virtual ~SdrGrafObj() override; +public: SdrGrafObj(SdrModel& rSdrModel); SdrGrafObj( SdrModel& rSdrModel, @@ -137,8 +137,6 @@ public: const Graphic& rGrf, const tools::Rectangle& rRect); - virtual ~SdrGrafObj() override; - void SetGraphicObject( const GraphicObject& rGrfObj ); const GraphicObject& GetGraphicObject(bool bForceSwapIn = false) const; const GraphicObject* GetReplacementGraphicObject() const; @@ -185,7 +183,7 @@ public: // #i25616# virtual basegfx::B2DPolyPolygon TakeXorPoly() const override; - virtual SdrGrafObj* Clone(SdrModel* pTargetModel = nullptr) const override; + virtual SdrGrafObj* CloneSdrObject(SdrModel& rTargetModel) const override; SdrGrafObj& operator=(const SdrGrafObj& rObj); virtual sal_uInt32 GetHdlCount() const override; |