diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2017-01-26 12:28:58 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2017-01-26 12:54:43 +0000 |
commit | e57ca02849c3d87142ff5ff9099a212e72b8139c (patch) | |
tree | bcce66b27261553c308779f3e8663a269ed3a671 /framework/source/fwi | |
parent | 8802ebd5172ec4bc412a59d136c82b77ab452281 (diff) |
Remove dynamic exception specifications
...(for now, from LIBO_INTERNAL_CODE only). See the mail thread starting at
<https://lists.freedesktop.org/archives/libreoffice/2017-January/076665.html>
"Dynamic Exception Specifications" for details.
Most changes have been done automatically by the rewriting loplugin:dynexcspec
(after enabling the rewriting mode, to be committed shortly). The way it only
removes exception specs from declarations if it also sees a definition, it
identified some dead declarations-w/o-definitions (that have been removed
manually) and some cases where a definition appeared in multiple include files
(which have also been cleaned up manually). There's also been cases of macro
paramters (that were used to abstract over exception specs) that have become
unused now (and been removed).
Furthermore, some code needed to be cleaned up manually
(avmedia/source/quicktime/ and connectivity/source/drivers/kab/), as I had no
configurations available that would actually build that code. Missing @throws
documentation has not been applied in such manual clean-up.
Change-Id: I3408691256c9b0c12bc5332de976743626e13960
Reviewed-on: https://gerrit.libreoffice.org/33574
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'framework/source/fwi')
4 files changed, 6 insertions, 35 deletions
diff --git a/framework/source/fwi/threadhelp/transactionmanager.cxx b/framework/source/fwi/threadhelp/transactionmanager.cxx index a6d8efc466a1..fa7847e5696f 100644 --- a/framework/source/fwi/threadhelp/transactionmanager.cxx +++ b/framework/source/fwi/threadhelp/transactionmanager.cxx @@ -153,7 +153,7 @@ EWorkingMode TransactionManager::getWorkingMode() const @param "eMode" ,used to enable/disable throwing exceptions automatically for rejected calls *//*-*****************************************************************************************************/ -void TransactionManager::registerTransaction( EExceptionMode eMode ) throw( css::uno::RuntimeException, css::lang::DisposedException ) +void TransactionManager::registerTransaction( EExceptionMode eMode ) { ::osl::MutexGuard aAccessGuard( m_aAccessLock ); switch( m_eWorkingMode ) @@ -198,7 +198,7 @@ void TransactionManager::registerTransaction( EExceptionMode eMode ) throw( css @seealso method registerTransaction() *//*-*****************************************************************************************************/ -void TransactionManager::unregisterTransaction() throw( css::uno::RuntimeException, css::lang::DisposedException ) +void TransactionManager::unregisterTransaction() { // This call could not rejected! // Safe access to internal member. diff --git a/framework/source/fwi/uielement/constitemcontainer.cxx b/framework/source/fwi/uielement/constitemcontainer.cxx index 9653444f9126..6a1c6f696433 100644 --- a/framework/source/fwi/uielement/constitemcontainer.cxx +++ b/framework/source/fwi/uielement/constitemcontainer.cxx @@ -163,7 +163,7 @@ Reference< XIndexAccess > ConstItemContainer::deepCopyContainer( const Reference } // XUnoTunnel -sal_Int64 ConstItemContainer::getSomething( const css::uno::Sequence< sal_Int8 >& rIdentifier ) throw(css::uno::RuntimeException, std::exception) +sal_Int64 ConstItemContainer::getSomething( const css::uno::Sequence< sal_Int8 >& rIdentifier ) { if( ( rIdentifier.getLength() == 16 ) && ( 0 == memcmp( ConstItemContainer::GetUnoTunnelId().getConstArray(), rIdentifier.getConstArray(), 16 ) ) ) { @@ -191,20 +191,17 @@ ConstItemContainer* ConstItemContainer::GetImplementation( const css::uno::Refer // XElementAccess sal_Bool SAL_CALL ConstItemContainer::hasElements() -throw ( RuntimeException, std::exception ) { return ( !m_aItemVector.empty() ); } // XIndexAccess sal_Int32 SAL_CALL ConstItemContainer::getCount() -throw ( RuntimeException, std::exception ) { return m_aItemVector.size(); } Any SAL_CALL ConstItemContainer::getByIndex( sal_Int32 Index ) -throw ( IndexOutOfBoundsException, WrappedTargetException, RuntimeException, std::exception ) { if ( sal_Int32( m_aItemVector.size()) > Index ) return makeAny( m_aItemVector[Index] ); @@ -214,7 +211,6 @@ throw ( IndexOutOfBoundsException, WrappedTargetException, RuntimeException, std // XPropertySet Reference< XPropertySetInfo > SAL_CALL ConstItemContainer::getPropertySetInfo() -throw (css::uno::RuntimeException, std::exception) { // Optimize this method ! // We initialize a static variable only one time. And we don't must use a mutex at every call! @@ -239,12 +235,10 @@ throw (css::uno::RuntimeException, std::exception) } void SAL_CALL ConstItemContainer::setPropertyValue( const OUString&, const Any& ) -throw (css::beans::UnknownPropertyException, css::beans::PropertyVetoException, css::lang::IllegalArgumentException, css::lang::WrappedTargetException, css::uno::RuntimeException, std::exception) { } Any SAL_CALL ConstItemContainer::getPropertyValue( const OUString& PropertyName ) -throw (css::beans::UnknownPropertyException, css::lang::WrappedTargetException, css::uno::RuntimeException, std::exception) { if ( PropertyName == PROPNAME_UINAME ) return makeAny( m_aUIName ); @@ -253,36 +247,30 @@ throw (css::beans::UnknownPropertyException, css::lang::WrappedTargetException, } void SAL_CALL ConstItemContainer::addPropertyChangeListener( const OUString&, const css::uno::Reference< css::beans::XPropertyChangeListener >& ) -throw (css::beans::UnknownPropertyException, css::lang::WrappedTargetException, css::uno::RuntimeException, std::exception) { } void SAL_CALL ConstItemContainer::removePropertyChangeListener( const OUString&, const css::uno::Reference< css::beans::XPropertyChangeListener >& ) -throw (css::beans::UnknownPropertyException, css::lang::WrappedTargetException, css::uno::RuntimeException, std::exception) { // Only read-only properties - do nothing } void SAL_CALL ConstItemContainer::addVetoableChangeListener( const OUString&, const css::uno::Reference< css::beans::XVetoableChangeListener >& ) -throw (css::beans::UnknownPropertyException, css::lang::WrappedTargetException, css::uno::RuntimeException, std::exception) { // Only read-only properties - do nothing } void SAL_CALL ConstItemContainer::removeVetoableChangeListener( const OUString&, const css::uno::Reference< css::beans::XVetoableChangeListener >& ) -throw (css::beans::UnknownPropertyException, css::lang::WrappedTargetException, css::uno::RuntimeException, std::exception) { // Only read-only properties - do nothing } // XFastPropertySet void SAL_CALL ConstItemContainer::setFastPropertyValue( sal_Int32, const css::uno::Any& ) -throw (css::beans::UnknownPropertyException, css::beans::PropertyVetoException, css::lang::IllegalArgumentException, css::lang::WrappedTargetException, css::uno::RuntimeException, std::exception) { } Any SAL_CALL ConstItemContainer::getFastPropertyValue( sal_Int32 nHandle ) -throw (css::beans::UnknownPropertyException, css::lang::WrappedTargetException, css::uno::RuntimeException, std::exception) { if ( nHandle == PROPHANDLE_UINAME ) return makeAny( m_aUIName ); diff --git a/framework/source/fwi/uielement/itemcontainer.cxx b/framework/source/fwi/uielement/itemcontainer.cxx index 239f4027acba..892947009ff3 100644 --- a/framework/source/fwi/uielement/itemcontainer.cxx +++ b/framework/source/fwi/uielement/itemcontainer.cxx @@ -148,7 +148,6 @@ ItemContainer* ItemContainer::GetImplementation( const css::uno::Reference< css: // XElementAccess sal_Bool SAL_CALL ItemContainer::hasElements() -throw ( RuntimeException, std::exception ) { ShareGuard aLock( m_aShareMutex ); return ( !m_aItemVector.empty() ); @@ -156,14 +155,12 @@ throw ( RuntimeException, std::exception ) // XIndexAccess sal_Int32 SAL_CALL ItemContainer::getCount() -throw ( RuntimeException, std::exception ) { ShareGuard aLock( m_aShareMutex ); return m_aItemVector.size(); } Any SAL_CALL ItemContainer::getByIndex( sal_Int32 Index ) -throw ( IndexOutOfBoundsException, WrappedTargetException, RuntimeException, std::exception ) { ShareGuard aLock( m_aShareMutex ); if ( sal_Int32( m_aItemVector.size()) > Index ) @@ -174,7 +171,6 @@ throw ( IndexOutOfBoundsException, WrappedTargetException, RuntimeException, std // XIndexContainer void SAL_CALL ItemContainer::insertByIndex( sal_Int32 Index, const Any& aItem ) -throw ( IllegalArgumentException, IndexOutOfBoundsException, WrappedTargetException, RuntimeException, std::exception ) { Sequence< PropertyValue > aSeq; if ( aItem >>= aSeq ) @@ -197,7 +193,6 @@ throw ( IllegalArgumentException, IndexOutOfBoundsException, WrappedTargetExcept } void SAL_CALL ItemContainer::removeByIndex( sal_Int32 nIndex ) -throw ( IndexOutOfBoundsException, WrappedTargetException, RuntimeException, std::exception ) { ShareGuard aLock( m_aShareMutex ); if ( (sal_Int32)m_aItemVector.size() > nIndex ) @@ -209,7 +204,6 @@ throw ( IndexOutOfBoundsException, WrappedTargetException, RuntimeException, std } void SAL_CALL ItemContainer::replaceByIndex( sal_Int32 Index, const Any& aItem ) -throw ( IllegalArgumentException, IndexOutOfBoundsException, WrappedTargetException, RuntimeException, std::exception ) { Sequence< PropertyValue > aSeq; if ( aItem >>= aSeq ) diff --git a/framework/source/fwi/uielement/rootitemcontainer.cxx b/framework/source/fwi/uielement/rootitemcontainer.cxx index 5974fd94c376..b6c2a6499aec 100644 --- a/framework/source/fwi/uielement/rootitemcontainer.cxx +++ b/framework/source/fwi/uielement/rootitemcontainer.cxx @@ -106,7 +106,7 @@ RootItemContainer::~RootItemContainer() { } -Any SAL_CALL RootItemContainer::queryInterface( const Type& _rType ) throw(RuntimeException, std::exception) +Any SAL_CALL RootItemContainer::queryInterface( const Type& _rType ) { Any aRet = RootItemContainer_BASE::queryInterface( _rType ); if ( !aRet.hasValue() ) @@ -114,7 +114,7 @@ Any SAL_CALL RootItemContainer::queryInterface( const Type& _rType ) throw(Runti return aRet; } -Sequence< Type > SAL_CALL RootItemContainer::getTypes( ) throw(RuntimeException, std::exception) +Sequence< Type > SAL_CALL RootItemContainer::getTypes( ) { return comphelper::concatSequences( RootItemContainer_BASE::getTypes(), @@ -140,7 +140,7 @@ Reference< XIndexAccess > RootItemContainer::deepCopyContainer( const Reference< } // XUnoTunnel -sal_Int64 RootItemContainer::getSomething( const css::uno::Sequence< sal_Int8 >& rIdentifier ) throw(css::uno::RuntimeException, std::exception) +sal_Int64 RootItemContainer::getSomething( const css::uno::Sequence< sal_Int8 >& rIdentifier ) { if( ( rIdentifier.getLength() == 16 ) && ( 0 == memcmp( RootItemContainer::GetUnoTunnelId().getConstArray(), rIdentifier.getConstArray(), 16 ) ) ) return sal::static_int_cast< sal_Int64 >( reinterpret_cast< sal_IntPtr >( this )); @@ -166,7 +166,6 @@ RootItemContainer* RootItemContainer::GetImplementation( const css::uno::Referen // XElementAccess sal_Bool SAL_CALL RootItemContainer::hasElements() -throw ( RuntimeException, std::exception ) { ShareGuard aLock( m_aShareMutex ); return ( !m_aItemVector.empty() ); @@ -174,14 +173,12 @@ throw ( RuntimeException, std::exception ) // XIndexAccess sal_Int32 SAL_CALL RootItemContainer::getCount() -throw ( RuntimeException, std::exception ) { ShareGuard aLock( m_aShareMutex ); return m_aItemVector.size(); } Any SAL_CALL RootItemContainer::getByIndex( sal_Int32 Index ) -throw ( IndexOutOfBoundsException, WrappedTargetException, RuntimeException, std::exception ) { ShareGuard aLock( m_aShareMutex ); if ( sal_Int32( m_aItemVector.size()) > Index ) @@ -192,7 +189,6 @@ throw ( IndexOutOfBoundsException, WrappedTargetException, RuntimeException, std // XIndexContainer void SAL_CALL RootItemContainer::insertByIndex( sal_Int32 Index, const Any& aItem ) -throw ( IllegalArgumentException, IndexOutOfBoundsException, WrappedTargetException, RuntimeException, std::exception ) { Sequence< PropertyValue > aSeq; if ( aItem >>= aSeq ) @@ -214,7 +210,6 @@ throw ( IllegalArgumentException, IndexOutOfBoundsException, WrappedTargetExcept } void SAL_CALL RootItemContainer::removeByIndex( sal_Int32 nIndex ) -throw ( IndexOutOfBoundsException, WrappedTargetException, RuntimeException, std::exception ) { ShareGuard aLock( m_aShareMutex ); if ( (sal_Int32)m_aItemVector.size() > nIndex ) @@ -226,7 +221,6 @@ throw ( IndexOutOfBoundsException, WrappedTargetException, RuntimeException, std } void SAL_CALL RootItemContainer::replaceByIndex( sal_Int32 Index, const Any& aItem ) -throw ( IllegalArgumentException, IndexOutOfBoundsException, WrappedTargetException, RuntimeException, std::exception ) { Sequence< PropertyValue > aSeq; if ( aItem >>= aSeq ) @@ -242,13 +236,11 @@ throw ( IllegalArgumentException, IndexOutOfBoundsException, WrappedTargetExcept } Reference< XInterface > SAL_CALL RootItemContainer::createInstanceWithContext( const Reference< XComponentContext >& ) -throw ( Exception, RuntimeException, std::exception) { return static_cast<OWeakObject *>(new ItemContainer( m_aShareMutex )); } Reference< XInterface > SAL_CALL RootItemContainer::createInstanceWithArgumentsAndContext( const Sequence< Any >&, const Reference< XComponentContext >& ) -throw (Exception, RuntimeException, std::exception) { return static_cast<OWeakObject *>(new ItemContainer( m_aShareMutex )); } @@ -258,7 +250,6 @@ sal_Bool SAL_CALL RootItemContainer::convertFastPropertyValue( Any& aConve Any& aOldValue , sal_Int32 nHandle , const Any& aValue ) -throw( css::lang::IllegalArgumentException ) { // Initialize state with sal_False !!! // (Handle can be invalid) @@ -281,7 +272,6 @@ throw( css::lang::IllegalArgumentException ) void SAL_CALL RootItemContainer::setFastPropertyValue_NoBroadcast( sal_Int32 nHandle , const css::uno::Any& aValue ) -throw( css::uno::Exception, std::exception ) { switch( nHandle ) { @@ -329,7 +319,6 @@ void SAL_CALL RootItemContainer::getFastPropertyValue( css::uno::Any& aValue , } css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL RootItemContainer::getPropertySetInfo() -throw (css::uno::RuntimeException, std::exception) { // Optimize this method ! // We initialize a static variable only one time. And we don't must use a mutex at every call! |