cui/source/options/optsave.cxx | 7 +++---- cui/source/options/optsave.hxx | 2 +- 2 files changed, 4 insertions(+), 5 deletions(-)
New commits: commit bfc51d3fa8cd72e70837be1a9d1bc2195dc8ccf4 Author: Xisco Fauli <[email protected]> Date: Mon May 23 02:02:36 2016 +0200 tdf#89329: use unique_ptr for pImpl in optsave Change-Id: Ia442a6a5c570c45b03fc878099f1c50005ee7538 Reviewed-on: https://gerrit.libreoffice.org/25331 Tested-by: Jenkins <[email protected]> Reviewed-by: Noel Grandin <[email protected]> diff --git a/cui/source/options/optsave.cxx b/cui/source/options/optsave.cxx index cbf4d7d..1130bb8 100644 --- a/cui/source/options/optsave.cxx +++ b/cui/source/options/optsave.cxx @@ -81,7 +81,7 @@ SvxSaveTabPage_Impl::~SvxSaveTabPage_Impl() SvxSaveTabPage::SvxSaveTabPage( vcl::Window* pParent, const SfxItemSet& rCoreSet ) : SfxTabPage( pParent, "OptSavePage", "cui/ui/optsavepage.ui", &rCoreSet ), - pImpl ( new SvxSaveTabPage_Impl ) + pImpl( new SvxSaveTabPage_Impl ) { get(aLoadUserSettingsCB, "load_settings"); get(aLoadDocPrinterCB, "load_docprinter"); @@ -201,8 +201,7 @@ SvxSaveTabPage::~SvxSaveTabPage() void SvxSaveTabPage::dispose() { - delete pImpl; - pImpl = nullptr; + pImpl.reset(); aLoadUserSettingsCB.clear(); aLoadDocPrinterCB.clear(); aDocInfoCB.clear(); @@ -586,7 +585,7 @@ IMPL_LINK_TYPED( SvxSaveTabPage, FilterHdl_Impl, ListBox&, rBox, void ) { const sal_Int32 nEntryPos = aSaveAsLB->InsertEntry(pUIFilters[i]); if ( pImpl->aODFArr[nData][i] ) - aSaveAsLB->SetEntryData( nEntryPos, static_cast<void*>(pImpl) ); + aSaveAsLB->SetEntryData( nEntryPos, static_cast<void*>(pImpl.get()) ); if(pFilters[i] == pImpl->aDefaultArr[nData]) sSelect = pUIFilters[i]; } diff --git a/cui/source/options/optsave.hxx b/cui/source/options/optsave.hxx index d97c323..53f5f9e 100644 --- a/cui/source/options/optsave.hxx +++ b/cui/source/options/optsave.hxx @@ -57,7 +57,7 @@ private: VclPtr<FixedImage> aODFWarningFI; VclPtr<FixedText> aODFWarningFT; - SvxSaveTabPage_Impl* pImpl; + std::unique_ptr<SvxSaveTabPage_Impl> pImpl; DECL_LINK_TYPED( AutoClickHdl_Impl, Button*, void ); DECL_LINK_TYPED( FilterHdl_Impl, ListBox&, void ); _______________________________________________ Libreoffice-commits mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
