Kaydet (Commit) 00271c8e authored tarafından Xisco Fauli's avatar Xisco Fauli Kaydeden (comit) Noel Grandin

tdf#89329: use unique_ptr for pImpl in optpath

Change-Id: If9e627e2f0f091e8411d0c6f16f29b583723419a
Reviewed-on: https://gerrit.libreoffice.org/25327Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarNoel Grandin <noelgrandin@gmail.com>
üst 08cf2fd0
......@@ -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;
......
......@@ -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();
......
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