diff options
author | Noel Grandin <noel@peralex.com> | 2015-11-17 15:24:00 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2015-11-18 08:35:34 +0200 |
commit | 032dae364b4853635186b7541e40c71588f9050a (patch) | |
tree | 4e49d6108cf6ddc2ccb6a9fdfbb2199d9018a43d /sfx2 | |
parent | 9c205723fcc0a2087ff7bf1e86f4f07b62564d5d (diff) |
use unique_ptr for pImpl in sfx2/
Change-Id: I564fa80a2642a4849127f3c25236634289b5b93d
Diffstat (limited to 'sfx2')
-rw-r--r-- | sfx2/source/appl/linksrc.cxx | 1 | ||||
-rw-r--r-- | sfx2/source/appl/lnkbase2.cxx | 9 | ||||
-rw-r--r-- | sfx2/source/bastyp/fltfnc.cxx | 3 | ||||
-rw-r--r-- | sfx2/source/doc/docfac.cxx | 2 |
4 files changed, 5 insertions, 10 deletions
diff --git a/sfx2/source/appl/linksrc.cxx b/sfx2/source/appl/linksrc.cxx index e5466533f3ac..eaea196c80f4 100644 --- a/sfx2/source/appl/linksrc.cxx +++ b/sfx2/source/appl/linksrc.cxx @@ -210,7 +210,6 @@ SvLinkSource::SvLinkSource() SvLinkSource::~SvLinkSource() { - delete pImpl; } diff --git a/sfx2/source/appl/lnkbase2.cxx b/sfx2/source/appl/lnkbase2.cxx index c6e37810637e..f3b4cc808fab 100644 --- a/sfx2/source/appl/lnkbase2.cxx +++ b/sfx2/source/appl/lnkbase2.cxx @@ -123,9 +123,9 @@ public: SvBaseLink::SvBaseLink() - : m_bIsReadOnly(false) + : pImpl ( new BaseLink_Impl ), + m_bIsReadOnly(false) { - pImpl = new BaseLink_Impl(); nObjType = OBJECT_CLIENT_SO; pImplData = new ImplBaseLinkData; bVisible = bSynchron = bUseCache = true; @@ -135,9 +135,9 @@ SvBaseLink::SvBaseLink() SvBaseLink::SvBaseLink( SfxLinkUpdateMode nUpdateMode, SotClipboardFormatId nContentType ) - : m_bIsReadOnly(false) + : pImpl( new BaseLink_Impl ), + m_bIsReadOnly(false) { - pImpl = new BaseLink_Impl(); nObjType = OBJECT_CLIENT_SO; pImplData = new ImplBaseLinkData; bVisible = bSynchron = bUseCache = true; @@ -243,7 +243,6 @@ SvBaseLink::~SvBaseLink() } delete pImplData; - delete pImpl; } IMPL_LINK_TYPED( SvBaseLink, EndEditHdl, const OUString&, _rNewName, void ) diff --git a/sfx2/source/bastyp/fltfnc.cxx b/sfx2/source/bastyp/fltfnc.cxx index 3f7df4476a86..6edc51d7cd34 100644 --- a/sfx2/source/bastyp/fltfnc.cxx +++ b/sfx2/source/bastyp/fltfnc.cxx @@ -182,15 +182,14 @@ const SfxFilter* SfxFilterContainer::GetAnyFilter( SfxFilterFlags nMust, SfxFilt SfxFilterContainer::SfxFilterContainer( const OUString& rName ) + : pImpl( new SfxFilterContainer_Impl( rName ) ) { - pImpl = new SfxFilterContainer_Impl( rName ); } SfxFilterContainer::~SfxFilterContainer() { - delete pImpl; } diff --git a/sfx2/source/doc/docfac.cxx b/sfx2/source/doc/docfac.cxx index e6225a998a86..f9426b8e81f1 100644 --- a/sfx2/source/doc/docfac.cxx +++ b/sfx2/source/doc/docfac.cxx @@ -122,10 +122,8 @@ SfxObjectFactory::SfxObjectFactory SfxObjectFactory::~SfxObjectFactory() { - delete pImpl->pNameResId; delete pImpl->pFilterContainer; - delete pImpl; } |