diff options
-rw-r--r-- | cui/source/inc/optpath.hxx | 2 | ||||
-rw-r--r-- | cui/source/options/optpath.cxx | 9 |
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(); |