[Libreoffice-commits] core.git: sd/source
Noel Grandin
noel.grandin at collabora.co.uk
Mon Jun 25 12:09:20 UTC 2018
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.grandin at 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.grandin at 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();
}
More information about the Libreoffice-commits
mailing list