diff options
author | Xisco Fauli <anistenis@gmail.com> | 2016-05-23 02:02:36 +0200 |
---|---|---|
committer | Noel Grandin <noelgrandin@gmail.com> | 2016-05-23 13:37:00 +0000 |
commit | bfc51d3fa8cd72e70837be1a9d1bc2195dc8ccf4 (patch) | |
tree | d0911d5878c521573f7477d8c24f33e449bd2dcf /cui/source | |
parent | 908e46c7116d62718fc377b1e0eb53b39d42dc1f (diff) |
tdf#89329: use unique_ptr for pImpl in optsave
Change-Id: Ia442a6a5c570c45b03fc878099f1c50005ee7538
Reviewed-on: https://gerrit.libreoffice.org/25331
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'cui/source')
-rw-r--r-- | cui/source/options/optsave.cxx | 7 | ||||
-rw-r--r-- | cui/source/options/optsave.hxx | 2 |
2 files changed, 4 insertions, 5 deletions
diff --git a/cui/source/options/optsave.cxx b/cui/source/options/optsave.cxx index cbf4d7d52e53..1130bb882ee6 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 d97c32370aef..53f5f9e15db9 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 ); |