Kaydet (Commit) 2b222373 authored tarafından Noel Grandin's avatar Noel Grandin

loplugin:useuniqueptr in SdrPage

Change-Id: Ie3a471e67b7596c967a38b26c250f82f16b80e61
Reviewed-on: https://gerrit.libreoffice.org/53754Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarNoel Grandin <noel.grandin@collabora.co.uk>
üst 09cfe07c
...@@ -421,7 +421,7 @@ public: ...@@ -421,7 +421,7 @@ public:
protected: protected:
// new MasterPageDescriptorVector // new MasterPageDescriptorVector
sdr::MasterPageDescriptor* mpMasterPageDescriptor; std::unique_ptr<sdr::MasterPageDescriptor> mpMasterPageDescriptor;
SdrLayerIDSet aPrefVisiLayers; SdrLayerIDSet aPrefVisiLayers;
sal_uInt16 nPageNum; sal_uInt16 nPageNum;
......
...@@ -1413,7 +1413,7 @@ void SdrPage::TRG_SetMasterPage(SdrPage& rNew) ...@@ -1413,7 +1413,7 @@ void SdrPage::TRG_SetMasterPage(SdrPage& rNew)
if(mpMasterPageDescriptor) if(mpMasterPageDescriptor)
TRG_ClearMasterPage(); TRG_ClearMasterPage();
mpMasterPageDescriptor = new sdr::MasterPageDescriptor(*this, rNew); mpMasterPageDescriptor.reset(new sdr::MasterPageDescriptor(*this, rNew));
GetViewContact().ActionChanged(); GetViewContact().ActionChanged();
} }
...@@ -1426,8 +1426,7 @@ void SdrPage::TRG_ClearMasterPage() ...@@ -1426,8 +1426,7 @@ void SdrPage::TRG_ClearMasterPage()
// the flushViewObjectContacts() will do needed invalidates by deleting the involved VOCs // the flushViewObjectContacts() will do needed invalidates by deleting the involved VOCs
mpMasterPageDescriptor->GetUsedPage().GetViewContact().flushViewObjectContacts(); mpMasterPageDescriptor->GetUsedPage().GetViewContact().flushViewObjectContacts();
delete mpMasterPageDescriptor; mpMasterPageDescriptor.reset();
mpMasterPageDescriptor = nullptr;
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment