From 85c5c168f00bb1f8571834587f3693efdfc2e4b3 Mon Sep 17 00:00:00 2001 From: Noel Date: Tue, 2 Feb 2021 13:28:54 +0200 Subject: use unique_ptr in ImpHandleMotionThroughBoxesKeyInput Change-Id: Ieccf70ca52a639204cd576449c0d89c3419835fe Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110312 Tested-by: Jenkins Reviewed-by: Noel Grandin --- svx/source/svdraw/svdedxv.cxx | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'svx') diff --git a/svx/source/svdraw/svdedxv.cxx b/svx/source/svdraw/svdedxv.cxx index 75190e09072c..a066f62d4471 100644 --- a/svx/source/svdraw/svdedxv.cxx +++ b/svx/source/svdraw/svdedxv.cxx @@ -1766,8 +1766,8 @@ bool SdrObjEditView::IsTextEditFrameHit(const Point& rHit) const return bOk; } -TextChainCursorManager* SdrObjEditView::ImpHandleMotionThroughBoxesKeyInput(const KeyEvent& rKEvt, - bool* bOutHandled) +std::unique_ptr +SdrObjEditView::ImpHandleMotionThroughBoxesKeyInput(const KeyEvent& rKEvt, bool* bOutHandled) { *bOutHandled = false; @@ -1778,7 +1778,8 @@ TextChainCursorManager* SdrObjEditView::ImpHandleMotionThroughBoxesKeyInput(cons if (!pTextObj->GetNextLinkInChain() && !pTextObj->GetPrevLinkInChain()) return nullptr; - TextChainCursorManager* pCursorManager = new TextChainCursorManager(this, pTextObj); + std::unique_ptr pCursorManager( + new TextChainCursorManager(this, pTextObj)); if (pCursorManager->HandleKeyEvent(rKEvt)) { // Possibly do other stuff here if necessary... -- cgit