diff options
-rw-r--r-- | include/svx/svdpage.hxx | 2 | ||||
-rw-r--r-- | svx/source/svdraw/svdpage.cxx | 5 |
2 files changed, 3 insertions, 4 deletions
diff --git a/include/svx/svdpage.hxx b/include/svx/svdpage.hxx index f6899da1a86d..a4cc40feebd4 100644 --- a/include/svx/svdpage.hxx +++ b/include/svx/svdpage.hxx @@ -421,7 +421,7 @@ public: protected: // new MasterPageDescriptorVector - sdr::MasterPageDescriptor* mpMasterPageDescriptor; + std::unique_ptr<sdr::MasterPageDescriptor> mpMasterPageDescriptor; SdrLayerIDSet aPrefVisiLayers; sal_uInt16 nPageNum; diff --git a/svx/source/svdraw/svdpage.cxx b/svx/source/svdraw/svdpage.cxx index 71207b6d4f88..a5d16568e049 100644 --- a/svx/source/svdraw/svdpage.cxx +++ b/svx/source/svdraw/svdpage.cxx @@ -1413,7 +1413,7 @@ void SdrPage::TRG_SetMasterPage(SdrPage& rNew) if(mpMasterPageDescriptor) TRG_ClearMasterPage(); - mpMasterPageDescriptor = new sdr::MasterPageDescriptor(*this, rNew); + mpMasterPageDescriptor.reset(new sdr::MasterPageDescriptor(*this, rNew)); GetViewContact().ActionChanged(); } @@ -1426,8 +1426,7 @@ void SdrPage::TRG_ClearMasterPage() // the flushViewObjectContacts() will do needed invalidates by deleting the involved VOCs mpMasterPageDescriptor->GetUsedPage().GetViewContact().flushViewObjectContacts(); - delete mpMasterPageDescriptor; - mpMasterPageDescriptor = nullptr; + mpMasterPageDescriptor.reset(); } } |