summaryrefslogtreecommitdiff
path: root/cui/source
diff options
context:
space:
mode:
authorXisco Fauli <anistenis@gmail.com>2016-05-23 01:48:37 +0200
committerNoel Grandin <noelgrandin@gmail.com>2016-05-23 11:32:02 +0000
commit00271c8eaf77c453a403a85f23233dca71d834f3 (patch)
tree22f2e43fdaf523144a21e5408643d86d45aef18a /cui/source
parent08cf2fd01064306eef7fdbb5b62320947c4d1089 (diff)
tdf#89329: use unique_ptr for pImpl in optpath
Change-Id: If9e627e2f0f091e8411d0c6f16f29b583723419a Reviewed-on: https://gerrit.libreoffice.org/25327 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'cui/source')
-rw-r--r--cui/source/inc/optpath.hxx2
-rw-r--r--cui/source/options/optpath.cxx9
2 files changed, 5 insertions, 6 deletions
diff --git a/cui/source/inc/optpath.hxx b/cui/source/inc/optpath.hxx
index 8671e3f02e17..790da15a5814 100644
--- a/cui/source/inc/optpath.hxx
+++ b/cui/source/inc/optpath.hxx
@@ -46,7 +46,7 @@ private:
VclPtr<PushButton> m_pPathBtn;
VclPtr<svx::OptHeaderTabListBox> pPathBox;
- OptPath_Impl* pImpl;
+ std::unique_ptr<OptPath_Impl> pImpl;
css::uno::Reference< ::svt::DialogClosedListener > xDialogListener;
css::uno::Reference< css::ui::dialogs::XFolderPicker2 > xFolderPicker;
diff --git a/cui/source/options/optpath.cxx b/cui/source/options/optpath.cxx
index 2b84c1f79346..2a52540dae83 100644
--- a/cui/source/options/optpath.cxx
+++ b/cui/source/options/optpath.cxx
@@ -191,11 +191,11 @@ bool IsMultiPath_Impl( const sal_uInt16 nIndex )
// class SvxPathTabPage --------------------------------------------------
SvxPathTabPage::SvxPathTabPage(vcl::Window* pParent, const SfxItemSet& rSet)
- :SfxTabPage( pParent, "OptPathsPage", "cui/ui/optpathspage.ui", &rSet)
+ : SfxTabPage( pParent, "OptPathsPage", "cui/ui/optpathspage.ui", &rSet)
+ , pImpl( new OptPath_Impl(get<FixedImage>("lock")->GetImage(),
+ get<FixedText>("editpaths")->GetText()) )
, xDialogListener ( new ::svt::DialogClosedListener() )
{
- pImpl = new OptPath_Impl(get<FixedImage>("lock")->GetImage(),
- get<FixedText>("editpaths")->GetText());
get(m_pStandardBtn, "default");
get(m_pPathBtn, "edit");
get(m_pPathCtrl, "paths");
@@ -251,8 +251,7 @@ void SvxPathTabPage::dispose()
delete static_cast<PathUserData_Impl*>(pPathBox->GetEntry(i)->GetUserData());
pPathBox.disposeAndClear();
}
- delete pImpl;
- pImpl = nullptr;
+ pImpl.reset();
m_pPathCtrl.clear();
m_pStandardBtn.clear();
m_pPathBtn.clear();