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

loplugin:useuniqueptr in SwInsertSectionTabPage

Change-Id: I22ffd16c26c837c8989d9c1875e5f809695ea27c
Reviewed-on: https://gerrit.libreoffice.org/58232
Tested-by: Jenkins
Reviewed-by: 's avatarNoel Grandin <noel.grandin@collabora.co.uk>
üst c695c3ca
......@@ -1555,7 +1555,7 @@ SwInsertSectionTabPage::~SwInsertSectionTabPage()
void SwInsertSectionTabPage::dispose()
{
delete m_pDocInserter;
m_pDocInserter.reset();
m_pCurName.clear();
m_pFileCB.clear();
m_pDDECB.clear();
......@@ -1771,8 +1771,7 @@ IMPL_LINK( SwInsertSectionTabPage, UseFileHdl, Button *, pButton, void )
IMPL_LINK_NOARG(SwInsertSectionTabPage, FileSearchHdl, Button*, void)
{
delete m_pDocInserter;
m_pDocInserter = new ::sfx2::DocumentInserter(GetFrameWeld(), "swriter");
m_pDocInserter.reset(new ::sfx2::DocumentInserter(GetFrameWeld(), "swriter"));
m_pDocInserter->StartExecuteModal( LINK( this, SwInsertSectionTabPage, DlgClosedHdl ) );
}
......
......@@ -163,7 +163,7 @@ class SwInsertSectionTabPage : public SfxTabPage
css::uno::Sequence <sal_Int8 > m_aNewPasswd;
SwWrtShell* m_pWrtSh;
sfx2::DocumentInserter* m_pDocInserter;
std::unique_ptr<sfx2::DocumentInserter> m_pDocInserter;
DECL_LINK( ChangeHideHdl, Button *, void );
DECL_LINK( ChangeProtectHdl, Button *, void );
......
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