diff options
author | Noel <noel.grandin@collabora.co.uk> | 2021-02-19 16:00:58 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-02-20 07:33:01 +0100 |
commit | 66217bc8222537d7358464131a7fa30917a3a960 (patch) | |
tree | f59c13617c8157f1ed2c56aa20077ba6d5b35dc9 /svl | |
parent | 52f887612a5dccdca15af0408ad92284277733c5 (diff) |
loplugin:refcounting in svl
Change-Id: Iae192caa9d05f71ce02aae966ef1d71232d1a7b6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111222
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'svl')
-rw-r--r-- | svl/source/config/itemholder2.cxx | 4 | ||||
-rw-r--r-- | svl/source/items/style.cxx | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/svl/source/config/itemholder2.cxx b/svl/source/config/itemholder2.cxx index 564f11c88f33..35e9e3da2550 100644 --- a/svl/source/config/itemholder2.cxx +++ b/svl/source/config/itemholder2.cxx @@ -24,7 +24,7 @@ #include <comphelper/processfactory.hxx> #include <com/sun/star/lang/XComponent.hpp> #include <com/sun/star/configuration/theDefaultProvider.hpp> - +#include <rtl/ref.hxx> #include <svl/cjkoptions.hxx> #include <svl/ctloptions.hxx> #include <tools/diagnose_ex.h> @@ -65,7 +65,7 @@ ItemHolder2::~ItemHolder2() void ItemHolder2::holdConfigItem(EItem eItem) { - static ItemHolder2* pHolder = new ItemHolder2(); + static rtl::Reference<ItemHolder2> pHolder = new ItemHolder2(); pHolder->impl_addItem(eItem); } diff --git a/svl/source/items/style.cxx b/svl/source/items/style.cxx index 617b42e41cdc..5b430259de2a 100644 --- a/svl/source/items/style.cxx +++ b/svl/source/items/style.cxx @@ -605,7 +605,7 @@ std::unique_ptr<SfxStyleSheetIterator> SfxStyleSheetBasePool::CreateIterator return std::make_unique<SfxStyleSheetIterator>(this,eFam,mask); } -SfxStyleSheetBase* SfxStyleSheetBasePool::Create +rtl::Reference<SfxStyleSheetBase> SfxStyleSheetBasePool::Create ( const OUString& rName, SfxStyleFamily eFam, @@ -873,7 +873,7 @@ SfxStyleSheetPool::SfxStyleSheetPool( SfxItemPool const& rSet) { } -SfxStyleSheetBase* SfxStyleSheetPool::Create( const OUString& rName, +rtl::Reference<SfxStyleSheetBase> SfxStyleSheetPool::Create( const OUString& rName, SfxStyleFamily eFam, SfxStyleSearchBits mask ) { return new SfxStyleSheet( rName, *this, eFam, mask ); |