sd/source/ui/inc/Ruler.hxx | 2 +- sd/source/ui/view/sdruler.cxx | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-)
New commits: commit cdd233d01c860d4628b627d00a94c3bbdcee85cd Author: Noel Grandin <noel.gran...@collabora.co.uk> Date: Fri Jun 22 14:14:28 2018 +0200 loplugin:useuniqueptr in sd::Ruler Change-Id: Ic1f213b039b9c3e1cedc041d3e136eb09496570d Reviewed-on: https://gerrit.libreoffice.org/56338 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk> diff --git a/sd/source/ui/inc/Ruler.hxx b/sd/source/ui/inc/Ruler.hxx index 56cb4c930196..45d800458493 100644 --- a/sd/source/ui/inc/Ruler.hxx +++ b/sd/source/ui/inc/Ruler.hxx @@ -51,7 +51,7 @@ public: private: DrawViewShell* pDrViewShell; - RulerCtrlItem* pCtrlItem; + std::unique_ptr<RulerCtrlItem> pCtrlItem; bool bHorz; virtual void MouseButtonDown(const MouseEvent& rMEvt) override; diff --git a/sd/source/ui/view/sdruler.cxx b/sd/source/ui/view/sdruler.cxx index 56e2a4f52df2..8bd4a9bb4e7c 100644 --- a/sd/source/ui/view/sdruler.cxx +++ b/sd/source/ui/view/sdruler.cxx @@ -73,7 +73,7 @@ Ruler::Ruler( DrawViewShell& rViewSh, vcl::Window* pParent, ::sd::Window* pWin, , pDrViewShell(&rViewSh) { rBindings.EnterRegistrations(); - pCtrlItem = new RulerCtrlItem(*this, rBindings); + pCtrlItem.reset( new RulerCtrlItem(*this, rBindings) ); rBindings.LeaveRegistrations(); if ( nWinStyle & WB_HSCROLL ) @@ -97,7 +97,7 @@ void Ruler::dispose() { SfxBindings& rBindings = pCtrlItem->GetBindings(); rBindings.EnterRegistrations(); - DELETEZ( pCtrlItem ); + pCtrlItem.reset(); rBindings.LeaveRegistrations(); SvxRuler::dispose(); } _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits