diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-01-16 16:13:43 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-01-24 07:57:27 +0100 |
commit | 3199d25a2e0f533fdd52e0a8006552df1a5932ca (patch) | |
tree | 9d2aa575f4420b2718d65235179e3dd8cc2a4081 /sfx2 | |
parent | 9f3dccf5558915617d02c8cc0d795ec45e2532d1 (diff) |
loplugin:useuniqueptr in SfxCommonTemplateDialog_Impl
Change-Id: I484cb863c054c71cb22b30d108c95692213c8451
Reviewed-on: https://gerrit.libreoffice.org/48407
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sfx2')
-rw-r--r-- | sfx2/source/dialog/templdlg.cxx | 6 | ||||
-rw-r--r-- | sfx2/source/inc/templdgi.hxx | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/sfx2/source/dialog/templdlg.cxx b/sfx2/source/dialog/templdlg.cxx index fc1e0753c308..204a7346d6d5 100644 --- a/sfx2/source/dialog/templdlg.cxx +++ b/sfx2/source/dialog/templdlg.cxx @@ -861,7 +861,7 @@ SfxCommonTemplateDialog_Impl::~SfxCommonTemplateDialog_Impl() EndListening(*pStyleSheetPool); pStyleSheetPool = nullptr; pTreeBox.disposeAndClear(); - delete pIdle; + pIdle.reset(); if ( m_pDeletionWatcher ) m_pDeletionWatcher->signal(); aFmtLb.disposeAndClear(); @@ -1402,7 +1402,7 @@ IMPL_LINK_NOARG( SfxCommonTemplateDialog_Impl, TimeOut, Timer *, void ) } } bDontUpdate=false; - DELETEZ(pIdle); + pIdle.reset(); } else pIdle->Start(); @@ -1488,7 +1488,7 @@ void SfxCommonTemplateDialog_Impl::Notify(SfxBroadcaster& /*rBC*/, const SfxHint { if(!pIdle) { - pIdle=new Idle("SfxCommonTemplate"); + pIdle.reset(new Idle("SfxCommonTemplate")); pIdle->SetPriority(TaskPriority::LOWEST); pIdle->SetInvokeHandler(LINK(this,SfxCommonTemplateDialog_Impl,TimeOut)); } diff --git a/sfx2/source/inc/templdgi.hxx b/sfx2/source/inc/templdgi.hxx index 4a911d292003..381da18b8916 100644 --- a/sfx2/source/inc/templdgi.hxx +++ b/sfx2/source/inc/templdgi.hxx @@ -176,7 +176,7 @@ protected: VclPtr<PopupMenu> mxMenu; OString sLastItemIdent; SfxModule* pModule; - Idle* pIdle; + std::unique_ptr<Idle> pIdle; SfxStyleFamilies* pStyleFamilies; SfxTemplateItem* pFamilyState[MAX_FAMILIES]; |