From 5e21a413c788f839a66d9e4c14e745ed18058db8 Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Tue, 25 Feb 2014 21:31:58 +0100 Subject: cppuhelper: retrofit std::exception into overriding exception specs Change-Id: I56e32131b7991ee9948ce46765632eb823d463b3 --- .../source/migration/services/basicmigration.cxx | 10 +-- .../source/migration/services/basicmigration.hxx | 10 +-- desktop/source/migration/services/jvmfwk.cxx | 72 +++++++++++----------- .../migration/services/oo3extensionmigration.cxx | 22 +++---- .../migration/services/oo3extensionmigration.hxx | 22 +++---- .../migration/services/wordbookmigration.cxx | 10 +-- .../migration/services/wordbookmigration.hxx | 10 +-- 7 files changed, 78 insertions(+), 78 deletions(-) (limited to 'desktop/source/migration') diff --git a/desktop/source/migration/services/basicmigration.cxx b/desktop/source/migration/services/basicmigration.cxx index e61607d5d6bc..45d03f71d02b 100644 --- a/desktop/source/migration/services/basicmigration.cxx +++ b/desktop/source/migration/services/basicmigration.cxx @@ -162,7 +162,7 @@ namespace migration // XServiceInfo - OUString BasicMigration::getImplementationName() throw (RuntimeException) + OUString BasicMigration::getImplementationName() throw (RuntimeException, std::exception) { return BasicMigration_getImplementationName(); } @@ -170,14 +170,14 @@ namespace migration sal_Bool BasicMigration::supportsService(OUString const & ServiceName) - throw (css::uno::RuntimeException) + throw (css::uno::RuntimeException, std::exception) { return cppu::supportsService(this, ServiceName); } - Sequence< OUString > BasicMigration::getSupportedServiceNames() throw (RuntimeException) + Sequence< OUString > BasicMigration::getSupportedServiceNames() throw (RuntimeException, std::exception) { return BasicMigration_getSupportedServiceNames(); } @@ -186,7 +186,7 @@ namespace migration // XInitialization - void BasicMigration::initialize( const Sequence< Any >& aArguments ) throw (Exception, RuntimeException) + void BasicMigration::initialize( const Sequence< Any >& aArguments ) throw (Exception, RuntimeException, std::exception) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -213,7 +213,7 @@ namespace migration Any BasicMigration::execute( const Sequence< beans::NamedValue >& ) - throw (lang::IllegalArgumentException, Exception, RuntimeException) + 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 5169c6eca100..c20d067583e3 100644 --- a/desktop/source/migration/services/basicmigration.hxx +++ b/desktop/source/migration/services/basicmigration.hxx @@ -70,21 +70,21 @@ namespace migration // XServiceInfo virtual OUString SAL_CALL getImplementationName() - throw (::com::sun::star::uno::RuntimeException); + throw (::com::sun::star::uno::RuntimeException, std::exception); virtual sal_Bool SAL_CALL supportsService( const OUString& rServiceName ) - throw (::com::sun::star::uno::RuntimeException); + throw (::com::sun::star::uno::RuntimeException, std::exception); virtual ::com::sun::star::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() - throw (::com::sun::star::uno::RuntimeException); + throw (::com::sun::star::uno::RuntimeException, std::exception); // XInitialization virtual void SAL_CALL initialize( const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& aArguments ) - throw (::com::sun::star::uno::Exception, ::com::sun::star::uno::RuntimeException); + throw (::com::sun::star::uno::Exception, ::com::sun::star::uno::RuntimeException, std::exception); // XJob virtual ::com::sun::star::uno::Any SAL_CALL execute( const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::NamedValue >& Arguments ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::Exception, - ::com::sun::star::uno::RuntimeException); + ::com::sun::star::uno::RuntimeException, std::exception); }; //......................................................................... diff --git a/desktop/source/migration/services/jvmfwk.cxx b/desktop/source/migration/services/jvmfwk.cxx index 05f1cd523790..f6d5b0004ddd 100644 --- a/desktop/source/migration/services/jvmfwk.cxx +++ b/desktop/source/migration/services/jvmfwk.cxx @@ -92,30 +92,30 @@ class JavaMigration : public ::cppu::WeakImplHelper4< public: // XServiceInfo virtual OUString SAL_CALL getImplementationName() - throw (css::uno::RuntimeException); + throw (css::uno::RuntimeException, std::exception); virtual sal_Bool SAL_CALL supportsService( const OUString & rServiceName ) - throw (css::uno::RuntimeException); + throw (css::uno::RuntimeException, std::exception); virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() - throw (css::uno::RuntimeException); + throw (css::uno::RuntimeException, std::exception); //XInitialization virtual void SAL_CALL initialize( const css::uno::Sequence< css::uno::Any >& aArguments ) - throw(css::uno::Exception, css::uno::RuntimeException); + throw(css::uno::Exception, css::uno::RuntimeException, std::exception); //XJob virtual css::uno::Any SAL_CALL execute( const css::uno::Sequence& Arguments ) throw (css::lang::IllegalArgumentException, css::uno::Exception, - css::uno::RuntimeException); + css::uno::RuntimeException, std::exception); // XLayerHandler virtual void SAL_CALL startLayer() - throw(::com::sun::star::lang::WrappedTargetException); + throw(::com::sun::star::lang::WrappedTargetException, std::exception); virtual void SAL_CALL endLayer() throw( ::com::sun::star::configuration::backend::MalformedDataException, - ::com::sun::star::lang::WrappedTargetException ); + ::com::sun::star::lang::WrappedTargetException, std::exception ); virtual void SAL_CALL overrideNode( const OUString& aName, @@ -123,14 +123,14 @@ public: sal_Bool bClear) throw( ::com::sun::star::configuration::backend::MalformedDataException, - ::com::sun::star::lang::WrappedTargetException ); + ::com::sun::star::lang::WrappedTargetException, std::exception ); virtual void SAL_CALL addOrReplaceNode( const OUString& aName, sal_Int16 aAttributes) throw( ::com::sun::star::configuration::backend::MalformedDataException, - ::com::sun::star::lang::WrappedTargetException ); + ::com::sun::star::lang::WrappedTargetException, std::exception ); virtual void SAL_CALL addOrReplaceNodeFromTemplate( const OUString& aName, @@ -138,18 +138,18 @@ public: sal_Int16 aAttributes ) throw( ::com::sun::star::configuration::backend::MalformedDataException, - ::com::sun::star::lang::WrappedTargetException ); + ::com::sun::star::lang::WrappedTargetException, std::exception ); virtual void SAL_CALL endNode() throw( ::com::sun::star::configuration::backend::MalformedDataException, - ::com::sun::star::lang::WrappedTargetException ); + ::com::sun::star::lang::WrappedTargetException, std::exception ); virtual void SAL_CALL dropNode( const OUString& aName ) throw( ::com::sun::star::configuration::backend::MalformedDataException, - ::com::sun::star::lang::WrappedTargetException ); + ::com::sun::star::lang::WrappedTargetException, std::exception ); virtual void SAL_CALL overrideProperty( const OUString& aName, @@ -158,25 +158,25 @@ public: sal_Bool bClear ) throw( ::com::sun::star::configuration::backend::MalformedDataException, - ::com::sun::star::lang::WrappedTargetException ); + ::com::sun::star::lang::WrappedTargetException, std::exception ); virtual void SAL_CALL setPropertyValue( const css::uno::Any& aValue ) throw( ::com::sun::star::configuration::backend::MalformedDataException, - ::com::sun::star::lang::WrappedTargetException ); + ::com::sun::star::lang::WrappedTargetException, std::exception ); virtual void SAL_CALL setPropertyValueForLocale( const css::uno::Any& aValue, const OUString& aLocale ) throw( ::com::sun::star::configuration::backend::MalformedDataException, - ::com::sun::star::lang::WrappedTargetException ); + ::com::sun::star::lang::WrappedTargetException, std::exception ); virtual void SAL_CALL endProperty() throw( ::com::sun::star::configuration::backend::MalformedDataException, - ::com::sun::star::lang::WrappedTargetException ); + ::com::sun::star::lang::WrappedTargetException, std::exception ); virtual void SAL_CALL addProperty( const OUString& aName, @@ -184,7 +184,7 @@ public: const css::uno::Type& aType ) throw( ::com::sun::star::configuration::backend::MalformedDataException, - ::com::sun::star::lang::WrappedTargetException ); + ::com::sun::star::lang::WrappedTargetException, std::exception ); virtual void SAL_CALL addPropertyWithValue( const OUString& aName, @@ -192,7 +192,7 @@ public: const css::uno::Any& aValue ) throw( ::com::sun::star::configuration::backend::MalformedDataException, - ::com::sun::star::lang::WrappedTargetException ); + ::com::sun::star::lang::WrappedTargetException, std::exception ); @@ -228,26 +228,26 @@ css::uno::Sequence< OUString > jvmfwk_getSupportedServiceNames() // XServiceInfo OUString SAL_CALL JavaMigration::getImplementationName() - throw (css::uno::RuntimeException) + throw (css::uno::RuntimeException, std::exception) { return jvmfwk_getImplementationName(); } sal_Bool JavaMigration::supportsService(OUString const & ServiceName) - throw (css::uno::RuntimeException) + throw (css::uno::RuntimeException, std::exception) { return cppu::supportsService(this, ServiceName); } css::uno::Sequence< OUString > SAL_CALL JavaMigration::getSupportedServiceNames() - throw (css::uno::RuntimeException) + 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) + throw(css::uno::Exception, css::uno::RuntimeException, std::exception) { const css::uno::Any* pIter = aArguments.getConstArray(); const css::uno::Any* pEnd = pIter + aArguments.getLength(); @@ -292,7 +292,7 @@ void SAL_CALL JavaMigration::initialize( const css::uno::Sequence< css::uno::Any css::uno::Any SAL_CALL JavaMigration::execute( const css::uno::Sequence& ) throw (css::lang::IllegalArgumentException, css::uno::Exception, - css::uno::RuntimeException) + css::uno::RuntimeException, std::exception) { migrateJavarc(); if (m_xLayer.is()) @@ -337,7 +337,7 @@ void JavaMigration::migrateJavarc() // XLayerHandler void SAL_CALL JavaMigration::startLayer() - throw(css::lang::WrappedTargetException) + throw(css::lang::WrappedTargetException, std::exception) { } @@ -345,7 +345,7 @@ void SAL_CALL JavaMigration::startLayer() void SAL_CALL JavaMigration::endLayer() throw( MalformedDataException, - WrappedTargetException ) + WrappedTargetException, std::exception ) { } @@ -356,7 +356,7 @@ void SAL_CALL JavaMigration::overrideNode( sal_Bool) throw( MalformedDataException, - WrappedTargetException ) + WrappedTargetException, std::exception ) { @@ -368,14 +368,14 @@ void SAL_CALL JavaMigration::addOrReplaceNode( sal_Int16) throw( MalformedDataException, - WrappedTargetException ) + WrappedTargetException, std::exception ) { } void SAL_CALL JavaMigration::endNode() throw( MalformedDataException, - WrappedTargetException ) + WrappedTargetException, std::exception ) { } @@ -384,7 +384,7 @@ void SAL_CALL JavaMigration::dropNode( const OUString& ) throw( MalformedDataException, - WrappedTargetException ) + WrappedTargetException, std::exception ) { } @@ -396,7 +396,7 @@ void SAL_CALL JavaMigration::overrideProperty( sal_Bool ) throw( MalformedDataException, - WrappedTargetException ) + WrappedTargetException, std::exception ) { if ( aName == "Enable" ) m_aStack.push(TElementStack::value_type(aName,ENABLE_JAVA)); @@ -409,7 +409,7 @@ void SAL_CALL JavaMigration::setPropertyValue( const Any& aValue ) throw( MalformedDataException, - WrappedTargetException ) + WrappedTargetException, std::exception ) { if ( !m_aStack.empty()) { @@ -455,7 +455,7 @@ void SAL_CALL JavaMigration::setPropertyValueForLocale( const OUString& ) throw( MalformedDataException, - WrappedTargetException ) + WrappedTargetException, std::exception ) { } @@ -463,7 +463,7 @@ void SAL_CALL JavaMigration::setPropertyValueForLocale( void SAL_CALL JavaMigration::endProperty() throw( MalformedDataException, - WrappedTargetException ) + WrappedTargetException, std::exception ) { if (!m_aStack.empty()) m_aStack.pop(); @@ -476,7 +476,7 @@ void SAL_CALL JavaMigration::addProperty( const Type& ) throw( MalformedDataException, - WrappedTargetException ) + WrappedTargetException, std::exception ) { } @@ -487,7 +487,7 @@ void SAL_CALL JavaMigration::addPropertyWithValue( const Any& ) throw( MalformedDataException, - WrappedTargetException ) + WrappedTargetException, std::exception ) { } @@ -497,7 +497,7 @@ void SAL_CALL JavaMigration::addOrReplaceNodeFromTemplate( sal_Int16 ) throw( MalformedDataException, - WrappedTargetException ) + WrappedTargetException, std::exception ) { } diff --git a/desktop/source/migration/services/oo3extensionmigration.cxx b/desktop/source/migration/services/oo3extensionmigration.cxx index 720054b5aef5..993153c3f6e7 100644 --- a/desktop/source/migration/services/oo3extensionmigration.cxx +++ b/desktop/source/migration/services/oo3extensionmigration.cxx @@ -326,7 +326,7 @@ void OO3ExtensionMigration::migrateExtension( const OUString& sSourceDir ) // XServiceInfo -OUString OO3ExtensionMigration::getImplementationName() throw (RuntimeException) +OUString OO3ExtensionMigration::getImplementationName() throw (RuntimeException, std::exception) { return OO3ExtensionMigration_getImplementationName(); } @@ -334,14 +334,14 @@ OUString OO3ExtensionMigration::getImplementationName() throw (RuntimeException) sal_Bool OO3ExtensionMigration::supportsService(OUString const & ServiceName) - throw (css::uno::RuntimeException) + throw (css::uno::RuntimeException, std::exception) { return cppu::supportsService(this, ServiceName); } -Sequence< OUString > OO3ExtensionMigration::getSupportedServiceNames() throw (RuntimeException) +Sequence< OUString > OO3ExtensionMigration::getSupportedServiceNames() throw (RuntimeException, std::exception) { return OO3ExtensionMigration_getSupportedServiceNames(); } @@ -350,7 +350,7 @@ Sequence< OUString > OO3ExtensionMigration::getSupportedServiceNames() throw (Ru // XInitialization -void OO3ExtensionMigration::initialize( const Sequence< Any >& aArguments ) throw (Exception, RuntimeException) +void OO3ExtensionMigration::initialize( const Sequence< Any >& aArguments ) throw (Exception, RuntimeException, std::exception) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -380,7 +380,7 @@ void OO3ExtensionMigration::initialize( const Sequence< Any >& aArguments ) thro } Any OO3ExtensionMigration::execute( const Sequence< beans::NamedValue >& ) - throw (lang::IllegalArgumentException, Exception, RuntimeException) + throw (lang::IllegalArgumentException, Exception, RuntimeException, std::exception) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -422,14 +422,14 @@ TmpRepositoryCommandEnv::~TmpRepositoryCommandEnv() // XCommandEnvironment uno::Reference< task::XInteractionHandler > TmpRepositoryCommandEnv::getInteractionHandler() -throw ( uno::RuntimeException ) +throw ( uno::RuntimeException, std::exception ) { return this; } uno::Reference< ucb::XProgressHandler > TmpRepositoryCommandEnv::getProgressHandler() -throw ( uno::RuntimeException ) +throw ( uno::RuntimeException, std::exception ) { return this; } @@ -437,7 +437,7 @@ throw ( uno::RuntimeException ) // XInteractionHandler void TmpRepositoryCommandEnv::handle( uno::Reference< task::XInteractionRequest> const & xRequest ) - throw ( uno::RuntimeException ) + throw ( uno::RuntimeException, std::exception ) { OSL_ASSERT( xRequest->getRequest().getValueTypeClass() == uno::TypeClass_EXCEPTION ); @@ -465,17 +465,17 @@ void TmpRepositoryCommandEnv::handle( // XProgressHandler void TmpRepositoryCommandEnv::push( uno::Any const & /*Status*/ ) -throw (uno::RuntimeException) +throw (uno::RuntimeException, std::exception) { } void TmpRepositoryCommandEnv::update( uno::Any const & /*Status */) -throw (uno::RuntimeException) +throw (uno::RuntimeException, std::exception) { } -void TmpRepositoryCommandEnv::pop() throw (uno::RuntimeException) +void TmpRepositoryCommandEnv::pop() throw (uno::RuntimeException, std::exception) { } diff --git a/desktop/source/migration/services/oo3extensionmigration.hxx b/desktop/source/migration/services/oo3extensionmigration.hxx index d76ad51e68a4..4a03a2cefd53 100644 --- a/desktop/source/migration/services/oo3extensionmigration.hxx +++ b/desktop/source/migration/services/oo3extensionmigration.hxx @@ -94,21 +94,21 @@ namespace migration // XServiceInfo virtual OUString SAL_CALL getImplementationName() - throw (::com::sun::star::uno::RuntimeException); + throw (::com::sun::star::uno::RuntimeException, std::exception); virtual sal_Bool SAL_CALL supportsService( const OUString& rServiceName ) - throw (::com::sun::star::uno::RuntimeException); + throw (::com::sun::star::uno::RuntimeException, std::exception); virtual ::com::sun::star::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() - throw (::com::sun::star::uno::RuntimeException); + throw (::com::sun::star::uno::RuntimeException, std::exception); // XInitialization virtual void SAL_CALL initialize( const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& aArguments ) - throw (::com::sun::star::uno::Exception, ::com::sun::star::uno::RuntimeException); + throw (::com::sun::star::uno::Exception, ::com::sun::star::uno::RuntimeException, std::exception); // XJob virtual ::com::sun::star::uno::Any SAL_CALL execute( const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::NamedValue >& Arguments ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::Exception, - ::com::sun::star::uno::RuntimeException); + ::com::sun::star::uno::RuntimeException, std::exception); }; class TmpRepositoryCommandEnv @@ -124,21 +124,21 @@ namespace migration // XCommandEnvironment virtual ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionHandler > SAL_CALL - getInteractionHandler() throw ( ::com::sun::star::uno::RuntimeException ); + getInteractionHandler() throw ( ::com::sun::star::uno::RuntimeException, std::exception ); virtual ::com::sun::star::uno::Reference< ::com::sun::star::ucb::XProgressHandler > - SAL_CALL getProgressHandler() throw ( ::com::sun::star::uno::RuntimeException ); + SAL_CALL getProgressHandler() throw ( ::com::sun::star::uno::RuntimeException, std::exception ); // XInteractionHandler virtual void SAL_CALL handle( ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionRequest > const & xRequest ) - throw (::com::sun::star::uno::RuntimeException); + throw (::com::sun::star::uno::RuntimeException, std::exception); // XProgressHandler virtual void SAL_CALL push( ::com::sun::star::uno::Any const & Status ) - throw (::com::sun::star::uno::RuntimeException); + throw (::com::sun::star::uno::RuntimeException, std::exception); virtual void SAL_CALL update( ::com::sun::star::uno::Any const & Status ) - throw (::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL pop() throw (::com::sun::star::uno::RuntimeException); + throw (::com::sun::star::uno::RuntimeException, std::exception); + virtual void SAL_CALL pop() throw (::com::sun::star::uno::RuntimeException, std::exception); }; //......................................................................... diff --git a/desktop/source/migration/services/wordbookmigration.cxx b/desktop/source/migration/services/wordbookmigration.cxx index 38ccca46c2b0..842611ee438b 100644 --- a/desktop/source/migration/services/wordbookmigration.cxx +++ b/desktop/source/migration/services/wordbookmigration.cxx @@ -228,7 +228,7 @@ bool IsUserWordbook( const OUString& rFile ) // XServiceInfo - OUString WordbookMigration::getImplementationName() throw (RuntimeException) + OUString WordbookMigration::getImplementationName() throw (RuntimeException, std::exception) { return WordbookMigration_getImplementationName(); } @@ -236,14 +236,14 @@ bool IsUserWordbook( const OUString& rFile ) sal_Bool WordbookMigration::supportsService(OUString const & ServiceName) - throw (css::uno::RuntimeException) + throw (css::uno::RuntimeException, std::exception) { return cppu::supportsService(this, ServiceName); } - Sequence< OUString > WordbookMigration::getSupportedServiceNames() throw (RuntimeException) + Sequence< OUString > WordbookMigration::getSupportedServiceNames() throw (RuntimeException, std::exception) { return WordbookMigration_getSupportedServiceNames(); } @@ -252,7 +252,7 @@ bool IsUserWordbook( const OUString& rFile ) // XInitialization - void WordbookMigration::initialize( const Sequence< Any >& aArguments ) throw (Exception, RuntimeException) + void WordbookMigration::initialize( const Sequence< Any >& aArguments ) throw (Exception, RuntimeException, std::exception) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -279,7 +279,7 @@ bool IsUserWordbook( const OUString& rFile ) Any WordbookMigration::execute( const Sequence< beans::NamedValue >& ) - throw (lang::IllegalArgumentException, Exception, RuntimeException) + 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 9a731e5a4d67..bbe181bdffb8 100644 --- a/desktop/source/migration/services/wordbookmigration.hxx +++ b/desktop/source/migration/services/wordbookmigration.hxx @@ -70,21 +70,21 @@ namespace migration // XServiceInfo virtual OUString SAL_CALL getImplementationName() - throw (::com::sun::star::uno::RuntimeException); + throw (::com::sun::star::uno::RuntimeException, std::exception); virtual sal_Bool SAL_CALL supportsService( const OUString& rServiceName ) - throw (::com::sun::star::uno::RuntimeException); + throw (::com::sun::star::uno::RuntimeException, std::exception); virtual ::com::sun::star::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() - throw (::com::sun::star::uno::RuntimeException); + throw (::com::sun::star::uno::RuntimeException, std::exception); // XInitialization virtual void SAL_CALL initialize( const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& aArguments ) - throw (::com::sun::star::uno::Exception, ::com::sun::star::uno::RuntimeException); + throw (::com::sun::star::uno::Exception, ::com::sun::star::uno::RuntimeException, std::exception); // XJob virtual ::com::sun::star::uno::Any SAL_CALL execute( const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::NamedValue >& Arguments ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::Exception, - ::com::sun::star::uno::RuntimeException); + ::com::sun::star::uno::RuntimeException, std::exception); }; //......................................................................... -- cgit