From d67d9c26476f32e4b1157f6dd6a2d2746cc9c6c8 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Mon, 23 Jul 2018 15:28:01 +0200 Subject: loplugin:useuniqueptr in SwSpellDialogChildWindow Change-Id: Ib79e4672b7857aaacef15cd55c8633523df4d26b Reviewed-on: https://gerrit.libreoffice.org/57877 Tested-by: Jenkins Reviewed-by: Noel Grandin --- sw/source/uibase/dialog/SwSpellDialogChildWindow.cxx | 2 +- sw/source/uibase/inc/SwSpellDialogChildWindow.hxx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'sw/source') 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 m_pSpellState; SwWrtShell* GetWrtShell_Impl(); bool MakeTextSelection_Impl(SwWrtShell& rSh, ShellMode eSelMode); -- cgit ib/libreoffice-6-3'>distro/cib/libreoffice-6-3 LibreOffice 核心代码仓库文档基金会
summaryrefslogtreecommitdiff