[Libreoffice-commits] core.git: cui/source
Xisco Fauli
anistenis at gmail.com
Mon May 23 11:32:26 UTC 2016
cui/source/inc/optpath.hxx | 2 +-
cui/source/options/optpath.cxx | 9 ++++-----
2 files changed, 5 insertions(+), 6 deletions(-)
New commits:
commit 00271c8eaf77c453a403a85f23233dca71d834f3
Author: Xisco Fauli <anistenis at gmail.com>
Date: Mon May 23 01:48:37 2016 +0200
tdf#89329: use unique_ptr for pImpl in optpath
Change-Id: If9e627e2f0f091e8411d0c6f16f29b583723419a
Reviewed-on: https://gerrit.libreoffice.org/25327
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin at gmail.com>
diff --git a/cui/source/inc/optpath.hxx b/cui/source/inc/optpath.hxx
index 8671e3f..790da15 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 2b84c1f..2a52540 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();
More information about the Libreoffice-commits
mailing list