Kaydet (Commit) 3199d25a authored tarafından Noel Grandin's avatar Noel Grandin

loplugin:useuniqueptr in SfxCommonTemplateDialog_Impl

Change-Id: I484cb863c054c71cb22b30d108c95692213c8451
Reviewed-on: https://gerrit.libreoffice.org/48407Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarNoel Grandin <noel.grandin@collabora.co.uk>
üst 9f3dccf5
......@@ -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));
}
......
......@@ -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];
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment