[Libreoffice-commits] core.git: include/svx svx/source
Noel Grandin (via logerrit)
logerrit at kemper.freedesktop.org
Thu Mar 28 06:41:18 UTC 2019
include/svx/svdpage.hxx | 2 +-
svx/source/svdraw/svdpage.cxx | 10 +++++-----
2 files changed, 6 insertions(+), 6 deletions(-)
New commits:
commit 471fdea812f1ce9be349474bc3817bbb75186bba
Author: Noel Grandin <noel.grandin at collabora.co.uk>
AuthorDate: Wed Mar 27 11:11:54 2019 +0200
Commit: Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Thu Mar 28 07:40:46 2019 +0100
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 at collabora.co.uk>
diff --git a/include/svx/svdpage.hxx b/include/svx/svdpage.hxx
index d78652d1f262..24747bc823a9 100644
--- a/include/svx/svdpage.hxx
+++ b/include/svx/svdpage.hxx
@@ -392,7 +392,7 @@ public:
SdrModel& getSdrModelFromSdrPage() const { return mrSdrModelFromSdrPage; }
protected:
- sdr::contact::ViewContact* CreateObjectSpecificViewContact();
+ std::unique_ptr<sdr::contact::ViewContact> CreateObjectSpecificViewContact();
public:
const sdr::contact::ViewContact& GetViewContact() const;
sdr::contact::ViewContact& GetViewContact();
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;
}
More information about the Libreoffice-commits
mailing list