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 /cppuhelper/source/component_context.cxx | |
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 'cppuhelper/source/component_context.cxx')
-rw-r--r-- | cppuhelper/source/component_context.cxx | 52 |
1 files changed, 13 insertions, 39 deletions
diff --git a/cppuhelper/source/component_context.cxx b/cppuhelper/source/component_context.cxx index 3fb4b94b6432..8bc46d9281ef 100644 --- a/cppuhelper/source/component_context.cxx +++ b/cppuhelper/source/component_context.cxx @@ -93,8 +93,7 @@ public: Reference< lang::XComponent > const & xSource, Reference< lang::XComponent > const & xTarget ); - virtual void SAL_CALL disposing( lang::EventObject const & rSource ) - throw (RuntimeException, std::exception) override; + virtual void SAL_CALL disposing( lang::EventObject const & rSource ) override; }; inline void DisposingForwarder::listen( @@ -108,7 +107,6 @@ inline void DisposingForwarder::listen( } void DisposingForwarder::disposing( lang::EventObject const & ) - throw (RuntimeException, std::exception) { m_xTarget->dispose(); m_xTarget.clear(); @@ -156,43 +154,29 @@ public: virtual ~ComponentContext() override; // XComponentContext - virtual Any SAL_CALL getValueByName( OUString const & rName ) - throw (RuntimeException, std::exception) override; - virtual Reference<lang::XMultiComponentFactory> SAL_CALL getServiceManager() - throw (RuntimeException, std::exception) override; + virtual Any SAL_CALL getValueByName( OUString const & rName ) override; + virtual Reference<lang::XMultiComponentFactory> SAL_CALL getServiceManager() override; // XNameContainer virtual void SAL_CALL insertByName( - OUString const & name, Any const & element ) - throw (lang::IllegalArgumentException, container::ElementExistException, - lang::WrappedTargetException, RuntimeException, std::exception) override; - virtual void SAL_CALL removeByName( OUString const & name ) - throw (container::NoSuchElementException, - lang::WrappedTargetException, RuntimeException, std::exception) override; + OUString const & name, Any const & element ) override; + virtual void SAL_CALL removeByName( OUString const & name ) override; // XNameReplace virtual void SAL_CALL replaceByName( - OUString const & name, Any const & element ) - throw (lang::IllegalArgumentException,container::NoSuchElementException, - lang::WrappedTargetException, RuntimeException, std::exception) override; + OUString const & name, Any const & element ) override; // XNameAccess - virtual Any SAL_CALL getByName( OUString const & name ) - throw (container::NoSuchElementException, - lang::WrappedTargetException, RuntimeException, std::exception) override; - virtual Sequence<OUString> SAL_CALL getElementNames() - throw (RuntimeException, std::exception) override; - virtual sal_Bool SAL_CALL hasByName( OUString const & name ) - throw (RuntimeException, std::exception) override; + virtual Any SAL_CALL getByName( OUString const & name ) override; + virtual Sequence<OUString> SAL_CALL getElementNames() override; + virtual sal_Bool SAL_CALL hasByName( OUString const & name ) override; // XElementAccess - virtual Type SAL_CALL getElementType() throw (RuntimeException, std::exception) override; - virtual sal_Bool SAL_CALL hasElements() throw (RuntimeException, std::exception) override; + virtual Type SAL_CALL getElementType() override; + virtual sal_Bool SAL_CALL hasElements() override; }; // XNameContainer void ComponentContext::insertByName( OUString const & name, Any const & element ) - throw (lang::IllegalArgumentException, container::ElementExistException, - lang::WrappedTargetException, RuntimeException, std::exception) { t_map::mapped_type entry( new ContextEntry( @@ -211,8 +195,6 @@ void ComponentContext::insertByName( void ComponentContext::removeByName( OUString const & name ) - throw (container::NoSuchElementException, - lang::WrappedTargetException, RuntimeException, std::exception) { MutexGuard guard( m_mutex ); t_map::iterator iFind( m_map.find( name ) ); @@ -229,8 +211,6 @@ void ComponentContext::removeByName( OUString const & name ) void ComponentContext::replaceByName( OUString const & name, Any const & element ) - throw (lang::IllegalArgumentException,container::NoSuchElementException, - lang::WrappedTargetException, RuntimeException, std::exception) { MutexGuard guard( m_mutex ); t_map::const_iterator const iFind( m_map.find( name ) ); @@ -254,15 +234,12 @@ void ComponentContext::replaceByName( // XNameAccess Any ComponentContext::getByName( OUString const & name ) - throw (container::NoSuchElementException, - lang::WrappedTargetException, RuntimeException, std::exception) { return getValueByName( name ); } Sequence<OUString> ComponentContext::getElementNames() - throw (RuntimeException, std::exception) { MutexGuard guard( m_mutex ); Sequence<OUString> ret( m_map.size() ); @@ -277,7 +254,6 @@ Sequence<OUString> ComponentContext::getElementNames() sal_Bool ComponentContext::hasByName( OUString const & name ) - throw (RuntimeException, std::exception) { MutexGuard guard( m_mutex ); return m_map.find( name ) != m_map.end(); @@ -285,13 +261,13 @@ sal_Bool ComponentContext::hasByName( OUString const & name ) // XElementAccess -Type ComponentContext::getElementType() throw (RuntimeException, std::exception) +Type ComponentContext::getElementType() { return cppu::UnoType<void>::get(); } -sal_Bool ComponentContext::hasElements() throw (RuntimeException, std::exception) +sal_Bool ComponentContext::hasElements() { MutexGuard guard( m_mutex ); return ! m_map.empty(); @@ -395,7 +371,6 @@ Any ComponentContext::lookupMap( OUString const & rName ) Any ComponentContext::getValueByName( OUString const & rName ) - throw (RuntimeException, std::exception) { // to determine the root context: if ( rName == "_root" ) @@ -415,7 +390,6 @@ Any ComponentContext::getValueByName( OUString const & rName ) } Reference< lang::XMultiComponentFactory > ComponentContext::getServiceManager() - throw (RuntimeException, std::exception) { if ( !m_xSMgr.is() ) { |