summaryrefslogtreecommitdiff
path: root/sw/source
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2018-07-23 15:28:01 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-07-24 08:35:47 +0200
commitd67d9c26476f32e4b1157f6dd6a2d2746cc9c6c8 (patch)
treef5baafc3af4d9c64771b79a9460c108395e37481 /sw/source
parent3c8a7a1553710a2798058bed0768dd8cfabf9662 (diff)
loplugin:useuniqueptr in SwSpellDialogChildWindow
Change-Id: Ib79e4672b7857aaacef15cd55c8633523df4d26b Reviewed-on: https://gerrit.libreoffice.org/57877 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sw/source')
-rw-r--r--sw/source/uibase/dialog/SwSpellDialogChildWindow.cxx2
-rw-r--r--sw/source/uibase/inc/SwSpellDialogChildWindow.hxx2
2 files changed, 2 insertions, 2 deletions
diff --git a/sw/source/uibase/dialog/SwSpellDialogChildWindow.cxx b/sw/source/uibase/dialog/SwSpellDialogChildWindow.cxx
index 95fe970a04f4..b9a5ea30a518 100644
--- a/sw/source/uibase/dialog/SwSpellDialogChildWindow.cxx
+++ b/sw/source/uibase/dialog/SwSpellDialogChildWindow.cxx
@@ -160,7 +160,7 @@ SwSpellDialogChildWindow::~SwSpellDialogChildWindow ()
SwWrtShell* pWrtShell = GetWrtShell_Impl();
if(!m_pSpellState->m_bInitialCall && pWrtShell)
pWrtShell->SpellEnd();
- delete m_pSpellState;
+ m_pSpellState.reset();
}
SfxChildWinInfo SwSpellDialogChildWindow::GetInfo() const
diff --git a/sw/source/uibase/inc/SwSpellDialogChildWindow.hxx b/sw/source/uibase/inc/SwSpellDialogChildWindow.hxx
index a1006d8df80b..50f8fdfdeaf7 100644
--- a/sw/source/uibase/inc/SwSpellDialogChildWindow.hxx
+++ b/sw/source/uibase/inc/SwSpellDialogChildWindow.hxx
@@ -29,7 +29,7 @@ class SwSpellDialogChildWindow
: public svx::SpellDialogChildWindow
{
bool m_bIsGrammarCheckingOn;
- SpellState* m_pSpellState;
+ std::unique_ptr<SpellState> m_pSpellState;
SwWrtShell* GetWrtShell_Impl();
bool MakeTextSelection_Impl(SwWrtShell& rSh, ShellMode eSelMode);