summaryrefslogtreecommitdiff
path: root/svx/source/unogallery/unogalitem.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/unogallery/unogalitem.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/unogallery/unogalitem.cxx')
-rw-r--r--svx/source/unogallery/unogalitem.cxx10
1 files changed, 2 insertions, 8 deletions
diff --git a/svx/source/unogallery/unogalitem.cxx b/svx/source/unogallery/unogalitem.cxx
index 6de4a988eb41..8377690808eb 100644
--- a/svx/source/unogallery/unogalitem.cxx
+++ b/svx/source/unogallery/unogalitem.cxx
@@ -178,11 +178,8 @@ sal_Int8 SAL_CALL GalleryItem::getType()
}
-::comphelper::PropertySetInfo* GalleryItem::createPropertySetInfo()
+rtl::Reference<::comphelper::PropertySetInfo> GalleryItem::createPropertySetInfo()
{
- SolarMutexGuard aGuard;
- ::comphelper::PropertySetInfo* pRet = new ::comphelper::PropertySetInfo();
-
static ::comphelper::PropertyMapEntry const aEntries[] =
{
{ OUString("GalleryItemType"), UNOGALLERY_GALLERYITEMTYPE, cppu::UnoType<sal_Int8>::get(),
@@ -206,10 +203,7 @@ sal_Int8 SAL_CALL GalleryItem::getType()
{ OUString(), 0, css::uno::Type(), 0, 0 }
};
- pRet->acquire();
- pRet->add( aEntries );
-
- return pRet;
+ return rtl::Reference<::comphelper::PropertySetInfo>( new ::comphelper::PropertySetInfo( aEntries ) );
}
void GalleryItem::_setPropertyValues( const comphelper::PropertyMapEntry** ppEntries, const uno::Any* pValues )