diff options
author | Xisco Fauli <anistenis@gmail.com> | 2016-06-01 01:30:11 +0200 |
---|---|---|
committer | Noel Grandin <noelgrandin@gmail.com> | 2016-06-02 06:40:34 +0000 |
commit | 7693c228297331fb6abee75f56796fbcd8813d02 (patch) | |
tree | 9e8d8171125f6c6c3619381b871824f71e05dead /comphelper/source/property | |
parent | c37ce6c3c5c336290186f8d78ae00064064d7b8c (diff) |
tdf#89329: use unique_ptr for pImpl in propertysetinfo
Change-Id: I8df0ed4d7c7df27f570ad09936f17941c30aae91
Reviewed-on: https://gerrit.libreoffice.org/25749
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'comphelper/source/property')
-rw-r--r-- | comphelper/source/property/propertysetinfo.cxx | 23 |
1 files changed, 11 insertions, 12 deletions
diff --git a/comphelper/source/property/propertysetinfo.cxx b/comphelper/source/property/propertysetinfo.cxx index 98bcfd4203cf..ca73b511eabc 100644 --- a/comphelper/source/property/propertysetinfo.cxx +++ b/comphelper/source/property/propertysetinfo.cxx @@ -129,18 +129,18 @@ bool PropertyMapImpl::hasPropertyByName( const OUString& aName ) throw() PropertySetInfo::PropertySetInfo() throw() + : mpImpl(new PropertyMapImpl) { - mpMap = new PropertyMapImpl(); } PropertySetInfo::PropertySetInfo( PropertyMapEntry const * pMap ) throw() + : mpImpl(new PropertyMapImpl) { - mpMap = new PropertyMapImpl(); - mpMap->add( pMap ); + mpImpl->add( pMap ); } PropertySetInfo::PropertySetInfo(uno::Sequence<beans::Property> const& rProps) throw() - : mpMap(new PropertyMapImpl) + : mpImpl(new PropertyMapImpl) { PropertyMapEntry * pEntries(new PropertyMapEntry[rProps.getLength() + 1]); PropertyMapEntry * pEntry(&pEntries[0]); @@ -154,42 +154,41 @@ PropertySetInfo::PropertySetInfo(uno::Sequence<beans::Property> const& rProps) t ++pEntry; } pEntry->maName = OUString(); - mpMap->add(pEntries); + mpImpl->add(pEntries); } PropertySetInfo::~PropertySetInfo() throw() { - delete mpMap; } void PropertySetInfo::add( PropertyMapEntry const * pMap ) throw() { - mpMap->add( pMap ); + mpImpl->add( pMap ); } void PropertySetInfo::remove( const OUString& aName ) throw() { - mpMap->remove( aName ); + mpImpl->remove( aName ); } Sequence< css::beans::Property > SAL_CALL PropertySetInfo::getProperties() throw(css::uno::RuntimeException, std::exception) { - return comphelper::containerToSequence(mpMap->getProperties()); + return comphelper::containerToSequence(mpImpl->getProperties()); } Property SAL_CALL PropertySetInfo::getPropertyByName( const OUString& aName ) throw(css::beans::UnknownPropertyException, css::uno::RuntimeException, std::exception) { - return mpMap->getPropertyByName( aName ); + return mpImpl->getPropertyByName( aName ); } sal_Bool SAL_CALL PropertySetInfo::hasPropertyByName( const OUString& Name ) throw(css::uno::RuntimeException, std::exception) { - return mpMap->hasPropertyByName( Name ); + return mpImpl->hasPropertyByName( Name ); } const PropertyMap& PropertySetInfo::getPropertyMap() const throw() { - return mpMap->getPropertyMap(); + return mpImpl->getPropertyMap(); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |