[Libreoffice-commits] core.git: cui/source
Noel Grandin
noel.grandin at collabora.co.uk
Wed Jun 20 12:44:41 UTC 2018
cui/source/customize/acccfg.cxx | 7 ++-----
cui/source/inc/acccfg.hxx | 2 +-
2 files changed, 3 insertions(+), 6 deletions(-)
New commits:
commit 8014f3722a854b505e536fb13ec4e86e1f5fba7b
Author: Noel Grandin <noel.grandin at collabora.co.uk>
Date: Mon Jun 11 15:03:31 2018 +0200
loplugin:useuniqueptr in SfxAcceleratorConfigPage
Change-Id: I12c6ca5542729d4af77a7d4253ea1bbaae81781c
Reviewed-on: https://gerrit.libreoffice.org/56096
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>
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;
More information about the Libreoffice-commits
mailing list