summaryrefslogtreecommitdiff
path: root/reportdesign/source/core/sdr/RptObject.cxx
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 /reportdesign/source/core/sdr/RptObject.cxx
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 'reportdesign/source/core/sdr/RptObject.cxx')
-rw-r--r--reportdesign/source/core/sdr/RptObject.cxx8
1 files changed, 4 insertions, 4 deletions
diff --git a/reportdesign/source/core/sdr/RptObject.cxx b/reportdesign/source/core/sdr/RptObject.cxx
index 8d38b5ddf478..85a50a242c58 100644
--- a/reportdesign/source/core/sdr/RptObject.cxx
+++ b/reportdesign/source/core/sdr/RptObject.cxx
@@ -883,9 +883,9 @@ void OUnoObject::impl_setUnoShape( const uno::Reference< uno::XInterface >& rxUn
releaseUnoShape();
}
-OUnoObject* OUnoObject::Clone(SdrModel* pTargetModel) const
+OUnoObject* OUnoObject::CloneSdrObject(SdrModel& rTargetModel) const
{
- return CloneHelper< OUnoObject >(pTargetModel);
+ return CloneHelper< OUnoObject >(rTargetModel);
}
OUnoObject& OUnoObject::operator=(const OUnoObject& rObj)
@@ -1089,9 +1089,9 @@ uno::Reference< chart2::data::XDatabaseDataProvider > lcl_getDataProvider(const
}
// Clone() should make a complete copy of the object.
-OOle2Obj* OOle2Obj::Clone(SdrModel* pTargetModel) const
+OOle2Obj* OOle2Obj::CloneSdrObject(SdrModel& rTargetModel) const
{
- return CloneHelper< OOle2Obj >(pTargetModel);
+ return CloneHelper< OOle2Obj >(rTargetModel);
}
OOle2Obj& OOle2Obj::operator=(const OOle2Obj& rObj)