From babaa7afcf38763511a152dcc467c2812349207b Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Fri, 4 May 2018 16:12:47 +0200 Subject: loplugin:useuniqueptr in SvxTableController Change-Id: I505f0fe1626e6b935c4194cceaa0f4d0f8756656 Reviewed-on: https://gerrit.libreoffice.org/53879 Tested-by: Jenkins Reviewed-by: Noel Grandin --- svx/source/table/tablecontroller.cxx | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'svx') diff --git a/svx/source/table/tablecontroller.cxx b/svx/source/table/tablecontroller.cxx index ecdd0a233be5..9e70356369e3 100644 --- a/svx/source/table/tablecontroller.cxx +++ b/svx/source/table/tablecontroller.cxx @@ -2183,7 +2183,7 @@ void SvxTableController::updateSelectionOverlay() sdr::overlay::OverlayObjectCell* pOverlay = new sdr::overlay::OverlayObjectCell( aHighlight, aRanges ); xOverlayManager->add(*pOverlay); - mpSelectionOverlay = new sdr::overlay::OverlayObjectList; + mpSelectionOverlay.reset(new sdr::overlay::OverlayObjectList); mpSelectionOverlay->append(pOverlay); } } @@ -2221,8 +2221,7 @@ void SvxTableController::destroySelectionOverlay() { if( mpSelectionOverlay ) { - delete mpSelectionOverlay; - mpSelectionOverlay = nullptr; + mpSelectionOverlay.reset(); if (comphelper::LibreOfficeKit::isActive()) { -- cgit