summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorNoel <noel.grandin@collabora.co.uk>2021-02-19 16:00:58 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2021-02-20 07:33:01 +0100
commit66217bc8222537d7358464131a7fa30917a3a960 (patch)
treef59c13617c8157f1ed2c56aa20077ba6d5b35dc9 /sc
parent52f887612a5dccdca15af0408ad92284277733c5 (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 'sc')
-rw-r--r--sc/inc/stlpool.hxx2
-rw-r--r--sc/source/core/data/stlpool.cxx4
2 files changed, 3 insertions, 3 deletions
diff --git a/sc/inc/stlpool.hxx b/sc/inc/stlpool.hxx
index 012d4b714658..b4a5c312d6ea 100644
--- a/sc/inc/stlpool.hxx
+++ b/sc/inc/stlpool.hxx
@@ -63,7 +63,7 @@ private:
using SfxStyleSheetPool::Create; // calcwarnings: Create(const SfxStyleSheet&) - ever used?
- virtual SfxStyleSheetBase* Create( const OUString& rName,
+ virtual rtl::Reference<SfxStyleSheetBase> Create( const OUString& rName,
SfxStyleFamily eFamily,
SfxStyleSearchBits nMask) override;
virtual SfxStyleSheetBase* Create( const SfxStyleSheetBase& rStyle ) override;
diff --git a/sc/source/core/data/stlpool.cxx b/sc/source/core/data/stlpool.cxx
index d1e831e0dd88..3654799790da 100644
--- a/sc/source/core/data/stlpool.cxx
+++ b/sc/source/core/data/stlpool.cxx
@@ -96,11 +96,11 @@ SfxStyleSheetBase& ScStyleSheetPool::Make( const OUString& rName,
return SfxStyleSheetPool::Make( ScStyleNameConversion::ProgrammaticToDisplayName( rName, eFam), eFam, mask);
}
-SfxStyleSheetBase* ScStyleSheetPool::Create( const OUString& rName,
+rtl::Reference<SfxStyleSheetBase> ScStyleSheetPool::Create( const OUString& rName,
SfxStyleFamily eFamily,
SfxStyleSearchBits nMaskP )
{
- ScStyleSheet* pSheet = new ScStyleSheet( rName, *this, eFamily, nMaskP );
+ rtl::Reference<ScStyleSheet> pSheet = new ScStyleSheet( rName, *this, eFamily, nMaskP );
if ( eFamily == SfxStyleFamily::Para && ScResId(STR_STYLENAME_STANDARD) != rName )
pSheet->SetParent( ScResId(STR_STYLENAME_STANDARD) );