summaryrefslogtreecommitdiff
path: root/svx
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2019-03-27 11:11:54 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2019-03-28 07:40:46 +0100
commit471fdea812f1ce9be349474bc3817bbb75186bba (patch)
treee61a242073818f828cba9adcf3871a0eb3b67708 /svx
parentd337731d4f7017d51fab08f0edbac1effc9baf90 (diff)
return unique_ptr from SdrPage::CreateObjectSpecificViewContact
Change-Id: I3297128efd44f4df86886d6f0349420d6ce18571 Reviewed-on: https://gerrit.libreoffice.org/69855 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'svx')
-rw-r--r--svx/source/svdraw/svdpage.cxx10
1 files changed, 5 insertions, 5 deletions
diff --git a/svx/source/svdraw/svdpage.cxx b/svx/source/svdraw/svdpage.cxx
index 6e527f4ead8f..bcdf677120c6 100644
--- a/svx/source/svdraw/svdpage.cxx
+++ b/svx/source/svdraw/svdpage.cxx
@@ -981,16 +981,16 @@ void SdrPage::RemovePageUser(sdr::PageUser& rOldUser)
// DrawContact section
-sdr::contact::ViewContact* SdrPage::CreateObjectSpecificViewContact()
+std::unique_ptr<sdr::contact::ViewContact> SdrPage::CreateObjectSpecificViewContact()
{
- return new sdr::contact::ViewContactOfSdrPage(*this);
+ return std::make_unique<sdr::contact::ViewContactOfSdrPage>(*this);
}
const sdr::contact::ViewContact& SdrPage::GetViewContact() const
{
if (!mpViewContact)
- const_cast<SdrPage*>(this)->mpViewContact.reset(
- const_cast<SdrPage*>(this)->CreateObjectSpecificViewContact());
+ const_cast<SdrPage*>(this)->mpViewContact =
+ const_cast<SdrPage*>(this)->CreateObjectSpecificViewContact();
return *mpViewContact;
}
@@ -998,7 +998,7 @@ const sdr::contact::ViewContact& SdrPage::GetViewContact() const
sdr::contact::ViewContact& SdrPage::GetViewContact()
{
if (!mpViewContact)
- mpViewContact.reset(CreateObjectSpecificViewContact());
+ mpViewContact = CreateObjectSpecificViewContact();
return *mpViewContact;
}