diff options
author | Noel <noel.grandin@collabora.co.uk> | 2021-02-02 13:28:54 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-02-02 18:41:51 +0100 |
commit | 85c5c168f00bb1f8571834587f3693efdfc2e4b3 (patch) | |
tree | 8e62f76e4b88c04d661b314d8269f46b00b02394 | |
parent | 213752056fd8fcf75819a4e3dee716ea2bcefbbd (diff) |
use unique_ptr in ImpHandleMotionThroughBoxesKeyInput
Change-Id: Ieccf70ca52a639204cd576449c0d89c3419835fe
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110312
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
-rw-r--r-- | include/svx/svdedxv.hxx | 2 | ||||
-rw-r--r-- | svx/source/svdraw/svdedxv.cxx | 7 |
2 files changed, 5 insertions, 4 deletions
diff --git a/include/svx/svdedxv.hxx b/include/svx/svdedxv.hxx index 35c4be3282c1..36763ea01656 100644 --- a/include/svx/svdedxv.hxx +++ b/include/svx/svdedxv.hxx @@ -116,7 +116,7 @@ protected: virtual SdrUndoManager* getSdrUndoManagerForEnhancedTextEdit() const; void ImpMoveCursorAfterChainingEvent(TextChainCursorManager *pCursorManager); - TextChainCursorManager *ImpHandleMotionThroughBoxesKeyInput(const KeyEvent& rKEvt, bool *bOutHandled); + std::unique_ptr<TextChainCursorManager> ImpHandleMotionThroughBoxesKeyInput(const KeyEvent& rKEvt, bool *bOutHandled); OutlinerView* ImpFindOutlinerView(vcl::Window const * pWin) const; 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<TextChainCursorManager> +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<TextChainCursorManager> pCursorManager( + new TextChainCursorManager(this, pTextObj)); if (pCursorManager->HandleKeyEvent(rKEvt)) { // Possibly do other stuff here if necessary... |