diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2021-04-30 08:20:03 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2021-05-02 17:02:28 +0200 |
commit | 10d29c390dd58ed629dd27fe5ed35fae28eceec3 (patch) | |
tree | 7476cbb90fff182c5bec0a5a1ef9c41a3ad29f19 /comphelper | |
parent | a9243e626193ab4efe3a618413886773336a38e6 (diff) |
throw() -> noexcept, part 2/3: Automatic loplugin:noexcept rewrite
Change-Id: I076f16d0536b534abf0ced4d76051eadb4c0e033
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114949
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'comphelper')
10 files changed, 40 insertions, 40 deletions
diff --git a/comphelper/source/container/IndexedPropertyValuesContainer.cxx b/comphelper/source/container/IndexedPropertyValuesContainer.cxx index 639fb625797e..c0086061b033 100644 --- a/comphelper/source/container/IndexedPropertyValuesContainer.cxx +++ b/comphelper/source/container/IndexedPropertyValuesContainer.cxx @@ -39,7 +39,7 @@ namespace { class IndexedPropertyValuesContainer : public cppu::WeakImplHelper< container::XIndexContainer, lang::XServiceInfo > { public: - IndexedPropertyValuesContainer() throw(); + IndexedPropertyValuesContainer() noexcept; // XIndexContainer virtual void SAL_CALL insertByIndex( sal_Int32 nIndex, const css::uno::Any& aElement ) override; @@ -67,7 +67,7 @@ private: } -IndexedPropertyValuesContainer::IndexedPropertyValuesContainer() throw() +IndexedPropertyValuesContainer::IndexedPropertyValuesContainer() noexcept { } diff --git a/comphelper/source/container/NamedPropertyValuesContainer.cxx b/comphelper/source/container/NamedPropertyValuesContainer.cxx index dbd0e422b5fb..a44837f11700 100644 --- a/comphelper/source/container/NamedPropertyValuesContainer.cxx +++ b/comphelper/source/container/NamedPropertyValuesContainer.cxx @@ -37,7 +37,7 @@ namespace { class NamedPropertyValuesContainer : public cppu::WeakImplHelper< container::XNameContainer, lang::XServiceInfo > { public: - NamedPropertyValuesContainer() throw(); + NamedPropertyValuesContainer() noexcept; // XNameContainer virtual void SAL_CALL insertByName( const OUString& aName, const css::uno::Any& aElement ) override; @@ -66,7 +66,7 @@ private: } -NamedPropertyValuesContainer::NamedPropertyValuesContainer() throw() +NamedPropertyValuesContainer::NamedPropertyValuesContainer() noexcept { } diff --git a/comphelper/source/property/ChainablePropertySet.cxx b/comphelper/source/property/ChainablePropertySet.cxx index 0360c2e03ad1..65a53e62479f 100644 --- a/comphelper/source/property/ChainablePropertySet.cxx +++ b/comphelper/source/property/ChainablePropertySet.cxx @@ -31,14 +31,14 @@ using namespace ::com::sun::star::lang; using namespace ::com::sun::star::beans; ChainablePropertySet::ChainablePropertySet( comphelper::ChainablePropertySetInfo* pInfo, comphelper::SolarMutex* pMutex ) - throw() + noexcept : mpMutex ( pMutex ) , mxInfo ( pInfo ) { } ChainablePropertySet::~ChainablePropertySet() - throw() + noexcept { } diff --git a/comphelper/source/property/ChainablePropertySetInfo.cxx b/comphelper/source/property/ChainablePropertySetInfo.cxx index 26cf2f6e3d70..10b4d5fda622 100644 --- a/comphelper/source/property/ChainablePropertySetInfo.cxx +++ b/comphelper/source/property/ChainablePropertySetInfo.cxx @@ -38,7 +38,7 @@ ChainablePropertySetInfo::ChainablePropertySetInfo( PropertyInfo const * pMap ) } ChainablePropertySetInfo::~ChainablePropertySetInfo() - throw() + noexcept { } diff --git a/comphelper/source/property/MasterPropertySet.cxx b/comphelper/source/property/MasterPropertySet.cxx index a06aeb0b5031..3f6f0119dbb6 100644 --- a/comphelper/source/property/MasterPropertySet.cxx +++ b/comphelper/source/property/MasterPropertySet.cxx @@ -61,7 +61,7 @@ SlaveData::SlaveData ( ChainablePropertySet *pSlave) } MasterPropertySet::MasterPropertySet( comphelper::MasterPropertySetInfo* pInfo, comphelper::SolarMutex* pMutex ) - throw() + noexcept : mpMutex ( pMutex ) , mnLastId ( 0 ) , mxInfo ( pInfo ) @@ -69,7 +69,7 @@ MasterPropertySet::MasterPropertySet( comphelper::MasterPropertySetInfo* pInfo, } MasterPropertySet::~MasterPropertySet() - throw() + noexcept { for( const auto& rSlave : maSlaveMap ) delete rSlave.second; @@ -82,7 +82,7 @@ Reference< XPropertySetInfo > SAL_CALL MasterPropertySet::getPropertySetInfo( ) } void MasterPropertySet::registerSlave ( ChainablePropertySet *pNewSet ) - throw() + noexcept { maSlaveMap [ ++mnLastId ] = new SlaveData ( pNewSet ); mxInfo->add ( pNewSet->mxInfo->maMap, mnLastId ); diff --git a/comphelper/source/property/MasterPropertySetInfo.cxx b/comphelper/source/property/MasterPropertySetInfo.cxx index 1b1a2249ec08..db8ddb769975 100644 --- a/comphelper/source/property/MasterPropertySetInfo.cxx +++ b/comphelper/source/property/MasterPropertySetInfo.cxx @@ -38,7 +38,7 @@ MasterPropertySetInfo::MasterPropertySetInfo( PropertyInfo const * pMap ) } MasterPropertySetInfo::~MasterPropertySetInfo() - throw() + noexcept { for( const auto& rObj : maMap ) delete rObj.second; diff --git a/comphelper/source/property/genericpropertyset.cxx b/comphelper/source/property/genericpropertyset.cxx index fd591774cdeb..4bf9d31dc5f0 100644 --- a/comphelper/source/property/genericpropertyset.cxx +++ b/comphelper/source/property/genericpropertyset.cxx @@ -64,13 +64,13 @@ namespace comphelper virtual void _getPropertyValues( const PropertyMapEntry** ppEntries, Any* pValue ) override; public: - explicit GenericPropertySet( PropertySetInfo* pInfo ) throw(); + explicit GenericPropertySet( PropertySetInfo* pInfo ) noexcept; // XInterface virtual Any SAL_CALL queryAggregation( const Type & rType ) override; virtual Any SAL_CALL queryInterface( const Type & rType ) override; - virtual void SAL_CALL acquire() throw() override; - virtual void SAL_CALL release() throw() override; + virtual void SAL_CALL acquire() noexcept override; + virtual void SAL_CALL release() noexcept override; // XTypeProvider virtual Sequence< Type > SAL_CALL getTypes( ) override; @@ -90,7 +90,7 @@ namespace comphelper } -GenericPropertySet::GenericPropertySet( PropertySetInfo* pInfo ) throw() +GenericPropertySet::GenericPropertySet( PropertySetInfo* pInfo ) noexcept : PropertySetHelper( pInfo ) ,m_aListener(maMutex) { @@ -205,12 +205,12 @@ Any SAL_CALL GenericPropertySet::queryAggregation( const Type & rType ) return aAny; } -void SAL_CALL GenericPropertySet::acquire() throw() +void SAL_CALL GenericPropertySet::acquire() noexcept { OWeakAggObject::acquire(); } -void SAL_CALL GenericPropertySet::release() throw() +void SAL_CALL GenericPropertySet::release() noexcept { OWeakAggObject::release(); } diff --git a/comphelper/source/property/propertysethelper.cxx b/comphelper/source/property/propertysethelper.cxx index a8a6e6a964d5..ce5f84f95d6e 100644 --- a/comphelper/source/property/propertysethelper.cxx +++ b/comphelper/source/property/propertysethelper.cxx @@ -30,7 +30,7 @@ using namespace ::com::sun::star::uno; using namespace ::com::sun::star::beans; using namespace ::com::sun::star::lang; -static PropertyMapEntry const * find( rtl::Reference<PropertySetInfo>& mxInfo, const OUString& aName ) throw() +static PropertyMapEntry const * find( rtl::Reference<PropertySetInfo>& mxInfo, const OUString& aName ) noexcept { PropertyMap::const_iterator aIter = mxInfo->getPropertyMap().find( aName ); @@ -41,12 +41,12 @@ static PropertyMapEntry const * find( rtl::Reference<PropertySetInfo>& mxInfo, c } -PropertySetHelper::PropertySetHelper( rtl::Reference<comphelper::PropertySetInfo> const & xInfo ) throw() +PropertySetHelper::PropertySetHelper( rtl::Reference<comphelper::PropertySetInfo> const & xInfo ) noexcept : mxInfo(xInfo) { } -PropertySetHelper::~PropertySetHelper() throw() +PropertySetHelper::~PropertySetHelper() noexcept { } diff --git a/comphelper/source/property/propertysetinfo.cxx b/comphelper/source/property/propertysetinfo.cxx index a77a32799c7d..fd68b529392a 100644 --- a/comphelper/source/property/propertysetinfo.cxx +++ b/comphelper/source/property/propertysetinfo.cxx @@ -34,18 +34,18 @@ namespace comphelper class PropertyMapImpl final { public: - PropertyMapImpl() throw(); + PropertyMapImpl() noexcept; - void add(PropertyMapEntry const * pMap) throw(); - void remove( const OUString& aName ) throw(); + void add(PropertyMapEntry const * pMap) noexcept; + void remove( const OUString& aName ) noexcept; - std::vector< Property > const & getProperties() throw(); + std::vector< Property > const & getProperties() noexcept; - const PropertyMap& getPropertyMap() const throw() { return maPropertyMap;} + const PropertyMap& getPropertyMap() const noexcept { return maPropertyMap;} /// @throws UnknownPropertyException Property getPropertyByName( const OUString& aName ); - bool hasPropertyByName( const OUString& aName ) throw(); + bool hasPropertyByName( const OUString& aName ) noexcept; private: PropertyMap maPropertyMap; @@ -53,11 +53,11 @@ private: }; } -PropertyMapImpl::PropertyMapImpl() throw() +PropertyMapImpl::PropertyMapImpl() noexcept { } -void PropertyMapImpl::add(PropertyMapEntry const * pMap) throw() +void PropertyMapImpl::add(PropertyMapEntry const * pMap) noexcept { while (!pMap->maName.isEmpty()) { @@ -72,14 +72,14 @@ void PropertyMapImpl::add(PropertyMapEntry const * pMap) throw() } } -void PropertyMapImpl::remove( const OUString& aName ) throw() +void PropertyMapImpl::remove( const OUString& aName ) noexcept { maPropertyMap.erase( aName ); maProperties.clear(); } -std::vector< Property > const & PropertyMapImpl::getProperties() throw() +std::vector< Property > const & PropertyMapImpl::getProperties() noexcept { // maybe we have to generate the properties after // a change in the property map or at first call @@ -118,24 +118,24 @@ Property PropertyMapImpl::getPropertyByName( const OUString& aName ) return Property( aName, pEntry->mnHandle, pEntry->maType, pEntry->mnAttributes ); } -bool PropertyMapImpl::hasPropertyByName( const OUString& aName ) throw() +bool PropertyMapImpl::hasPropertyByName( const OUString& aName ) noexcept { return maPropertyMap.find( aName ) != maPropertyMap.end(); } -PropertySetInfo::PropertySetInfo() throw() +PropertySetInfo::PropertySetInfo() noexcept : mpImpl(new PropertyMapImpl) { } -PropertySetInfo::PropertySetInfo( PropertyMapEntry const * pMap ) throw() +PropertySetInfo::PropertySetInfo( PropertyMapEntry const * pMap ) noexcept : mpImpl(new PropertyMapImpl) { mpImpl->add( pMap ); } -PropertySetInfo::PropertySetInfo(uno::Sequence<beans::Property> const& rProps) throw() +PropertySetInfo::PropertySetInfo(uno::Sequence<beans::Property> const& rProps) noexcept : mpImpl(new PropertyMapImpl) { PropertyMapEntry * pEntries(new PropertyMapEntry[rProps.getLength() + 1]); @@ -153,16 +153,16 @@ PropertySetInfo::PropertySetInfo(uno::Sequence<beans::Property> const& rProps) t mpImpl->add(pEntries); } -PropertySetInfo::~PropertySetInfo() throw() +PropertySetInfo::~PropertySetInfo() noexcept { } -void PropertySetInfo::add( PropertyMapEntry const * pMap ) throw() +void PropertySetInfo::add( PropertyMapEntry const * pMap ) noexcept { mpImpl->add( pMap ); } -void PropertySetInfo::remove( const OUString& aName ) throw() +void PropertySetInfo::remove( const OUString& aName ) noexcept { mpImpl->remove( aName ); } @@ -182,7 +182,7 @@ sal_Bool SAL_CALL PropertySetInfo::hasPropertyByName( const OUString& Name ) return mpImpl->hasPropertyByName( Name ); } -const PropertyMap& PropertySetInfo::getPropertyMap() const throw() +const PropertyMap& PropertySetInfo::getPropertyMap() const noexcept { return mpImpl->getPropertyMap(); } diff --git a/comphelper/source/property/propstate.cxx b/comphelper/source/property/propstate.cxx index d48a72d094cf..183f51efcedf 100644 --- a/comphelper/source/property/propstate.cxx +++ b/comphelper/source/property/propstate.cxx @@ -210,13 +210,13 @@ namespace comphelper } - void SAL_CALL OStatefulPropertySet::acquire() throw() + void SAL_CALL OStatefulPropertySet::acquire() noexcept { ::cppu::OWeakObject::acquire(); } - void SAL_CALL OStatefulPropertySet::release() throw() + void SAL_CALL OStatefulPropertySet::release() noexcept { ::cppu::OWeakObject::release(); } |