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

loplugin:useuniqueptr in ScInsertTableDlg

Change-Id: I239d3b1b585219125841dcc02104390f4a1ac3b7
Reviewed-on: https://gerrit.libreoffice.org/57362
Tested-by: Jenkins
Reviewed-by: 's avatarNoel Grandin <noel.grandin@collabora.co.uk>
üst 281f1281
......@@ -53,7 +53,7 @@ private:
ScViewData& rViewData;
ScDocument& rDoc;
ScDocShell* pDocShTables;
sfx2::DocumentInserter* pDocInserter;
std::unique_ptr<sfx2::DocumentInserter> pDocInserter;
SfxObjectShellRef aDocShTablesRef;
bool bMustClose;
......
......@@ -66,7 +66,7 @@ ScInsertTableDlg::~ScInsertTableDlg()
{
if (pDocShTables)
pDocShTables->DoClose();
delete pDocInserter;
pDocInserter.reset();
}
void ScInsertTableDlg::Init_Impl( bool bFromFile )
......@@ -262,8 +262,8 @@ IMPL_LINK_NOARG(ScInsertTableDlg, ChoiceHdl_Impl, weld::Button&, void)
IMPL_LINK_NOARG(ScInsertTableDlg, BrowseHdl_Impl, weld::Button&, void)
{
delete pDocInserter;
pDocInserter = new ::sfx2::DocumentInserter(m_xDialog.get(), ScDocShell::Factory().GetFactoryName());
pDocInserter.reset();
pDocInserter.reset( new ::sfx2::DocumentInserter(m_xDialog.get(), ScDocShell::Factory().GetFactoryName()) );
pDocInserter->StartExecuteModal( LINK( this, ScInsertTableDlg, DialogClosedHdl ) );
}
......
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