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 /desktop/source/migration | |
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 'desktop/source/migration')
7 files changed, 49 insertions, 167 deletions
diff --git a/desktop/source/migration/services/basicmigration.cxx b/desktop/source/migration/services/basicmigration.cxx index a71ca5b0ebaf..bfe2e84df1d6 100644 --- a/desktop/source/migration/services/basicmigration.cxx +++ b/desktop/source/migration/services/basicmigration.cxx @@ -151,20 +151,19 @@ namespace migration // XServiceInfo - OUString BasicMigration::getImplementationName() throw (RuntimeException, std::exception) + OUString BasicMigration::getImplementationName() { return BasicMigration_getImplementationName(); } sal_Bool BasicMigration::supportsService(OUString const & ServiceName) - throw (css::uno::RuntimeException, std::exception) { return cppu::supportsService(this, ServiceName); } - Sequence< OUString > BasicMigration::getSupportedServiceNames() throw (RuntimeException, std::exception) + Sequence< OUString > BasicMigration::getSupportedServiceNames() { return BasicMigration_getSupportedServiceNames(); } @@ -173,7 +172,7 @@ namespace migration // XInitialization - void BasicMigration::initialize( const Sequence< Any >& aArguments ) throw (Exception, RuntimeException, std::exception) + void BasicMigration::initialize( const Sequence< Any >& aArguments ) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -200,7 +199,6 @@ namespace migration Any BasicMigration::execute( const Sequence< beans::NamedValue >& ) - throw (lang::IllegalArgumentException, Exception, RuntimeException, std::exception) { ::osl::MutexGuard aGuard( m_aMutex ); diff --git a/desktop/source/migration/services/basicmigration.hxx b/desktop/source/migration/services/basicmigration.hxx index 53791d64ba4b..f8d3d0a4a1df 100644 --- a/desktop/source/migration/services/basicmigration.hxx +++ b/desktop/source/migration/services/basicmigration.hxx @@ -66,22 +66,16 @@ namespace migration virtual ~BasicMigration() override; // XServiceInfo - virtual OUString SAL_CALL getImplementationName() - throw (css::uno::RuntimeException, std::exception) override; - virtual sal_Bool SAL_CALL supportsService( const OUString& rServiceName ) - throw (css::uno::RuntimeException, std::exception) override; - virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() - throw (css::uno::RuntimeException, std::exception) override; + virtual OUString SAL_CALL getImplementationName() override; + virtual sal_Bool SAL_CALL supportsService( const OUString& rServiceName ) override; + virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override; // XInitialization - virtual void SAL_CALL initialize( const css::uno::Sequence< css::uno::Any >& aArguments ) - throw (css::uno::Exception, css::uno::RuntimeException, std::exception) override; + virtual void SAL_CALL initialize( const css::uno::Sequence< css::uno::Any >& aArguments ) override; // XJob virtual css::uno::Any SAL_CALL execute( - const css::uno::Sequence< css::beans::NamedValue >& Arguments ) - throw (css::lang::IllegalArgumentException, css::uno::Exception, - css::uno::RuntimeException, std::exception) override; + const css::uno::Sequence< css::beans::NamedValue >& Arguments ) override; }; diff --git a/desktop/source/migration/services/jvmfwk.cxx b/desktop/source/migration/services/jvmfwk.cxx index aa3e15deb494..907651433414 100644 --- a/desktop/source/migration/services/jvmfwk.cxx +++ b/desktop/source/migration/services/jvmfwk.cxx @@ -86,108 +86,65 @@ class JavaMigration : public ::cppu::WeakImplHelper< { public: // XServiceInfo - virtual OUString SAL_CALL getImplementationName() - throw (css::uno::RuntimeException, std::exception) override; - virtual sal_Bool SAL_CALL supportsService( const OUString & rServiceName ) - throw (css::uno::RuntimeException, std::exception) override; - virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() - throw (css::uno::RuntimeException, std::exception) override; + virtual OUString SAL_CALL getImplementationName() override; + virtual sal_Bool SAL_CALL supportsService( const OUString & rServiceName ) override; + virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override; //XInitialization - virtual void SAL_CALL initialize( const css::uno::Sequence< css::uno::Any >& aArguments ) - throw(css::uno::Exception, css::uno::RuntimeException, std::exception) override; + virtual void SAL_CALL initialize( const css::uno::Sequence< css::uno::Any >& aArguments ) override; //XJob virtual css::uno::Any SAL_CALL execute( - const css::uno::Sequence<css::beans::NamedValue >& Arguments ) - throw (css::lang::IllegalArgumentException, css::uno::Exception, - css::uno::RuntimeException, std::exception) override; + const css::uno::Sequence<css::beans::NamedValue >& Arguments ) override; // XLayerHandler - virtual void SAL_CALL startLayer() - throw(css::lang::WrappedTargetException, std::exception) override; + virtual void SAL_CALL startLayer() override; - virtual void SAL_CALL endLayer() - throw( - css::configuration::backend::MalformedDataException, - css::lang::WrappedTargetException, std::exception ) override; + virtual void SAL_CALL endLayer() override; virtual void SAL_CALL overrideNode( const OUString& aName, sal_Int16 aAttributes, - sal_Bool bClear) - throw( - css::configuration::backend::MalformedDataException, - css::lang::WrappedTargetException, std::exception ) override; + sal_Bool bClear) override; virtual void SAL_CALL addOrReplaceNode( const OUString& aName, - sal_Int16 aAttributes) - throw( - css::configuration::backend::MalformedDataException, - css::lang::WrappedTargetException, std::exception ) override; + sal_Int16 aAttributes) override; virtual void SAL_CALL addOrReplaceNodeFromTemplate( const OUString& aName, const css::configuration::backend::TemplateIdentifier& aTemplate, - sal_Int16 aAttributes ) - throw( - css::configuration::backend::MalformedDataException, - css::lang::WrappedTargetException, std::exception ) override; + sal_Int16 aAttributes ) override; - virtual void SAL_CALL endNode() - throw( - css::configuration::backend::MalformedDataException, - css::lang::WrappedTargetException, std::exception ) override; + virtual void SAL_CALL endNode() override; virtual void SAL_CALL dropNode( - const OUString& aName ) - throw( - css::configuration::backend::MalformedDataException, - css::lang::WrappedTargetException, std::exception ) override; + const OUString& aName ) override; virtual void SAL_CALL overrideProperty( const OUString& aName, sal_Int16 aAttributes, const css::uno::Type& aType, - sal_Bool bClear ) - throw( - css::configuration::backend::MalformedDataException, - css::lang::WrappedTargetException, std::exception ) override; + sal_Bool bClear ) override; virtual void SAL_CALL setPropertyValue( - const css::uno::Any& aValue ) - throw( - css::configuration::backend::MalformedDataException, - css::lang::WrappedTargetException, std::exception ) override; + const css::uno::Any& aValue ) override; virtual void SAL_CALL setPropertyValueForLocale( const css::uno::Any& aValue, - const OUString& aLocale ) - throw( - css::configuration::backend::MalformedDataException, - css::lang::WrappedTargetException, std::exception ) override; + const OUString& aLocale ) override; - virtual void SAL_CALL endProperty() - throw( - css::configuration::backend::MalformedDataException, - css::lang::WrappedTargetException, std::exception ) override; + virtual void SAL_CALL endProperty() override; virtual void SAL_CALL addProperty( const OUString& aName, sal_Int16 aAttributes, - const css::uno::Type& aType ) - throw( - css::configuration::backend::MalformedDataException, - css::lang::WrappedTargetException, std::exception ) override; + const css::uno::Type& aType ) override; virtual void SAL_CALL addPropertyWithValue( const OUString& aName, sal_Int16 aAttributes, - const css::uno::Any& aValue ) - throw( - css::configuration::backend::MalformedDataException, - css::lang::WrappedTargetException, std::exception ) override; + const css::uno::Any& aValue ) override; virtual ~JavaMigration() override; @@ -221,26 +178,22 @@ css::uno::Sequence< OUString > jvmfwk_getSupportedServiceNames() // XServiceInfo OUString SAL_CALL JavaMigration::getImplementationName() - throw (css::uno::RuntimeException, std::exception) { return jvmfwk_getImplementationName(); } sal_Bool JavaMigration::supportsService(OUString const & ServiceName) - throw (css::uno::RuntimeException, std::exception) { return cppu::supportsService(this, ServiceName); } css::uno::Sequence< OUString > SAL_CALL JavaMigration::getSupportedServiceNames() - throw (css::uno::RuntimeException, std::exception) { return jvmfwk_getSupportedServiceNames(); } //XInitialization ---------------------------------------------------------------------- void SAL_CALL JavaMigration::initialize( const css::uno::Sequence< css::uno::Any >& aArguments ) - throw(css::uno::Exception, css::uno::RuntimeException, std::exception) { const css::uno::Any* pIter = aArguments.getConstArray(); const css::uno::Any* pEnd = pIter + aArguments.getLength(); @@ -284,8 +237,6 @@ void SAL_CALL JavaMigration::initialize( const css::uno::Sequence< css::uno::Any //XJob css::uno::Any SAL_CALL JavaMigration::execute( const css::uno::Sequence<css::beans::NamedValue >& ) - throw (css::lang::IllegalArgumentException, css::uno::Exception, - css::uno::RuntimeException, std::exception) { migrateJavarc(); if (m_xLayer.is()) @@ -330,15 +281,11 @@ void JavaMigration::migrateJavarc() // XLayerHandler void SAL_CALL JavaMigration::startLayer() - throw(css::lang::WrappedTargetException, std::exception) { } void SAL_CALL JavaMigration::endLayer() - throw( - MalformedDataException, - WrappedTargetException, std::exception ) { } @@ -347,9 +294,6 @@ void SAL_CALL JavaMigration::overrideNode( const OUString&, sal_Int16, sal_Bool) - throw( - MalformedDataException, - WrappedTargetException, std::exception ) { @@ -359,25 +303,16 @@ void SAL_CALL JavaMigration::overrideNode( void SAL_CALL JavaMigration::addOrReplaceNode( const OUString&, sal_Int16) - throw( - MalformedDataException, - WrappedTargetException, std::exception ) { } void SAL_CALL JavaMigration::endNode() - throw( - MalformedDataException, - WrappedTargetException, std::exception ) { } void SAL_CALL JavaMigration::dropNode( const OUString& ) - throw( - MalformedDataException, - WrappedTargetException, std::exception ) { } @@ -387,9 +322,6 @@ void SAL_CALL JavaMigration::overrideProperty( sal_Int16, const Type&, sal_Bool ) - throw( - MalformedDataException, - WrappedTargetException, std::exception ) { if ( aName == "Enable" ) m_aStack.push(TElementStack::value_type(aName,ENABLE_JAVA)); @@ -400,9 +332,6 @@ void SAL_CALL JavaMigration::overrideProperty( void SAL_CALL JavaMigration::setPropertyValue( const Any& aValue ) - throw( - MalformedDataException, - WrappedTargetException, std::exception ) { if ( !m_aStack.empty()) { @@ -446,17 +375,11 @@ void SAL_CALL JavaMigration::setPropertyValue( void SAL_CALL JavaMigration::setPropertyValueForLocale( const Any&, const OUString& ) - throw( - MalformedDataException, - WrappedTargetException, std::exception ) { } void SAL_CALL JavaMigration::endProperty() - throw( - MalformedDataException, - WrappedTargetException, std::exception ) { if (!m_aStack.empty()) m_aStack.pop(); @@ -467,9 +390,6 @@ void SAL_CALL JavaMigration::addProperty( const OUString&, sal_Int16, const Type& ) - throw( - MalformedDataException, - WrappedTargetException, std::exception ) { } @@ -478,9 +398,6 @@ void SAL_CALL JavaMigration::addPropertyWithValue( const OUString&, sal_Int16, const Any& ) - throw( - MalformedDataException, - WrappedTargetException, std::exception ) { } @@ -488,9 +405,6 @@ void SAL_CALL JavaMigration::addOrReplaceNodeFromTemplate( const OUString&, const TemplateIdentifier&, sal_Int16 ) - throw( - MalformedDataException, - WrappedTargetException, std::exception ) { } diff --git a/desktop/source/migration/services/oo3extensionmigration.cxx b/desktop/source/migration/services/oo3extensionmigration.cxx index a0caafb4ea9a..182c50bf5e2f 100644 --- a/desktop/source/migration/services/oo3extensionmigration.cxx +++ b/desktop/source/migration/services/oo3extensionmigration.cxx @@ -293,20 +293,19 @@ void OO3ExtensionMigration::migrateExtension( const OUString& sSourceDir ) // XServiceInfo -OUString OO3ExtensionMigration::getImplementationName() throw (RuntimeException, std::exception) +OUString OO3ExtensionMigration::getImplementationName() { return OO3ExtensionMigration_getImplementationName(); } sal_Bool OO3ExtensionMigration::supportsService(OUString const & ServiceName) - throw (css::uno::RuntimeException, std::exception) { return cppu::supportsService(this, ServiceName); } -Sequence< OUString > OO3ExtensionMigration::getSupportedServiceNames() throw (RuntimeException, std::exception) +Sequence< OUString > OO3ExtensionMigration::getSupportedServiceNames() { return OO3ExtensionMigration_getSupportedServiceNames(); } @@ -315,7 +314,7 @@ Sequence< OUString > OO3ExtensionMigration::getSupportedServiceNames() throw (Ru // XInitialization -void OO3ExtensionMigration::initialize( const Sequence< Any >& aArguments ) throw (Exception, RuntimeException, std::exception) +void OO3ExtensionMigration::initialize( const Sequence< Any >& aArguments ) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -345,7 +344,6 @@ void OO3ExtensionMigration::initialize( const Sequence< Any >& aArguments ) thro } Any OO3ExtensionMigration::execute( const Sequence< beans::NamedValue >& ) - throw (lang::IllegalArgumentException, Exception, RuntimeException, std::exception) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -385,14 +383,12 @@ TmpRepositoryCommandEnv::~TmpRepositoryCommandEnv() // XCommandEnvironment uno::Reference< task::XInteractionHandler > TmpRepositoryCommandEnv::getInteractionHandler() -throw ( uno::RuntimeException, std::exception ) { return this; } uno::Reference< ucb::XProgressHandler > TmpRepositoryCommandEnv::getProgressHandler() -throw ( uno::RuntimeException, std::exception ) { return this; } @@ -400,7 +396,6 @@ throw ( uno::RuntimeException, std::exception ) // XInteractionHandler void TmpRepositoryCommandEnv::handle( uno::Reference< task::XInteractionRequest> const & xRequest ) - throw ( uno::RuntimeException, std::exception ) { OSL_ASSERT( xRequest->getRequest().getValueTypeClass() == uno::TypeClass_EXCEPTION ); @@ -428,17 +423,15 @@ void TmpRepositoryCommandEnv::handle( // XProgressHandler void TmpRepositoryCommandEnv::push( uno::Any const & /*Status*/ ) -throw (uno::RuntimeException, std::exception) { } void TmpRepositoryCommandEnv::update( uno::Any const & /*Status */) -throw (uno::RuntimeException, std::exception) { } -void TmpRepositoryCommandEnv::pop() throw (uno::RuntimeException, std::exception) +void TmpRepositoryCommandEnv::pop() { } diff --git a/desktop/source/migration/services/oo3extensionmigration.hxx b/desktop/source/migration/services/oo3extensionmigration.hxx index 482dfe844909..f9722aa2edac 100644 --- a/desktop/source/migration/services/oo3extensionmigration.hxx +++ b/desktop/source/migration/services/oo3extensionmigration.hxx @@ -90,22 +90,16 @@ namespace migration virtual ~OO3ExtensionMigration() override; // XServiceInfo - virtual OUString SAL_CALL getImplementationName() - throw (css::uno::RuntimeException, std::exception) override; - virtual sal_Bool SAL_CALL supportsService( const OUString& rServiceName ) - throw (css::uno::RuntimeException, std::exception) override; - virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() - throw (css::uno::RuntimeException, std::exception) override; + virtual OUString SAL_CALL getImplementationName() override; + virtual sal_Bool SAL_CALL supportsService( const OUString& rServiceName ) override; + virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override; // XInitialization - virtual void SAL_CALL initialize( const css::uno::Sequence< css::uno::Any >& aArguments ) - throw (css::uno::Exception, css::uno::RuntimeException, std::exception) override; + virtual void SAL_CALL initialize( const css::uno::Sequence< css::uno::Any >& aArguments ) override; // XJob virtual css::uno::Any SAL_CALL execute( - const css::uno::Sequence< css::beans::NamedValue >& Arguments ) - throw (css::lang::IllegalArgumentException, css::uno::Exception, - css::uno::RuntimeException, std::exception) override; + const css::uno::Sequence< css::beans::NamedValue >& Arguments ) override; }; class TmpRepositoryCommandEnv @@ -119,21 +113,18 @@ namespace migration // XCommandEnvironment virtual css::uno::Reference< css::task::XInteractionHandler > SAL_CALL - getInteractionHandler() throw ( css::uno::RuntimeException, std::exception ) override; + getInteractionHandler() override; virtual css::uno::Reference< css::ucb::XProgressHandler > - SAL_CALL getProgressHandler() throw ( css::uno::RuntimeException, std::exception ) override; + SAL_CALL getProgressHandler() override; // XInteractionHandler virtual void SAL_CALL handle( - css::uno::Reference< css::task::XInteractionRequest > const & xRequest ) - throw (css::uno::RuntimeException, std::exception) override; + css::uno::Reference< css::task::XInteractionRequest > const & xRequest ) override; // XProgressHandler - virtual void SAL_CALL push( css::uno::Any const & Status ) - throw (css::uno::RuntimeException, std::exception) override; - virtual void SAL_CALL update( css::uno::Any const & Status ) - throw (css::uno::RuntimeException, std::exception) override; - virtual void SAL_CALL pop() throw (css::uno::RuntimeException, std::exception) override; + virtual void SAL_CALL push( css::uno::Any const & Status ) override; + virtual void SAL_CALL update( css::uno::Any const & Status ) override; + virtual void SAL_CALL pop() override; }; diff --git a/desktop/source/migration/services/wordbookmigration.cxx b/desktop/source/migration/services/wordbookmigration.cxx index 91950c4f49a7..8e607ac8b594 100644 --- a/desktop/source/migration/services/wordbookmigration.cxx +++ b/desktop/source/migration/services/wordbookmigration.cxx @@ -185,20 +185,19 @@ bool IsUserWordbook( const OUString& rFile ) // XServiceInfo - OUString WordbookMigration::getImplementationName() throw (RuntimeException, std::exception) + OUString WordbookMigration::getImplementationName() { return WordbookMigration_getImplementationName(); } sal_Bool WordbookMigration::supportsService(OUString const & ServiceName) - throw (css::uno::RuntimeException, std::exception) { return cppu::supportsService(this, ServiceName); } - Sequence< OUString > WordbookMigration::getSupportedServiceNames() throw (RuntimeException, std::exception) + Sequence< OUString > WordbookMigration::getSupportedServiceNames() { return WordbookMigration_getSupportedServiceNames(); } @@ -207,7 +206,7 @@ bool IsUserWordbook( const OUString& rFile ) // XInitialization - void WordbookMigration::initialize( const Sequence< Any >& aArguments ) throw (Exception, RuntimeException, std::exception) + void WordbookMigration::initialize( const Sequence< Any >& aArguments ) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -234,7 +233,6 @@ bool IsUserWordbook( const OUString& rFile ) Any WordbookMigration::execute( const Sequence< beans::NamedValue >& ) - throw (lang::IllegalArgumentException, Exception, RuntimeException, std::exception) { ::osl::MutexGuard aGuard( m_aMutex ); diff --git a/desktop/source/migration/services/wordbookmigration.hxx b/desktop/source/migration/services/wordbookmigration.hxx index 86013ce36d89..ab89858ee109 100644 --- a/desktop/source/migration/services/wordbookmigration.hxx +++ b/desktop/source/migration/services/wordbookmigration.hxx @@ -66,22 +66,16 @@ namespace migration virtual ~WordbookMigration() override; // XServiceInfo - virtual OUString SAL_CALL getImplementationName() - throw (css::uno::RuntimeException, std::exception) override; - virtual sal_Bool SAL_CALL supportsService( const OUString& rServiceName ) - throw (css::uno::RuntimeException, std::exception) override; - virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() - throw (css::uno::RuntimeException, std::exception) override; + virtual OUString SAL_CALL getImplementationName() override; + virtual sal_Bool SAL_CALL supportsService( const OUString& rServiceName ) override; + virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override; // XInitialization - virtual void SAL_CALL initialize( const css::uno::Sequence< css::uno::Any >& aArguments ) - throw (css::uno::Exception, css::uno::RuntimeException, std::exception) override; + virtual void SAL_CALL initialize( const css::uno::Sequence< css::uno::Any >& aArguments ) override; // XJob virtual css::uno::Any SAL_CALL execute( - const css::uno::Sequence< css::beans::NamedValue >& Arguments ) - throw (css::lang::IllegalArgumentException, css::uno::Exception, - css::uno::RuntimeException, std::exception) override; + const css::uno::Sequence< css::beans::NamedValue >& Arguments ) override; }; |