summaryrefslogtreecommitdiff
path: root/svx/source/svdraw/svdmodel.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 /svx/source/svdraw/svdmodel.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 'svx/source/svdraw/svdmodel.cxx')
-rw-r--r--svx/source/svdraw/svdmodel.cxx6
1 files changed, 3 insertions, 3 deletions
diff --git a/svx/source/svdraw/svdmodel.cxx b/svx/source/svdraw/svdmodel.cxx
index 47fdc5fa4e92..5be0dffeac55 100644
--- a/svx/source/svdraw/svdmodel.cxx
+++ b/svx/source/svdraw/svdmodel.cxx
@@ -1479,7 +1479,7 @@ void SdrModel::CopyPages(sal_uInt16 nFirstPageNum, sal_uInt16 nLastPageNum,
const SdrPage* pPg1=GetPage(nPageNum2);
// Clone to local model
- pPg=pPg1->Clone();
+ pPg = pPg1->CloneSdrPage(*this);
InsertPage(pPg,nDestNum);
if (bUndo)
@@ -1585,7 +1585,7 @@ void SdrModel::Merge(SdrModel& rSourceModel,
{
// Always Clone to new model
const SdrPage* pPg1(rSourceModel.GetMasterPage(i));
- SdrPage* pPg(pPg1->Clone(this));
+ SdrPage* pPg(pPg1->CloneSdrPage(*this));
if(!bTreadSourceAsConst)
{
@@ -1618,7 +1618,7 @@ void SdrModel::Merge(SdrModel& rSourceModel,
{
// Always Clone to new model
const SdrPage* pPg1(rSourceModel.GetPage(nSourcePos));
- SdrPage* pPg(pPg1->Clone(this));
+ SdrPage* pPg(pPg1->CloneSdrPage(*this));
if(!bTreadSourceAsConst)
{