summaryrefslogtreecommitdiff
path: root/svx/source/unodraw/unoprov.cxx
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2017-06-09 14:35:25 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-06-12 08:36:20 +0200
commitd4eabd5da8ea3b5ac40659c22cde19b26b3c002b (patch)
tree63c93e0287aa5668d8b2147b756d08ced533e7fd /svx/source/unodraw/unoprov.cxx
parent089ff7a374df9870c506c36720a1b9cab3a252f6 (diff)
pass comphelper::PropertySetInfo around using rtl::Reference
and remove some manual ref counting Change-Id: Ib78122fbbf914e87e0aef1f8fffe3952639e5b22 Reviewed-on: https://gerrit.libreoffice.org/38607 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'svx/source/unodraw/unoprov.cxx')
-rw-r--r--svx/source/unodraw/unoprov.cxx10
1 files changed, 3 insertions, 7 deletions
diff --git a/svx/source/unodraw/unoprov.cxx b/svx/source/unodraw/unoprov.cxx
index f0d5a1f4a686..c3cb7b9a23f3 100644
--- a/svx/source/unodraw/unoprov.cxx
+++ b/svx/source/unodraw/unoprov.cxx
@@ -1334,15 +1334,11 @@ OUString SvxUnogetInternalNameForItem(const sal_Int16 nWhich, const OUString& rA
}
-comphelper::PropertySetInfo* SvxPropertySetInfoPool::getOrCreate( sal_Int32 nServiceId ) throw()
+rtl::Reference<comphelper::PropertySetInfo> const & SvxPropertySetInfoPool::getOrCreate( sal_Int32 nServiceId ) throw()
{
SolarMutexGuard aGuard;
- if( nServiceId > SVXUNO_SERVICEID_LASTID )
- {
- OSL_FAIL( "unknown service id!" );
- return nullptr;
- }
+ assert( nServiceId <= SVXUNO_SERVICEID_LASTID );
if( !mxInfos[ nServiceId ].is() )
{
@@ -1365,7 +1361,7 @@ comphelper::PropertySetInfo* SvxPropertySetInfoPool::getOrCreate( sal_Int32 nSer
}
}
- return mxInfos[ nServiceId ].get();
+ return mxInfos[ nServiceId ];
}
rtl::Reference<comphelper::PropertySetInfo> SvxPropertySetInfoPool::mxInfos[SVXUNO_SERVICEID_LASTID+1] = { nullptr };