diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-05-04 16:12:47 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-05-07 08:33:46 +0200 |
commit | babaa7afcf38763511a152dcc467c2812349207b (patch) | |
tree | 0824af3d0ed3d804c4634271c06d0881ca2fdb05 /svx | |
parent | 5c632220d3aa8faa66b44ba29fbcc560813a369a (diff) |
loplugin:useuniqueptr in SvxTableController
Change-Id: I505f0fe1626e6b935c4194cceaa0f4d0f8756656
Reviewed-on: https://gerrit.libreoffice.org/53879
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'svx')
-rw-r--r-- | svx/source/table/tablecontroller.cxx | 5 |
1 files changed, 2 insertions, 3 deletions
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()) { |