summaryrefslogtreecommitdiff
path: root/include/svx/svdotable.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/svdotable.hxx
parentbdccb7e9991d83029eb2f2f11327b54534a00db8 (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/svdotable.hxx')
-rw-r--r--include/svx/svdotable.hxx8
1 files changed, 5 insertions, 3 deletions
diff --git a/include/svx/svdotable.hxx b/include/svx/svdotable.hxx
index 7c5e30ec4e8d..12e27379f5ff 100644
--- a/include/svx/svdotable.hxx
+++ b/include/svx/svdotable.hxx
@@ -97,6 +97,10 @@ class SVX_DLLPUBLIC SdrTableObj : public ::SdrTextObj
friend class Cell;
friend class SdrTableObjImpl;
+protected:
+ // protected destructor
+ virtual ~SdrTableObj() override;
+
public:
SdrTableObj(SdrModel& rSdrModel);
SdrTableObj(
@@ -105,8 +109,6 @@ public:
sal_Int32 nColumns,
sal_Int32 nRows);
- virtual ~SdrTableObj() override;
-
// Table stuff
SdrTableObj* CloneRange(
const CellPos& rStartPos,
@@ -199,7 +201,7 @@ public:
virtual bool AdjustTextFrameWidthAndHeight() override;
virtual OUString TakeObjNameSingul() const override;
virtual OUString TakeObjNamePlural() const override;
- virtual SdrTableObj* Clone(SdrModel* pTargetModel = nullptr) const override;
+ virtual SdrTableObj* CloneSdrObject(SdrModel& rTargetModel) const override;
SdrTableObj& operator=(const SdrTableObj& rObj);
virtual void RecalcSnapRect() override;
virtual const tools::Rectangle& GetSnapRect() const override;