summaryrefslogtreecommitdiff
path: root/cui
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2018-06-11 15:03:31 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-06-20 14:44:19 +0200
commit8014f3722a854b505e536fb13ec4e86e1f5fba7b (patch)
treed26be9eea64c03b96debb823f3a7ba34d76ad416 /cui
parent3efc2d022b0d1a5cf6155257d57504d47ceefc44 (diff)
loplugin:useuniqueptr in SfxAcceleratorConfigPage
Change-Id: I12c6ca5542729d4af77a7d4253ea1bbaae81781c Reviewed-on: https://gerrit.libreoffice.org/56096 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'cui')
-rw-r--r--cui/source/customize/acccfg.cxx7
-rw-r--r--cui/source/inc/acccfg.hxx2
2 files changed, 3 insertions, 6 deletions
diff --git a/cui/source/customize/acccfg.cxx b/cui/source/customize/acccfg.cxx
index f752506c4fe1..00717a1a7547 100644
--- a/cui/source/customize/acccfg.cxx
+++ b/cui/source/customize/acccfg.cxx
@@ -999,9 +999,7 @@ void SfxAcceleratorConfigPage::dispose()
m_pEntriesBox->Clear();
m_pKeyBox->Clear();
- delete m_pFileDlg;
- m_pFileDlg = nullptr;
-
+ m_pFileDlg.reset();
m_pEntriesBox.clear();
m_pOfficeButton.clear();
m_pModuleButton.clear();
@@ -1557,8 +1555,7 @@ void SfxAcceleratorConfigPage::StartFileDialog( StartFileDialogType nType, const
bool bSave = nType == StartFileDialogType::SaveAs;
short nDialogType = bSave ? ui::dialogs::TemplateDescription::FILESAVE_AUTOEXTENSION
: ui::dialogs::TemplateDescription::FILEOPEN_SIMPLE;
- delete m_pFileDlg;
- m_pFileDlg = new sfx2::FileDialogHelper(nDialogType, FileDialogFlags::NONE, GetFrameWeld());
+ m_pFileDlg.reset(new sfx2::FileDialogHelper(nDialogType, FileDialogFlags::NONE, GetFrameWeld()));
m_pFileDlg->SetTitle( rTitle );
m_pFileDlg->AddFilter( aFilterAllStr, FILEDIALOG_FILTER_ALL );
diff --git a/cui/source/inc/acccfg.hxx b/cui/source/inc/acccfg.hxx
index 20e37f0ce1bb..0e96110ea7de 100644
--- a/cui/source/inc/acccfg.hxx
+++ b/cui/source/inc/acccfg.hxx
@@ -110,7 +110,7 @@ class SfxAcceleratorConfigPage : public SfxTabPage
friend class SfxAccCfgTabListBox_Impl;
private:
const SfxMacroInfoItem* m_pMacroInfoItem;
- sfx2::FileDialogHelper* m_pFileDlg;
+ std::unique_ptr<sfx2::FileDialogHelper> m_pFileDlg;
VclPtr<SfxAccCfgTabListBox_Impl> m_pEntriesBox;
VclPtr<RadioButton> m_pOfficeButton;