diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-06-22 13:21:59 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-06-25 09:12:56 +0200 |
commit | 99d5312a56a4c12301f9c235b4d51b8a5cec3d71 (patch) | |
tree | 686e966a91c6c18e75353d3a12d9a849552e37c5 /sd/source/ui | |
parent | e5dfdbcc2084bfdb213afbe03d00136e93d5c4d2 (diff) |
loplugin:useuniqueptr in SdNavigatorWin
Change-Id: Ib1005ab0a0a007d2bad956c8ca0c23c475736d5f
Reviewed-on: https://gerrit.libreoffice.org/56332
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sd/source/ui')
-rw-r--r-- | sd/source/ui/dlg/navigatr.cxx | 8 | ||||
-rw-r--r-- | sd/source/ui/inc/navigatr.hxx | 4 |
2 files changed, 6 insertions, 6 deletions
diff --git a/sd/source/ui/dlg/navigatr.cxx b/sd/source/ui/dlg/navigatr.cxx index e7a40b65a2e9..754a198caf82 100644 --- a/sd/source/ui/dlg/navigatr.cxx +++ b/sd/source/ui/dlg/navigatr.cxx @@ -106,8 +106,8 @@ SdNavigatorWin::SdNavigatorWin(vcl::Window* pParent, SfxBindings* pInBindings) void SdNavigatorWin::SetUpdateRequestFunctor(const UpdateRequestFunctor& rUpdateRequest) { - mpNavigatorCtrlItem = new SdNavigatorControllerItem(SID_NAVIGATOR_STATE, this, mpBindings, rUpdateRequest); - mpPageNameCtrlItem = new SdPageNameControllerItem(SID_NAVIGATOR_PAGENAME, this, mpBindings); + mpNavigatorCtrlItem.reset( new SdNavigatorControllerItem(SID_NAVIGATOR_STATE, this, mpBindings, rUpdateRequest) ); + mpPageNameCtrlItem.reset( new SdPageNameControllerItem(SID_NAVIGATOR_PAGENAME, this, mpBindings) ); // InitTlb; is initiated over Slot if (rUpdateRequest) @@ -121,8 +121,8 @@ SdNavigatorWin::~SdNavigatorWin() void SdNavigatorWin::dispose() { - DELETEZ(mpNavigatorCtrlItem); - DELETEZ(mpPageNameCtrlItem); + mpNavigatorCtrlItem.reset(); + mpPageNameCtrlItem.reset(); maToolbox.clear(); maTlbObjects.clear(); maLbDocs.clear(); diff --git a/sd/source/ui/inc/navigatr.hxx b/sd/source/ui/inc/navigatr.hxx index 5a01453bdf95..a66e66878df0 100644 --- a/sd/source/ui/inc/navigatr.hxx +++ b/sd/source/ui/inc/navigatr.hxx @@ -120,8 +120,8 @@ private: NavigatorDragType meDragType; std::vector<NavDocInfo> maDocList; SfxBindings* mpBindings; - SdNavigatorControllerItem* mpNavigatorCtrlItem; - SdPageNameControllerItem* mpPageNameCtrlItem; + std::unique_ptr<SdNavigatorControllerItem> mpNavigatorCtrlItem; + std::unique_ptr<SdPageNameControllerItem> mpPageNameCtrlItem; /** This flag controls whether all shapes or only the named shapes are shown. |