diff options
author | Noel Grandin <noel@peralex.com> | 2014-06-05 08:08:06 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2014-06-05 08:17:46 +0200 |
commit | da906ab93781928adc51c605825f91b16fe8dd19 (patch) | |
tree | d66505e7ca1c9894dd4fb10503f78a4edbd1be74 | |
parent | 41066fef1ca94723615838fd521d08c5d37aac5b (diff) |
cppuhelper: remove SAL_THROW macro
Change-Id: I54141071396d04e7bead56da14a665b8556ba6d2
41 files changed, 309 insertions, 501 deletions
diff --git a/cppuhelper/qa/propertysetmixin/comp_propertysetmixin.cxx b/cppuhelper/qa/propertysetmixin/comp_propertysetmixin.cxx index b5122268b471..0d6c36bbff91 100644 --- a/cppuhelper/qa/propertysetmixin/comp_propertysetmixin.cxx +++ b/cppuhelper/qa/propertysetmixin/comp_propertysetmixin.cxx @@ -376,7 +376,6 @@ private: css::uno::Reference< css::uno::XInterface > SAL_CALL create( css::uno::Reference< css::uno::XComponentContext > const & context) - SAL_THROW((css::uno::Exception)) { return static_cast< cppu::OWeakObject * >(new Supplier(context)); } diff --git a/cppuhelper/source/access_control.cxx b/cppuhelper/source/access_control.cxx index 8be3101ff3e5..b129c1aec160 100644 --- a/cppuhelper/source/access_control.cxx +++ b/cppuhelper/source/access_control.cxx @@ -43,7 +43,6 @@ namespace cppu { AccessControl::AccessControl( Reference< XComponentContext > const & xContext ) - SAL_THROW( (RuntimeException) ) { if (! (xContext->getValueByName( str_ac_singleton() ) >>= m_xController)) { @@ -53,7 +52,6 @@ AccessControl::AccessControl( Reference< XComponentContext > const & xContext ) AccessControl::AccessControl( Reference< security::XAccessController > const & xController ) - SAL_THROW( (RuntimeException) ) : m_xController( xController ) { if (! m_xController.is()) @@ -63,7 +61,6 @@ AccessControl::AccessControl( } AccessControl::AccessControl( AccessControl const & ac ) - SAL_THROW( (RuntimeException) ) : m_xController( ac.m_xController ) { if (! m_xController.is()) @@ -89,7 +86,6 @@ AccessControl::AccessControl( AccessControl const & ac ) inline void __checkPermission( Reference< security::XAccessController > const & xController, Type const & type, rtl_uString * str1, rtl_uString * str2 ) - SAL_THROW( (RuntimeException) ) { __permission perm; perm.m_str1 = str1; @@ -104,7 +100,6 @@ inline void __checkPermission( void AccessControl::checkRuntimePermission( OUString const & name ) - SAL_THROW( (RuntimeException) ) { __checkPermission( m_xController, @@ -114,7 +109,6 @@ void AccessControl::checkRuntimePermission( void AccessControl::checkFilePermission( OUString const & url, OUString const & actions ) - SAL_THROW( (RuntimeException) ) { __checkPermission( m_xController, @@ -124,7 +118,6 @@ void AccessControl::checkFilePermission( void AccessControl::checkSocketPermission( OUString const & host, OUString const & actions ) - SAL_THROW( (RuntimeException) ) { __checkPermission( m_xController, diff --git a/cppuhelper/source/compat.cxx b/cppuhelper/source/compat.cxx index b06f4407afcf..2141f8b763eb 100644 --- a/cppuhelper/source/compat.cxx +++ b/cppuhelper/source/compat.cxx @@ -51,7 +51,7 @@ namespace cppu { SAL_DLLPUBLIC_EXPORT css::uno::Reference< css::lang::XMultiComponentFactory > bootstrapInitialSF( - rtl::OUString const &) SAL_THROW((com::sun::star::uno::Exception)) + rtl::OUString const &) { for (;;) { std::abort(); } // avoid "must return a value" warnings } @@ -59,26 +59,26 @@ css::uno::Reference< css::lang::XMultiComponentFactory > bootstrapInitialSF( SAL_DLLPUBLIC_EXPORT css::uno::Reference< css::uno::XComponentContext > SAL_CALL bootstrap_InitialComponentContext( css::uno::Reference< css::registry::XSimpleRegistry > const &, - rtl::OUString const &) SAL_THROW((css::uno::Exception)) + rtl::OUString const &) { for (;;) { std::abort(); } // avoid "must return a value" warnings } SAL_DLLPUBLIC_EXPORT css::uno::Reference< css::registry::XSimpleRegistry > -SAL_CALL createNestedRegistry(rtl::OUString const &) SAL_THROW(()) { +SAL_CALL createNestedRegistry(rtl::OUString const &) { for (;;) { std::abort(); } // avoid "must return a value" warnings } SAL_DLLPUBLIC_EXPORT css::uno::Reference< css::lang::XMultiServiceFactory > SAL_CALL createRegistryServiceFactory( rtl::OUString const &, rtl::OUString const &, sal_Bool, - rtl::OUString const &) SAL_THROW((css::uno::Exception)) + rtl::OUString const &) { for (;;) { std::abort(); } // avoid "must return a value" warnings } SAL_DLLPUBLIC_EXPORT css::uno::Reference< css::registry::XSimpleRegistry > -SAL_CALL createSimpleRegistry(rtl::OUString const &) SAL_THROW(()) { +SAL_CALL createSimpleRegistry(rtl::OUString const &) { for (;;) { std::abort(); } // avoid "must return a value" warnings } @@ -87,7 +87,7 @@ createStandardClassWithSequence( css::uno::Reference< css::lang::XMultiServiceFactory > const &, rtl::OUString const &, css::uno::Reference< css::reflection::XIdlClass > const &, - css::uno::Sequence< rtl::OUString > const &) SAL_THROW(()) + css::uno::Sequence< rtl::OUString > const &) { for (;;) { std::abort(); } // avoid "must return a value" warnings } @@ -98,7 +98,6 @@ invokeStaticComponentFactory( css::uno::Reference<css::lang::XMultiServiceFactory> const &, css::uno::Reference<css::registry::XRegistryKey> const &, rtl::OUString const &) - SAL_THROW((css::loader::CannotActivateFactoryException)) { for (;;) { std::abort(); } // avoid "must return a value" warnings } @@ -109,7 +108,6 @@ loadSharedLibComponentFactory( css::uno::Reference<css::lang::XMultiServiceFactory> const &, css::uno::Reference<css::registry::XRegistryKey> const &, rtl::OUString const &) - SAL_THROW((css::loader::CannotActivateFactoryException)) { for (;;) { std::abort(); } // avoid "must return a value" warnings } diff --git a/cppuhelper/source/component.cxx b/cppuhelper/source/component.cxx index 1b1e4522bf37..361dba0957e1 100644 --- a/cppuhelper/source/component.cxx +++ b/cppuhelper/source/component.cxx @@ -40,11 +40,11 @@ namespace cppu // class OComponentHelper -OComponentHelper::OComponentHelper( Mutex & rMutex ) SAL_THROW(()) +OComponentHelper::OComponentHelper( Mutex & rMutex ) : rBHelper( rMutex ) { } -OComponentHelper::~OComponentHelper() SAL_THROW( (RuntimeException) ) +OComponentHelper::~OComponentHelper() { } diff --git a/cppuhelper/source/component_context.cxx b/cppuhelper/source/component_context.cxx index b211bd75a0ee..dc8944af5b79 100644 --- a/cppuhelper/source/component_context.cxx +++ b/cppuhelper/source/component_context.cxx @@ -266,7 +266,6 @@ static void dumpEntry( OUString const & key, Any const & value ) #endif static inline void try_dispose( Reference< XInterface > const & xInstance ) - SAL_THROW( (RuntimeException) ) { Reference< lang::XComponent > xComp( xInstance, UNO_QUERY ); if (xComp.is()) @@ -276,7 +275,6 @@ static inline void try_dispose( Reference< XInterface > const & xInstance ) } static inline void try_dispose( Reference< lang::XComponent > const & xComp ) - SAL_THROW( (RuntimeException) ) { if (xComp.is()) { @@ -292,15 +290,13 @@ class DisposingForwarder Reference< lang::XComponent > m_xTarget; inline DisposingForwarder( Reference< lang::XComponent > const & xTarget ) - SAL_THROW(()) : m_xTarget( xTarget ) { OSL_ASSERT( m_xTarget.is() ); } public: // listens at source for disposing, then disposes target static inline void listen( Reference< lang::XComponent > const & xSource, - Reference< lang::XComponent > const & xTarget ) - SAL_THROW( (RuntimeException) ); + Reference< lang::XComponent > const & xTarget ); virtual void SAL_CALL disposing( lang::EventObject const & rSource ) throw (RuntimeException, std::exception) SAL_OVERRIDE; @@ -309,7 +305,6 @@ public: inline void DisposingForwarder::listen( Reference< lang::XComponent > const & xSource, Reference< lang::XComponent > const & xTarget ) - SAL_THROW( (RuntimeException) ) { if (xSource.is()) { @@ -356,16 +351,14 @@ protected: Reference< lang::XMultiComponentFactory > m_xSMgr; protected: - Any lookupMap( OUString const & rName ) - SAL_THROW( (RuntimeException) ); + Any lookupMap( OUString const & rName ); virtual void SAL_CALL disposing() SAL_OVERRIDE; public: ComponentContext( ContextEntry_Init const * pEntries, sal_Int32 nEntries, Reference< XComponentContext > const & xDelegate ); - virtual ~ComponentContext() - SAL_THROW(()); + virtual ~ComponentContext(); // XComponentContext virtual Any SAL_CALL getValueByName( OUString const & rName ) @@ -511,7 +504,6 @@ sal_Bool ComponentContext::hasElements() throw (RuntimeException, std::exception Any ComponentContext::lookupMap( OUString const & rName ) - SAL_THROW( (RuntimeException) ) { #ifdef CONTEXT_DIAG if ( rName == "dump_maps" ) @@ -663,7 +655,6 @@ Reference< lang::XMultiComponentFactory > ComponentContext::getServiceManager() } ComponentContext::~ComponentContext() - SAL_THROW(()) { #ifdef CONTEXT_DIAG ::fprintf( stderr, "> destructed context %p\n", this ); @@ -846,7 +837,6 @@ extern "C" { static void s_createComponentContext_v(va_list * pParam) Reference< XComponentContext > SAL_CALL createComponentContext( ContextEntry_Init const * pEntries, sal_Int32 nEntries, Reference< XComponentContext > const & xDelegate ) - SAL_THROW(()) { uno::Environment curr_env(Environment::getCurrent()); uno::Environment source_env(CPPU_CURRENT_LANGUAGE_BINDING_NAME); diff --git a/cppuhelper/source/defaultbootstrap.cxx b/cppuhelper/source/defaultbootstrap.cxx index 882862b0d992..8e877542e918 100644 --- a/cppuhelper/source/defaultbootstrap.cxx +++ b/cppuhelper/source/defaultbootstrap.cxx @@ -46,7 +46,6 @@ rtl::OUString getBootstrapVariable( css::uno::Reference< css::uno::XComponentContext > cppu::defaultBootstrap_InitialComponentContext(rtl::OUString const & iniUri) - SAL_THROW((css::uno::Exception)) { rtl::Bootstrap bs(iniUri); if (bs.getHandle() == 0) { @@ -103,7 +102,6 @@ cppu::defaultBootstrap_InitialComponentContext(rtl::OUString const & iniUri) css::uno::Reference< css::uno::XComponentContext > cppu::defaultBootstrap_InitialComponentContext() - SAL_THROW((css::uno::Exception)) { return defaultBootstrap_InitialComponentContext(getUnoIniUri()); } diff --git a/cppuhelper/source/exc_thrower.cxx b/cppuhelper/source/exc_thrower.cxx index b4b21f8059b5..0b54a7895827 100644 --- a/cppuhelper/source/exc_thrower.cxx +++ b/cppuhelper/source/exc_thrower.cxx @@ -183,7 +183,7 @@ namespace cppu { -void SAL_CALL throwException( Any const & exc ) SAL_THROW( (Exception) ) +void SAL_CALL throwException( Any const & exc ) { if (exc.getValueTypeClass() != TypeClass_EXCEPTION) { diff --git a/cppuhelper/source/factory.cxx b/cppuhelper/source/factory.cxx index 4c76251864af..ef80fb866a3b 100644 --- a/cppuhelper/source/factory.cxx +++ b/cppuhelper/source/factory.cxx @@ -70,7 +70,6 @@ public: ComponentInstantiation pCreateFunction_, ComponentFactoryFunc fptr, const Sequence< OUString > * pServiceNames_ ) - SAL_THROW(()) : xSMgr( rServiceManager ) , pCreateFunction( pCreateFunction_ ) , m_fptr( fptr ) @@ -265,7 +264,6 @@ public: ComponentFactoryFunc fptr, const Sequence< OUString > * pServiceNames_, bool bOneInstance_ = false ) - SAL_THROW(()) : OComponentHelper( aMutex ) , OSingleFactoryHelper( rServiceManager, rImplementationName_, pCreateFunction_, fptr, pServiceNames_ ) , bOneInstance( bOneInstance_ ) @@ -477,7 +475,7 @@ public: const Reference<XMultiServiceFactory > & rServiceManager, const OUString & rImplementationName_, const Reference<XRegistryKey > & xImplementationKey_, - bool bOneInstance_ = false ) SAL_THROW(()) + bool bOneInstance_ = false ) : OFactoryComponentHelper( rServiceManager, rImplementationName_, 0, 0, 0, bOneInstance_ ), OPropertySetHelper( OComponentHelper::rBHelper ), @@ -883,7 +881,6 @@ class OFactoryProxyHelper : public WeakImplHelper3< XServiceInfo, XSingleService public: OFactoryProxyHelper( const Reference<XSingleServiceFactory > & rFactory ) - SAL_THROW(()) : xFactory( rFactory ) {} @@ -966,7 +963,6 @@ Reference<XSingleServiceFactory > SAL_CALL createSingleFactory( ComponentInstantiation pCreateFunction, const Sequence< OUString > & rServiceNames, rtl_ModuleCount * ) - SAL_THROW(()) { return new OFactoryComponentHelper( rServiceManager, rImplementationName, pCreateFunction, 0, &rServiceNames, false ); @@ -976,7 +972,6 @@ Reference<XSingleServiceFactory > SAL_CALL createSingleFactory( Reference<XSingleServiceFactory > SAL_CALL createFactoryProxy( SAL_UNUSED_PARAMETER const Reference<XMultiServiceFactory > &, const Reference<XSingleServiceFactory > & rFactory ) - SAL_THROW(()) { return new OFactoryProxyHelper( rFactory ); } @@ -988,7 +983,6 @@ Reference<XSingleServiceFactory > SAL_CALL createOneInstanceFactory( ComponentInstantiation pCreateFunction, const Sequence< OUString > & rServiceNames, rtl_ModuleCount * ) - SAL_THROW(()) { return new OFactoryComponentHelper( rServiceManager, rImplementationName, pCreateFunction, 0, &rServiceNames, true ); @@ -999,7 +993,6 @@ Reference<XSingleServiceFactory > SAL_CALL createSingleRegistryFactory( const Reference<XMultiServiceFactory > & rServiceManager, const OUString & rImplementationName, const Reference<XRegistryKey > & rImplementationKey ) - SAL_THROW(()) { return new ORegistryFactoryHelper( rServiceManager, rImplementationName, rImplementationKey, false ); @@ -1010,7 +1003,6 @@ Reference<XSingleServiceFactory > SAL_CALL createOneInstanceRegistryFactory( const Reference<XMultiServiceFactory > & rServiceManager, const OUString & rImplementationName, const Reference<XRegistryKey > & rImplementationKey ) - SAL_THROW(()) { return new ORegistryFactoryHelper( rServiceManager, rImplementationName, rImplementationKey, true ); @@ -1022,7 +1014,6 @@ Reference< lang::XSingleComponentFactory > SAL_CALL createSingleComponentFactory OUString const & rImplementationName, Sequence< OUString > const & rServiceNames, rtl_ModuleCount *) - SAL_THROW(()) { return new OFactoryComponentHelper( Reference< XMultiServiceFactory >(), rImplementationName, 0, fptr, &rServiceNames, false ); @@ -1033,7 +1024,6 @@ Reference< lang::XSingleComponentFactory > SAL_CALL createOneInstanceComponentFa OUString const & rImplementationName, Sequence< OUString > const & rServiceNames, rtl_ModuleCount *) - SAL_THROW(()) { return new OFactoryComponentHelper( Reference< XMultiServiceFactory >(), rImplementationName, 0, fptr, &rServiceNames, true ); diff --git a/cppuhelper/source/implbase.cxx b/cppuhelper/source/implbase.cxx index 97d240aa5d78..adfab032a2a5 100644 --- a/cppuhelper/source/implbase.cxx +++ b/cppuhelper/source/implbase.cxx @@ -41,14 +41,14 @@ namespace namespace cppu { -Mutex & SAL_CALL getImplHelperInitMutex(void) SAL_THROW(()) +Mutex & SAL_CALL getImplHelperInitMutex(void) { return theImplHelperInitMutex::get(); } // ClassDataBase -ClassDataBase::ClassDataBase() SAL_THROW(()) +ClassDataBase::ClassDataBase() : bOffsetsInit( sal_False ) , nType2Offset( 0 ) , nClassCode( 0 ) @@ -57,7 +57,7 @@ ClassDataBase::ClassDataBase() SAL_THROW(()) { } -ClassDataBase::ClassDataBase( sal_Int32 nClassCode_ ) SAL_THROW(()) +ClassDataBase::ClassDataBase( sal_Int32 nClassCode_ ) : bOffsetsInit( sal_False ) , nType2Offset( 0 ) , nClassCode( nClassCode_ ) @@ -66,7 +66,7 @@ ClassDataBase::ClassDataBase( sal_Int32 nClassCode_ ) SAL_THROW(()) { } -ClassDataBase::~ClassDataBase() SAL_THROW(()) +ClassDataBase::~ClassDataBase() { delete pTypes; delete pId; @@ -80,7 +80,7 @@ ClassDataBase::~ClassDataBase() SAL_THROW(()) // ClassData -void ClassData::writeTypeOffset( const Type & rType, sal_Int32 nOffset ) SAL_THROW(()) +void ClassData::writeTypeOffset( const Type & rType, sal_Int32 nOffset ) { arType2Offset[nType2Offset].nOffset = nOffset; @@ -100,7 +100,7 @@ void ClassData::writeTypeOffset( const Type & rType, sal_Int32 nOffset ) SAL_THR #endif } -void ClassData::initTypeProvider() SAL_THROW(()) +void ClassData::initTypeProvider() { ::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() ); if (! pTypes) @@ -137,14 +137,14 @@ void ClassData::initTypeProvider() SAL_THROW(()) } } -Sequence< Type > ClassData::getTypes() SAL_THROW(()) +Sequence< Type > ClassData::getTypes() { if (! pTypes) initTypeProvider(); return *pTypes; } -Sequence< sal_Int8 > ClassData::getImplementationId() SAL_THROW(()) +Sequence< sal_Int8 > ClassData::getImplementationId() { return css::uno::Sequence<sal_Int8>(); } @@ -152,14 +152,13 @@ Sequence< sal_Int8 > ClassData::getImplementationId() SAL_THROW(()) static inline bool td_equals( typelib_TypeDescription * pTD, typelib_TypeDescriptionReference * pType ) - SAL_THROW(()) { return (pTD->pWeakRef == pType || (pTD->pTypeName->length == pType->pTypeName->length && rtl_ustr_compare( pTD->pTypeName->buffer, pType->pTypeName->buffer ) == 0)); } -Any ClassData::query( const Type & rType, lang::XTypeProvider * pBase ) SAL_THROW(()) +Any ClassData::query( const Type & rType, lang::XTypeProvider * pBase ) { if (rType == ::getCppuType( (const Reference< XInterface > *)0 )) return Any( &pBase, ::getCppuType( (const Reference< XInterface > *)0 ) ); @@ -191,13 +190,11 @@ Any ClassData::query( const Type & rType, lang::XTypeProvider * pBase ) SAL_THRO // WeakComponentImplHelperBase WeakComponentImplHelperBase::WeakComponentImplHelperBase( Mutex & rMutex ) - SAL_THROW(()) : rBHelper( rMutex ) { } WeakComponentImplHelperBase::~WeakComponentImplHelperBase() - SAL_THROW(()) { } @@ -316,13 +313,11 @@ void WeakComponentImplHelperBase::removeEventListener( // WeakAggComponentImplHelperBase WeakAggComponentImplHelperBase::WeakAggComponentImplHelperBase( Mutex & rMutex ) - SAL_THROW(()) : rBHelper( rMutex ) { } WeakAggComponentImplHelperBase::~WeakAggComponentImplHelperBase() - SAL_THROW(()) { } diff --git a/cppuhelper/source/implbase_ex.cxx b/cppuhelper/source/implbase_ex.cxx index 57359a37a7d7..0841603c6163 100644 --- a/cppuhelper/source/implbase_ex.cxx +++ b/cppuhelper/source/implbase_ex.cxx @@ -43,11 +43,10 @@ namespace cppu /** Shared mutex for implementation helper initialization. Not for public use. */ -::osl::Mutex & SAL_CALL getImplHelperInitMutex(void) SAL_THROW(()); +::osl::Mutex & SAL_CALL getImplHelperInitMutex(void); static inline void checkInterface( Type const & rType ) - SAL_THROW( (RuntimeException) ) { if (TypeClass_INTERFACE != rType.getTypeClass()) { @@ -57,12 +56,12 @@ static inline void checkInterface( Type const & rType ) } } -static inline bool isXInterface( rtl_uString * pStr ) SAL_THROW(()) +static inline bool isXInterface( rtl_uString * pStr ) { return (*((OUString const *)&pStr) == "com.sun.star.uno.XInterface"); } -static inline void * makeInterface( sal_IntPtr nOffset, void * that ) SAL_THROW(()) +static inline void * makeInterface( sal_IntPtr nOffset, void * that ) { return (((char *)that) + nOffset); } @@ -70,14 +69,12 @@ static inline void * makeInterface( sal_IntPtr nOffset, void * that ) SAL_THROW( static inline bool __td_equals( typelib_TypeDescriptionReference const * pTDR1, typelib_TypeDescriptionReference const * pTDR2 ) - SAL_THROW(()) { return ((pTDR1 == pTDR2) || ((OUString const *)&pTDR1->pTypeName)->equals( *(OUString const *)&pTDR2->pTypeName )); } static inline type_entry * __getTypeEntries( class_data * cd ) - SAL_THROW( (RuntimeException) ) { type_entry * pEntries = cd->m_typeEntries; if (! cd->m_storedTypeRefs) // not inited? @@ -108,7 +105,6 @@ static inline type_entry * __getTypeEntries( class_data * cd ) } static inline void __fillTypes( Type * types, class_data * cd ) - SAL_THROW( (RuntimeException) ) { type_entry * pEntries = __getTypeEntries( cd ); for ( sal_Int32 n = cd->m_nTypes; n--; ) @@ -161,7 +157,6 @@ bool recursivelyFindType( static inline void * __queryDeepNoXInterface( typelib_TypeDescriptionReference * pDemandedTDR, class_data * cd, void * that ) - SAL_THROW( (RuntimeException) ) { type_entry * pEntries = __getTypeEntries( cd ); sal_Int32 nTypes = cd->m_nTypes; @@ -212,7 +207,6 @@ static inline void * __queryDeepNoXInterface( Any SAL_CALL ImplHelper_query( Type const & rType, class_data * cd, void * that ) - SAL_THROW( (RuntimeException) ) { checkInterface( rType ); typelib_TypeDescriptionReference * pTDR = rType.getTypeLibType(); @@ -237,7 +231,6 @@ Any SAL_CALL ImplHelper_query( Any SAL_CALL ImplHelper_queryNoXInterface( Type const & rType, class_data * cd, void * that ) - SAL_THROW( (RuntimeException) ) { checkInterface( rType ); typelib_TypeDescriptionReference * pTDR = rType.getTypeLibType(); @@ -254,14 +247,13 @@ Any SAL_CALL ImplHelper_queryNoXInterface( } css::uno::Sequence<sal_Int8> ImplHelper_getImplementationId( - SAL_UNUSED_PARAMETER class_data *) SAL_THROW((css::uno::RuntimeException)) + SAL_UNUSED_PARAMETER class_data *) { return css::uno::Sequence<sal_Int8>(); } Sequence< Type > SAL_CALL ImplHelper_getTypes( class_data * cd ) - SAL_THROW( (RuntimeException) ) { Sequence< Type > types( cd->m_nTypes ); Type * pTypes = types.getArray(); @@ -271,7 +263,6 @@ Sequence< Type > SAL_CALL ImplHelper_getTypes( Sequence< Type > SAL_CALL ImplInhHelper_getTypes( class_data * cd, Sequence< Type > const & rAddTypes ) - SAL_THROW( (RuntimeException) ) { sal_Int32 nImplTypes = cd->m_nTypes; sal_Int32 nAddTypes = rAddTypes.getLength(); @@ -291,7 +282,6 @@ Sequence< Type > SAL_CALL ImplInhHelper_getTypes( Any SAL_CALL WeakImplHelper_query( Type const & rType, class_data * cd, void * that, OWeakObject * pBase ) - SAL_THROW( (RuntimeException) ) { checkInterface( rType ); typelib_TypeDescriptionReference * pTDR = rType.getTypeLibType(); @@ -310,7 +300,6 @@ Any SAL_CALL WeakImplHelper_query( Sequence< Type > SAL_CALL WeakImplHelper_getTypes( class_data * cd ) - SAL_THROW( (RuntimeException) ) { sal_Int32 nTypes = cd->m_nTypes; Sequence< Type > types( nTypes +1 ); @@ -324,7 +313,6 @@ Sequence< Type > SAL_CALL WeakImplHelper_getTypes( Any SAL_CALL WeakAggImplHelper_queryAgg( Type const & rType, class_data * cd, void * that, OWeakAggObject * pBase ) - SAL_THROW( (RuntimeException) ) { checkInterface( rType ); typelib_TypeDescriptionReference * pTDR = rType.getTypeLibType(); @@ -343,7 +331,6 @@ Any SAL_CALL WeakAggImplHelper_queryAgg( Sequence< Type > SAL_CALL WeakAggImplHelper_getTypes( class_data * cd ) - SAL_THROW( (RuntimeException) ) { sal_Int32 nTypes = cd->m_nTypes; Sequence< Type > types( nTypes +2 ); @@ -358,7 +345,6 @@ Sequence< Type > SAL_CALL WeakAggImplHelper_getTypes( Any SAL_CALL WeakComponentImplHelper_query( Type const & rType, class_data * cd, void * that, WeakComponentImplHelperBase * pBase ) - SAL_THROW( (RuntimeException) ) { checkInterface( rType ); typelib_TypeDescriptionReference * pTDR = rType.getTypeLibType(); @@ -377,7 +363,6 @@ Any SAL_CALL WeakComponentImplHelper_query( Sequence< Type > SAL_CALL WeakComponentImplHelper_getTypes( class_data * cd ) - SAL_THROW( (RuntimeException) ) { sal_Int32 nTypes = cd->m_nTypes; Sequence< Type > types( nTypes +2 ); @@ -392,7 +377,6 @@ Sequence< Type > SAL_CALL WeakComponentImplHelper_getTypes( Any SAL_CALL WeakAggComponentImplHelper_queryAgg( Type const & rType, class_data * cd, void * that, WeakAggComponentImplHelperBase * pBase ) - SAL_THROW( (RuntimeException) ) { checkInterface( rType ); typelib_TypeDescriptionReference * pTDR = rType.getTypeLibType(); @@ -411,7 +395,6 @@ Any SAL_CALL WeakAggComponentImplHelper_queryAgg( Sequence< Type > SAL_CALL WeakAggComponentImplHelper_getTypes( class_data * cd ) - SAL_THROW( (RuntimeException) ) { sal_Int32 nTypes = cd->m_nTypes; Sequence< Type > types( nTypes +3 ); diff --git a/cppuhelper/source/interfacecontainer.cxx b/cppuhelper/source/interfacecontainer.cxx index fb59703ca42d..22f090b08d23 100644 --- a/cppuhelper/source/interfacecontainer.cxx +++ b/cppuhelper/source/interfacecontainer.cxx @@ -40,7 +40,6 @@ namespace cppu * Reallocate the sequence. */ static void realloc( Sequence< Reference< XInterface > > & rSeq, sal_Int32 nNewLen ) - SAL_THROW(()) { rSeq.realloc( nNewLen ); } @@ -49,7 +48,6 @@ static void realloc( Sequence< Reference< XInterface > > & rSeq, sal_Int32 nNewL * Remove an element from an interface sequence. */ static void sequenceRemoveElementAt( Sequence< Reference< XInterface > > & rSeq, sal_Int32 index ) - SAL_THROW(()) { sal_Int32 nNewLen = rSeq.getLength() - 1; @@ -70,7 +68,6 @@ static void sequenceRemoveElementAt( Sequence< Reference< XInterface > > & rSeq, #endif OInterfaceIteratorHelper::OInterfaceIteratorHelper( OInterfaceContainerHelper & rCont_ ) - SAL_THROW(()) : rCont( rCont_ ) { MutexGuard aGuard( rCont.rMutex ); @@ -93,7 +90,7 @@ OInterfaceIteratorHelper::OInterfaceIteratorHelper( OInterfaceContainerHelper & nRemain = 0; } -OInterfaceIteratorHelper::~OInterfaceIteratorHelper() SAL_THROW(()) +OInterfaceIteratorHelper::~OInterfaceIteratorHelper() { bool bShared; { @@ -118,7 +115,7 @@ OInterfaceIteratorHelper::~OInterfaceIteratorHelper() SAL_THROW(()) } } -XInterface * OInterfaceIteratorHelper::next() SAL_THROW(()) +XInterface * OInterfaceIteratorHelper::next() { if( nRemain ) { @@ -133,7 +130,7 @@ XInterface * OInterfaceIteratorHelper::next() SAL_THROW(()) return 0; } -void OInterfaceIteratorHelper::remove() SAL_THROW(()) +void OInterfaceIteratorHelper::remove() { if( bIsList ) { @@ -149,14 +146,14 @@ void OInterfaceIteratorHelper::remove() SAL_THROW(()) } } -OInterfaceContainerHelper::OInterfaceContainerHelper( Mutex & rMutex_ ) SAL_THROW(()) +OInterfaceContainerHelper::OInterfaceContainerHelper( Mutex & rMutex_ ) : rMutex( rMutex_ ) , bInUse( sal_False ) , bIsList( sal_False ) { } -OInterfaceContainerHelper::~OInterfaceContainerHelper() SAL_THROW(()) +OInterfaceContainerHelper::~OInterfaceContainerHelper() { OSL_ENSURE( !bInUse, "~OInterfaceContainerHelper but is in use" ); if( bIsList ) @@ -165,7 +162,7 @@ OInterfaceContainerHelper::~OInterfaceContainerHelper() SAL_THROW(()) aData.pAsInterface->release(); } -sal_Int32 OInterfaceContainerHelper::getLength() const SAL_THROW(()) +sal_Int32 OInterfaceContainerHelper::getLength() const { MutexGuard aGuard( rMutex ); if( bIsList ) @@ -175,7 +172,7 @@ sal_Int32 OInterfaceContainerHelper::getLength() const SAL_THROW(()) return 0; } -Sequence< Reference<XInterface> > OInterfaceContainerHelper::getElements() const SAL_THROW(()) +Sequence< Reference<XInterface> > OInterfaceContainerHelper::getElements() const { MutexGuard aGuard( rMutex ); if( bIsList ) @@ -188,7 +185,7 @@ Sequence< Reference<XInterface> > OInterfaceContainerHelper::getElements() const return Sequence< Reference< XInterface > >(); } -void OInterfaceContainerHelper::copyAndResetInUse() SAL_THROW(()) +void OInterfaceContainerHelper::copyAndResetInUse() { OSL_ENSURE( bInUse, "OInterfaceContainerHelper not in use" ); if( bInUse ) @@ -204,7 +201,7 @@ void OInterfaceContainerHelper::copyAndResetInUse() SAL_THROW(()) } } -sal_Int32 OInterfaceContainerHelper::addInterface( const Reference<XInterface> & rListener ) SAL_THROW(()) +sal_Int32 OInterfaceContainerHelper::addInterface( const Reference<XInterface> & rListener ) { OSL_ASSERT( rListener.is() ); MutexGuard aGuard( rMutex ); @@ -238,7 +235,7 @@ sal_Int32 OInterfaceContainerHelper::addInterface( const Reference<XInterface> & } } -sal_Int32 OInterfaceContainerHelper::removeInterface( const Reference<XInterface> & rListener ) SAL_THROW(()) +sal_Int32 OInterfaceContainerHelper::removeInterface( const Reference<XInterface> & rListener ) { OSL_ASSERT( rListener.is() ); MutexGuard aGuard( rMutex ); @@ -294,7 +291,7 @@ sal_Int32 OInterfaceContainerHelper::removeInterface( const Reference<XInterface return aData.pAsInterface ? 1 : 0; } -void OInterfaceContainerHelper::disposeAndClear( const EventObject & rEvt ) SAL_THROW(()) +void OInterfaceContainerHelper::disposeAndClear( const EventObject & rEvt ) { ClearableMutexGuard aGuard( rMutex ); OInterfaceIteratorHelper aIt( *this ); @@ -324,7 +321,7 @@ void OInterfaceContainerHelper::disposeAndClear( const EventObject & rEvt ) SAL_ } -void OInterfaceContainerHelper::clear() SAL_THROW(()) +void OInterfaceContainerHelper::clear() { ClearableMutexGuard aGuard( rMutex ); OInterfaceIteratorHelper aIt( *this ); @@ -345,13 +342,12 @@ void OInterfaceContainerHelper::clear() SAL_THROW(()) typedef ::std::vector< std::pair < Type , void* > > t_type2ptr; OMultiTypeInterfaceContainerHelper::OMultiTypeInterfaceContainerHelper( Mutex & rMutex_ ) - SAL_THROW(()) : rMutex( rMutex_ ) { m_pMap = new t_type2ptr(); } + OMultiTypeInterfaceContainerHelper::~OMultiTypeInterfaceContainerHelper() - SAL_THROW(()) { t_type2ptr * pMap = (t_type2ptr *)m_pMap; t_type2ptr::iterator iter = pMap->begin(); @@ -365,8 +361,8 @@ OMultiTypeInterfaceContainerHelper::~OMultiTypeInterfaceContainerHelper() } delete pMap; } + Sequence< Type > OMultiTypeInterfaceContainerHelper::getContainedTypes() const - SAL_THROW(()) { t_type2ptr * pMap = (t_type2ptr *)m_pMap; t_type2ptr::size_type nSize; @@ -414,7 +410,6 @@ static t_type2ptr::iterator findType(t_type2ptr *pMap, const Type & rKey ) } OInterfaceContainerHelper * OMultiTypeInterfaceContainerHelper::getContainer( const Type & rKey ) const - SAL_THROW(()) { ::osl::MutexGuard aGuard( rMutex ); @@ -424,9 +419,9 @@ OInterfaceContainerHelper * OMultiTypeInterfaceContainerHelper::getContainer( co return (OInterfaceContainerHelper*) (*iter).second; return 0; } + sal_Int32 OMultiTypeInterfaceContainerHelper::addInterface( const Type & rKey, const Reference< XInterface > & rListener ) - SAL_THROW(()) { ::osl::MutexGuard aGuard( rMutex ); t_type2ptr * pMap = (t_type2ptr *)m_pMap; @@ -440,9 +435,9 @@ sal_Int32 OMultiTypeInterfaceContainerHelper::addInterface( else return ((OInterfaceContainerHelper*)(*iter).second)->addInterface( rListener ); } + sal_Int32 OMultiTypeInterfaceContainerHelper::removeInterface( const Type & rKey, const Reference< XInterface > & rListener ) - SAL_THROW(()) { ::osl::MutexGuard aGuard( rMutex ); @@ -456,8 +451,8 @@ sal_Int32 OMultiTypeInterfaceContainerHelper::removeInterface( // no container with this id. Always return 0 return 0; } + void OMultiTypeInterfaceContainerHelper::disposeAndClear( const EventObject & rEvt ) - SAL_THROW(()) { t_type2ptr::size_type nSize = 0; OInterfaceContainerHelper ** ppListenerContainers = NULL; @@ -493,8 +488,8 @@ void OMultiTypeInterfaceContainerHelper::disposeAndClear( const EventObject & rE delete [] ppListenerContainers; } + void OMultiTypeInterfaceContainerHelper::clear() - SAL_THROW(()) { ::osl::MutexGuard aGuard( rMutex ); t_type2ptr * pMap = (t_type2ptr *)m_pMap; @@ -527,14 +522,13 @@ static t_long2ptr::iterator findLong(t_long2ptr *pMap, sal_Int32 nKey ) } OMultiTypeInterfaceContainerHelperInt32::OMultiTypeInterfaceContainerHelperInt32( Mutex & rMutex_ ) - SAL_THROW(()) : m_pMap( NULL ) , rMutex( rMutex_ ) { // delay pMap allocation until necessary. } + OMultiTypeInterfaceContainerHelperInt32::~OMultiTypeInterfaceContainerHelperInt32() - SAL_THROW(()) { if (!m_pMap) return; @@ -551,8 +545,8 @@ OMultiTypeInterfaceContainerHelperInt32::~OMultiTypeInterfaceContainerHelperInt3 } delete pMap; } + Sequence< sal_Int32 > OMultiTypeInterfaceContainerHelperInt32::getContainedTypes() const - SAL_THROW(()) { t_long2ptr * pMap = (t_long2ptr *)m_pMap; t_long2ptr::size_type nSize; @@ -584,8 +578,8 @@ Sequence< sal_Int32 > OMultiTypeInterfaceContainerHelperInt32::getContainedTypes } return ::com::sun::star::uno::Sequence< sal_Int32 >(); } + OInterfaceContainerHelper * OMultiTypeInterfaceContainerHelperInt32::getContainer( const sal_Int32 & rKey ) const - SAL_THROW(()) { ::osl::MutexGuard aGuard( rMutex ); @@ -597,9 +591,9 @@ OInterfaceContainerHelper * OMultiTypeInterfaceContainerHelperInt32::getContaine return (OInterfaceContainerHelper*) (*iter).second; return 0; } + sal_Int32 OMultiTypeInterfaceContainerHelperInt32::addInterface( const sal_Int32 & rKey, const Reference< XInterface > & rListener ) - SAL_THROW(()) { ::osl::MutexGuard aGuard( rMutex ); if (!m_pMap) @@ -615,9 +609,9 @@ sal_Int32 OMultiTypeInterfaceContainerHelperInt32::addInterface( else return ((OInterfaceContainerHelper*)(*iter).second)->addInterface( rListener ); } + sal_Int32 OMultiTypeInterfaceContainerHelperInt32::removeInterface( const sal_Int32 & rKey, const Reference< XInterface > & rListener ) - SAL_THROW(()) { ::osl::MutexGuard aGuard( rMutex ); @@ -633,8 +627,8 @@ sal_Int32 OMultiTypeInterfaceContainerHelperInt32::removeInterface( // no container with this id. Always return 0 return 0; } + void OMultiTypeInterfaceContainerHelperInt32::disposeAndClear( const EventObject & rEvt ) - SAL_THROW(()) { t_long2ptr::size_type nSize = 0; OInterfaceContainerHelper ** ppListenerContainers = NULL; @@ -672,8 +666,8 @@ void OMultiTypeInterfaceContainerHelperInt32::disposeAndClear( const EventObject delete [] ppListenerContainers; } + void OMultiTypeInterfaceContainerHelperInt32::clear() - SAL_THROW(()) { ::osl::MutexGuard aGuard( rMutex ); if (!m_pMap) diff --git a/cppuhelper/source/macro_expander.cxx b/cppuhelper/source/macro_expander.cxx index 65bff1004b8b..857e62d02dad 100644 --- a/cppuhelper/source/macro_expander.cxx +++ b/cppuhelper/source/macro_expander.cxx @@ -49,7 +49,7 @@ using rtl::OUString; namespace cppu { -Bootstrap const & get_unorc() SAL_THROW(()) +Bootstrap const & get_unorc() { static rtlBootstrapHandle s_bstrap = 0; if (! s_bstrap) @@ -126,11 +126,10 @@ protected: virtual void SAL_CALL disposing() SAL_OVERRIDE; public: - inline Bootstrap_MacroExpander() SAL_THROW(()) + inline Bootstrap_MacroExpander() : t_uno_impl( m_mutex ) {} - virtual ~Bootstrap_MacroExpander() - SAL_THROW(()); + virtual ~Bootstrap_MacroExpander(); // XMacroExpander impl virtual OUString SAL_CALL expandMacros( OUString const & exp ) @@ -148,7 +147,7 @@ public: void Bootstrap_MacroExpander::disposing() {} -Bootstrap_MacroExpander::~Bootstrap_MacroExpander() SAL_THROW(()) +Bootstrap_MacroExpander::~Bootstrap_MacroExpander() {} // XServiceInfo impl @@ -182,7 +181,6 @@ OUString Bootstrap_MacroExpander::expandMacros( OUString const & exp ) Reference< XInterface > SAL_CALL service_create( SAL_UNUSED_PARAMETER Reference< XComponentContext > const & ) - SAL_THROW( (RuntimeException) ) { return static_cast< ::cppu::OWeakObject * >( new Bootstrap_MacroExpander ); } @@ -191,7 +189,7 @@ Reference< XInterface > SAL_CALL service_create( namespace cppuhelper { namespace detail { -Reference< lang::XSingleComponentFactory > create_bootstrap_macro_expander_factory() SAL_THROW(()) +Reference< lang::XSingleComponentFactory > create_bootstrap_macro_expander_factory() { Reference< lang::XSingleComponentFactory > free(::cppu::createSingleComponentFactory( service_create, diff --git a/cppuhelper/source/macro_expander.hxx b/cppuhelper/source/macro_expander.hxx index 83ceddb00066..be56d7524b49 100644 --- a/cppuhelper/source/macro_expander.hxx +++ b/cppuhelper/source/macro_expander.hxx @@ -52,7 +52,7 @@ namespace detail { ::rtl::OUString expandMacros(rtl::OUString const & text); com::sun::star::uno::Reference< com::sun::star::lang::XSingleComponentFactory > -create_bootstrap_macro_expander_factory() SAL_THROW(()); +create_bootstrap_macro_expander_factory(); } diff --git a/cppuhelper/source/propshlp.cxx b/cppuhelper/source/propshlp.cxx index 53f3aebd81b7..903b222224b4 100644 --- a/cppuhelper/source/propshlp.cxx +++ b/cppuhelper/source/propshlp.cxx @@ -41,15 +41,15 @@ IPropertyArrayHelper::~IPropertyArrayHelper() { } -inline const ::com::sun::star::uno::Type & getPropertyTypeIdentifier( ) SAL_THROW(()) +inline const ::com::sun::star::uno::Type & getPropertyTypeIdentifier( ) { return ::getCppuType( (Reference< XPropertyChangeListener > *)0 ); } -inline const ::com::sun::star::uno::Type & getPropertiesTypeIdentifier() SAL_THROW(()) +inline const ::com::sun::star::uno::Type & getPropertiesTypeIdentifier() { return ::getCppuType( (Reference< XPropertiesChangeListener > *)0 ); } -inline const ::com::sun::star::uno::Type & getVetoableTypeIdentifier() SAL_THROW(()) +inline const ::com::sun::star::uno::Type & getVetoableTypeIdentifier() { return ::getCppuType( (Reference< XVetoableChangeListener > *)0 ); } @@ -74,7 +74,7 @@ class OPropertySetHelperInfo_Impl Sequence < Property > aInfos; public: - OPropertySetHelperInfo_Impl( IPropertyArrayHelper & rHelper_ ) SAL_THROW(()); + OPropertySetHelperInfo_Impl( IPropertyArrayHelper & rHelper_ ); // XPropertySetInfo-methods virtual Sequence< Property > SAL_CALL getProperties(void) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; @@ -88,7 +88,6 @@ public: */ OPropertySetHelperInfo_Impl::OPropertySetHelperInfo_Impl( IPropertyArrayHelper & rHelper_ ) - SAL_THROW(()) :aInfos( rHelper_.getProperties() ) { } @@ -97,7 +96,6 @@ OPropertySetHelperInfo_Impl::OPropertySetHelperInfo_Impl( * Return the sequence of properties, which are provided throug the constructor. */ Sequence< Property > OPropertySetHelperInfo_Impl::getProperties(void) throw(::com::sun::star::uno::RuntimeException, std::exception) - { return aInfos; } @@ -159,7 +157,7 @@ public: // class PropertySetHelper OPropertySetHelper::OPropertySetHelper( - OBroadcastHelper & rBHelper_ ) SAL_THROW(()) + OBroadcastHelper & rBHelper_ ) : rBHelper( rBHelper_ ), aBoundLC( rBHelper_.rMutex ), aVetoableLC( rBHelper_.rMutex ), @@ -198,10 +196,10 @@ OPropertySetHelper2::OPropertySetHelper2( /** * You must call disposing before. */ -OPropertySetHelper::~OPropertySetHelper() SAL_THROW(()) +OPropertySetHelper::~OPropertySetHelper() { } -OPropertySetHelper2::~OPropertySetHelper2() SAL_THROW(()) +OPropertySetHelper2::~OPropertySetHelper2() { } @@ -241,7 +239,7 @@ Any OPropertySetHelper2::queryInterface( const ::com::sun::star::uno::Type & rTy } // ComponentHelper -void OPropertySetHelper::disposing() SAL_THROW(()) +void OPropertySetHelper::disposing() { // Create an event with this as sender Reference < XPropertySet > rSource( (static_cast< XPropertySet * >(this)) , UNO_QUERY ); @@ -255,7 +253,7 @@ void OPropertySetHelper::disposing() SAL_THROW(()) } Reference < XPropertySetInfo > OPropertySetHelper::createPropertySetInfo( - IPropertyArrayHelper & rProperties ) SAL_THROW(()) + IPropertyArrayHelper & rProperties ) { return static_cast< XPropertySetInfo * >( new OPropertySetHelperInfo_Impl( rProperties ) ); } @@ -837,7 +835,6 @@ void OPropertySetHelper::setFastPropertyValues( sal_Int32 * pHandles, const Any * pValues, sal_Int32 nHitCount ) - SAL_THROW( (::com::sun::star::uno::Exception) ) { OSL_ENSURE( !rBHelper.bInDispose, "do not getFastPropertyValue in the dispose call" ); OSL_ENSURE( !rBHelper.bDisposed, "object is disposed" ); @@ -1046,7 +1043,7 @@ static int compare_Property_Impl( const void *arg1, const void *arg2 ) } -void OPropertyArrayHelper::init( sal_Bool bSorted ) SAL_THROW(()) +void OPropertyArrayHelper::init( sal_Bool bSorted ) { sal_Int32 i, nElements = aInfos.getLength(); const Property* pProperties = aInfos.getConstArray(); @@ -1077,7 +1074,6 @@ OPropertyArrayHelper::OPropertyArrayHelper( Property * pProps, sal_Int32 nEle, sal_Bool bSorted ) - SAL_THROW(()) : m_pReserved(NULL) , aInfos(pProps, nEle) , bRightOrdered( sal_False ) @@ -1088,7 +1084,6 @@ OPropertyArrayHelper::OPropertyArrayHelper( OPropertyArrayHelper::OPropertyArrayHelper( const Sequence< Property > & aProps, sal_Bool bSorted ) - SAL_THROW(()) : m_pReserved(NULL) , aInfos(aProps) , bRightOrdered( sal_False ) diff --git a/cppuhelper/source/shlib.cxx b/cppuhelper/source/shlib.cxx index 65d0e5654f3e..baa9428f8e00 100644 --- a/cppuhelper/source/shlib.cxx +++ b/cppuhelper/source/shlib.cxx @@ -280,7 +280,6 @@ css::uno::Reference<css::uno::XInterface> cppu::loadSharedLibComponentFactory( rtl::OUString const & rImplName, css::uno::Reference<css::lang::XMultiServiceFactory> const & xMgr, css::uno::Reference<css::registry::XRegistryKey> const & xKey) - SAL_THROW((css::loader::CannotActivateFactoryException)) { assert(rPath.isEmpty()); (void) rPath; assert(!xKey.is()); (void) xKey; @@ -308,7 +307,6 @@ void cppu::writeSharedLibComponentInfo( rtl::OUString const & uri, rtl::OUString const & rPath, css::uno::Reference<css::lang::XMultiServiceFactory> const & xMgr, css::uno::Reference<css::registry::XRegistryKey> const & xKey) - SAL_THROW((css::registry::CannotRegisterImplementationException)) { assert(rPath.isEmpty()); (void) rPath; osl::Module mod(uri, SAL_LOADMODULE_LAZY | SAL_LOADMODULE_GLOBAL); diff --git a/cppuhelper/source/tdmgr.cxx b/cppuhelper/source/tdmgr.cxx index e318ceb3b64a..e25325a2a65a 100644 --- a/cppuhelper/source/tdmgr.cxx +++ b/cppuhelper/source/tdmgr.cxx @@ -620,7 +620,6 @@ class EventListenerImpl public: inline EventListenerImpl( Reference< container::XHierarchicalNameAccess > const & xTDMgr ) - SAL_THROW(()) : m_xTDMgr( xTDMgr ) {} @@ -642,7 +641,6 @@ void EventListenerImpl::disposing( lang::EventObject const & rEvt ) sal_Bool SAL_CALL installTypeDescriptionManager( Reference< container::XHierarchicalNameAccess > const & xTDMgr_c ) - SAL_THROW(()) { uno::Environment curr_env(Environment::getCurrent()); uno::Environment target_env(CPPU_CURRENT_LANGUAGE_BINDING_NAME); diff --git a/cppuhelper/source/typeprovider.cxx b/cppuhelper/source/typeprovider.cxx index 29dd5a233948..b20ec1bd9072 100644 --- a/cppuhelper/source/typeprovider.cxx +++ b/cppuhelper/source/typeprovider.cxx @@ -28,12 +28,12 @@ namespace cppu { -OImplementationId::~OImplementationId() SAL_THROW(()) +OImplementationId::~OImplementationId() { delete _pSeq; } -Sequence< sal_Int8 > OImplementationId::getImplementationId() const SAL_THROW(()) +Sequence< sal_Int8 > OImplementationId::getImplementationId() const { if (! _pSeq) { @@ -50,7 +50,6 @@ Sequence< sal_Int8 > OImplementationId::getImplementationId() const SAL_THROW(() static inline void copy( Sequence< Type > & rDest, const Sequence< Type > & rSource, sal_Int32 nOffset ) - SAL_THROW(()) { Type * pDest = rDest.getArray(); const Type * pSource = rSource.getConstArray(); @@ -63,7 +62,6 @@ static inline void copy( Sequence< Type > & rDest, const Sequence< Type > & rSou OTypeCollection::OTypeCollection( const Type & rType1, const Sequence< Type > & rAddTypes ) - SAL_THROW(()) : _aTypes( 1 + rAddTypes.getLength() ) { _aTypes[0] = rType1; @@ -74,7 +72,6 @@ OTypeCollection::OTypeCollection( const Type & rType1, const Type & rType2, const Sequence< Type > & rAddTypes ) - SAL_THROW(()) : _aTypes( 2 + rAddTypes.getLength() ) { _aTypes[0] = rType1; @@ -87,7 +84,6 @@ OTypeCollection::OTypeCollection( const Type & rType2, const Type & rType3, const Sequence< Type > & rAddTypes ) - SAL_THROW(()) : _aTypes( 3 + rAddTypes.getLength() ) { _aTypes[0] = rType1; @@ -102,7 +98,6 @@ OTypeCollection::OTypeCollection( const Type & rType3, const Type & rType4, const Sequence< Type > & rAddTypes ) - SAL_THROW(()) : _aTypes( 4 + rAddTypes.getLength() ) { _aTypes[0] = rType1; @@ -119,7 +114,6 @@ OTypeCollection::OTypeCollection( const Type & rType4, const Type & rType5, const Sequence< Type > & rAddTypes ) - SAL_THROW(()) : _aTypes( 5 + rAddTypes.getLength() ) { _aTypes[0] = rType1; @@ -138,7 +132,6 @@ OTypeCollection::OTypeCollection( const Type & rType5, const Type & rType6, const Sequence< Type > & rAddTypes ) - SAL_THROW(()) : _aTypes( 6 + rAddTypes.getLength() ) { _aTypes[0] = rType1; @@ -159,7 +152,6 @@ OTypeCollection::OTypeCollection( const Type & rType6, const Type & rType7, const Sequence< Type > & rAddTypes ) - SAL_THROW(()) : _aTypes( 7 + rAddTypes.getLength() ) { _aTypes[0] = rType1; @@ -182,7 +174,6 @@ OTypeCollection::OTypeCollection( const Type & rType7, const Type & rType8, const Sequence< Type > & rAddTypes ) - SAL_THROW(()) : _aTypes( 8 + rAddTypes.getLength() ) { _aTypes[0] = rType1; @@ -207,7 +198,6 @@ OTypeCollection::OTypeCollection( const Type & rType8, const Type & rType9, const Sequence< Type > & rAddTypes ) - SAL_THROW(()) : _aTypes( 9 + rAddTypes.getLength() ) { _aTypes[0] = rType1; @@ -234,7 +224,6 @@ OTypeCollection::OTypeCollection( const Type & rType9, const Type & rType10, const Sequence< Type > & rAddTypes ) - SAL_THROW(()) : _aTypes( 10 + rAddTypes.getLength() ) { _aTypes[0] = rType1; @@ -263,7 +252,6 @@ OTypeCollection::OTypeCollection( const Type & rType10, const Type & rType11, const Sequence< Type > & rAddTypes ) - SAL_THROW(()) : _aTypes( 11 + rAddTypes.getLength() ) { _aTypes[0] = rType1; @@ -294,7 +282,6 @@ OTypeCollection::OTypeCollection( const Type & rType11, const Type & rType12, const Sequence< Type > & rAddTypes ) - SAL_THROW(()) : _aTypes( 12 + rAddTypes.getLength() ) { _aTypes[0] = rType1; diff --git a/cppuhelper/source/weak.cxx b/cppuhelper/source/weak.cxx index 0736d8ed3ae4..65018b7d75ec 100644 --- a/cppuhelper/source/weak.cxx +++ b/cppuhelper/source/weak.cxx @@ -33,7 +33,7 @@ namespace cppu { // due to static Reflection destruction from usr, ther must be a mutex leak (#73272#) -inline static Mutex & getWeakMutex() SAL_THROW(()) +inline static Mutex & getWeakMutex() { static Mutex * s_pMutex = 0; if (! s_pMutex) @@ -50,7 +50,7 @@ public: /** Hold the weak object without an acquire (only the pointer). */ - OWeakConnectionPoint( OWeakObject* pObj ) SAL_THROW(()) + OWeakConnectionPoint( OWeakObject* pObj ) : m_aRefCount( 0 ) , m_pObject(pObj) , m_aReferences( getWeakMutex() ) @@ -172,7 +172,7 @@ void SAL_CALL OWeakConnectionPoint::removeReference(const Reference< XReference #ifdef _MSC_VER // Accidentally occurs in msvc mapfile = > had to be outlined. -OWeakObject::OWeakObject() SAL_THROW(()) +OWeakObject::OWeakObject() : m_refCount( 0 ), m_pWeakConnectionPoint( 0 ) { @@ -224,7 +224,7 @@ void OWeakObject::disposeWeakConnectionPoint() } } -OWeakObject::~OWeakObject() SAL_THROW( (RuntimeException) ) +OWeakObject::~OWeakObject() { } @@ -250,7 +250,7 @@ Reference< XAdapter > SAL_CALL OWeakObject::queryAdapter() //-- OWeakAggObject ---------------------------------------------------- -OWeakAggObject::~OWeakAggObject() SAL_THROW( (RuntimeException) ) +OWeakAggObject::~OWeakAggObject() { } @@ -319,8 +319,8 @@ namespace uno class OWeakRefListener: public XReference, private boost::noncopyable { public: - OWeakRefListener(const Reference< XInterface >& xInt) SAL_THROW(()); - virtual ~OWeakRefListener() SAL_THROW(()); + OWeakRefListener(const Reference< XInterface >& xInt); + virtual ~OWeakRefListener(); // XInterface Any SAL_CALL queryInterface( const Type & rType ) throw(RuntimeException, std::exception) SAL_OVERRIDE; @@ -336,7 +336,7 @@ public: Reference< XAdapter > m_XWeakConnectionPoint; }; -OWeakRefListener::OWeakRefListener(const Reference< XInterface >& xInt) SAL_THROW(()) +OWeakRefListener::OWeakRefListener(const Reference< XInterface >& xInt) : m_aRefCount( 1 ) { try @@ -357,7 +357,7 @@ OWeakRefListener::OWeakRefListener(const Reference< XInterface >& xInt) SAL_THRO osl_atomic_decrement( &m_aRefCount ); } -OWeakRefListener::~OWeakRefListener() SAL_THROW(()) +OWeakRefListener::~OWeakRefListener() { try { @@ -410,7 +410,7 @@ void SAL_CALL OWeakRefListener::dispose() //-- WeakReferenceHelper ---------------------------------------------------------- -WeakReferenceHelper::WeakReferenceHelper(const Reference< XInterface >& xInt) SAL_THROW(()) +WeakReferenceHelper::WeakReferenceHelper(const Reference< XInterface >& xInt) : m_pImpl( 0 ) { if (xInt.is()) @@ -420,7 +420,7 @@ WeakReferenceHelper::WeakReferenceHelper(const Reference< XInterface >& xInt) SA } } -WeakReferenceHelper::WeakReferenceHelper(const WeakReferenceHelper& rWeakRef) SAL_THROW(()) +WeakReferenceHelper::WeakReferenceHelper(const WeakReferenceHelper& rWeakRef) : m_pImpl( 0 ) { Reference< XInterface > xInt( rWeakRef.get() ); @@ -431,7 +431,7 @@ WeakReferenceHelper::WeakReferenceHelper(const WeakReferenceHelper& rWeakRef) SA } } -void WeakReferenceHelper::clear() SAL_THROW(()) +void WeakReferenceHelper::clear() { try { @@ -450,7 +450,7 @@ void WeakReferenceHelper::clear() SAL_THROW(()) catch (RuntimeException &) { OSL_ASSERT( false ); } // assert here, but no unexpected() } -WeakReferenceHelper& WeakReferenceHelper::operator=(const WeakReferenceHelper& rWeakRef) SAL_THROW(()) +WeakReferenceHelper& WeakReferenceHelper::operator=(const WeakReferenceHelper& rWeakRef) { if (this == &rWeakRef) { @@ -462,7 +462,6 @@ WeakReferenceHelper& WeakReferenceHelper::operator=(const WeakReferenceHelper& r WeakReferenceHelper & SAL_CALL WeakReferenceHelper::operator= (const Reference< XInterface > & xInt) -SAL_THROW(()) { try { @@ -477,12 +476,12 @@ SAL_THROW(()) return *this; } -WeakReferenceHelper::~WeakReferenceHelper() SAL_THROW(()) +WeakReferenceHelper::~WeakReferenceHelper() { clear(); } -Reference< XInterface > WeakReferenceHelper::get() const SAL_THROW(()) +Reference< XInterface > WeakReferenceHelper::get() const { try { diff --git a/cppuhelper/test/cfg_test.cxx b/cppuhelper/test/cfg_test.cxx index aaa5bed2661f..7bd62c75dccb 100644 --- a/cppuhelper/test/cfg_test.cxx +++ b/cppuhelper/test/cfg_test.cxx @@ -80,7 +80,7 @@ class ServiceImpl0 Reference< XComponentContext > m_xContext; public: - ServiceImpl0( Reference< XComponentContext > const & xContext ) SAL_THROW(()); + ServiceImpl0( Reference< XComponentContext > const & xContext ); // XInitialization virtual void SAL_CALL initialize( const Sequence< Any >& rArgs ) throw (Exception, RuntimeException); @@ -91,7 +91,7 @@ public: virtual sal_Bool SAL_CALL supportsService( const OUString & rServiceName ) throw (RuntimeException); }; -ServiceImpl0::ServiceImpl0( Reference< XComponentContext > const & xContext ) SAL_THROW(()) +ServiceImpl0::ServiceImpl0( Reference< XComponentContext > const & xContext ) : m_xContext( xContext ) { sal_Int32 n; @@ -151,7 +151,7 @@ sal_Bool ServiceImpl0::supportsService( const OUString & rServiceName ) class ServiceImpl1 : public ServiceImpl0 { public: - inline ServiceImpl1( Reference< XComponentContext > const & xContext ) SAL_THROW(()) + inline ServiceImpl1( Reference< XComponentContext > const & xContext ) : ServiceImpl0( xContext ) {} @@ -175,14 +175,12 @@ Sequence< OUString > ServiceImpl1::getSupportedServiceNames() static Reference< XInterface > SAL_CALL ServiceImpl0_create( Reference< XComponentContext > const & xContext ) - SAL_THROW( (Exception) ) { return (OWeakObject *)new ServiceImpl0( xContext ); } static Reference< XInterface > SAL_CALL ServiceImpl1_create( Reference< XComponentContext > const & xContext ) - SAL_THROW( (Exception) ) { return (OWeakObject *)new ServiceImpl1( xContext ); } diff --git a/cppuhelper/test/testcmp/TestComponent.cxx b/cppuhelper/test/testcmp/TestComponent.cxx index 5ccd4a14050b..64d2b9ff36af 100644 --- a/cppuhelper/test/testcmp/TestComponent.cxx +++ b/cppuhelper/test/testcmp/TestComponent.cxx @@ -63,8 +63,7 @@ class TestComponent: public cppu::WeakImplHelper1<lang::XServiceInfo> public: static uno::Reference<uno::XInterface> create( uno::Reference<uno::XComponentContext> const & xCtx - ) - SAL_THROW((uno::Exception)); + ); static uno::Sequence<rtl::OUString> SAL_CALL getSupportedServiceNames_Static(); @@ -89,9 +88,7 @@ protected: uno::Reference<uno::XInterface> SAL_CALL TestComponent::create( - uno::Reference<uno::XComponentContext> const & xCtx -) - SAL_THROW((uno::Exception)) + uno::Reference<uno::XComponentContext> const & xCtx) { try { diff --git a/include/cppuhelper/access_control.hxx b/include/cppuhelper/access_control.hxx index 77b934937268..55404a9cc47d 100644 --- a/include/cppuhelper/access_control.hxx +++ b/include/cppuhelper/access_control.hxx @@ -40,26 +40,23 @@ public: */ AccessControl( ::com::sun::star::uno::Reference< - ::com::sun::star::uno::XComponentContext > const & xContext ) - SAL_THROW( (::com::sun::star::uno::RuntimeException) ); + ::com::sun::star::uno::XComponentContext > const & xContext ); /** Ctor. @param xController access controller */ AccessControl( ::com::sun::star::uno::Reference< - ::com::sun::star::security::XAccessController > const & xController ) - SAL_THROW( (::com::sun::star::uno::RuntimeException) ); + ::com::sun::star::security::XAccessController > const & xController ); /** Copy ctor. @param ac another object */ - AccessControl( ::cppu::AccessControl const & ac ) - SAL_THROW( (::com::sun::star::uno::RuntimeException) ); + AccessControl( ::cppu::AccessControl const & ac ); /** Clears the access controller reference being used. */ - inline void SAL_CALL clear() SAL_THROW(()) + inline void SAL_CALL clear() { m_xController.clear(); } /** Returns access to the access controller reference being used. @@ -67,14 +64,14 @@ public: @return access controller */ inline ::com::sun::star::uno::Reference< - ::com::sun::star::security::XAccessController > const & SAL_CALL get() const SAL_THROW(()) + ::com::sun::star::security::XAccessController > const & SAL_CALL get() const { return m_xController; } /** Returns access to the access controller reference being used. @return access controller */ - inline ::com::sun::star::security::XAccessController * SAL_CALL operator -> () const SAL_THROW(()) + inline ::com::sun::star::security::XAccessController * SAL_CALL operator -> () const { return m_xController.get(); } @@ -85,8 +82,7 @@ public: @param name name of permission */ void SAL_CALL checkRuntimePermission( - ::rtl::OUString const & name ) - SAL_THROW( (::com::sun::star::uno::RuntimeException) ); + ::rtl::OUString const & name ); /** A com.sun.star.io.FilePermission represents access to a file or directory. A FilePermission consists of a file url and a set of actions valid for that pathname. @@ -96,8 +92,7 @@ public: */ void SAL_CALL checkFilePermission( ::rtl::OUString const & url, - ::rtl::OUString const & actions ) - SAL_THROW( (::com::sun::star::uno::RuntimeException) ); + ::rtl::OUString const & actions ); /** A com.sun.star.connection.SocketPermission represents access to a network via sockets. A SocketPermission consists of a host specification and a set of "actions" @@ -108,8 +103,7 @@ public: */ void SAL_CALL checkSocketPermission( ::rtl::OUString const & host, - ::rtl::OUString const & actions ) - SAL_THROW( (::com::sun::star::uno::RuntimeException) ); + ::rtl::OUString const & actions ); }; } diff --git a/include/cppuhelper/bootstrap.hxx b/include/cppuhelper/bootstrap.hxx index e27f2b5fa4ec..4d942809e251 100644 --- a/include/cppuhelper/bootstrap.hxx +++ b/include/cppuhelper/bootstrap.hxx @@ -40,8 +40,7 @@ namespace cppu @return true, if successfully registered */ CPPUHELPER_DLLPUBLIC sal_Bool SAL_CALL installTypeDescriptionManager( - ::com::sun::star::uno::Reference< ::com::sun::star::container::XHierarchicalNameAccess > const & xTDMgr ) - SAL_THROW(()); + ::com::sun::star::uno::Reference< ::com::sun::star::container::XHierarchicalNameAccess > const & xTDMgr ); /** Bootstraps an initial component context with service manager upon information from bootstrap variables. @@ -57,7 +56,7 @@ CPPUHELPER_DLLPUBLIC sal_Bool SAL_CALL installTypeDescriptionManager( @return component context */ CPPUHELPER_DLLPUBLIC ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > SAL_CALL -defaultBootstrap_InitialComponentContext() SAL_THROW( (::com::sun::star::uno::Exception) ); +defaultBootstrap_InitialComponentContext(); /** Bootstraps an initial component context with service manager upon @@ -75,7 +74,7 @@ defaultBootstrap_InitialComponentContext() SAL_THROW( (::com::sun::star::uno::Ex @return component context */ CPPUHELPER_DLLPUBLIC ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > SAL_CALL -defaultBootstrap_InitialComponentContext(const ::rtl::OUString & iniFile) SAL_THROW( (::com::sun::star::uno::Exception) ); +defaultBootstrap_InitialComponentContext(const ::rtl::OUString & iniFile); /** * An exception indicating a bootstrap error. diff --git a/include/cppuhelper/compbase.hxx b/include/cppuhelper/compbase.hxx index 11e187a3f560..007cabf16561 100644 --- a/include/cppuhelper/compbase.hxx +++ b/include/cppuhelper/compbase.hxx @@ -38,7 +38,7 @@ class SAL_NO_VTABLE SAL_DLLPUBLIC_TEMPLATE WeakComponentImplHelper##N \ { \ static ClassData##N s_aCD; \ public: \ - WeakComponentImplHelper##N( ::osl::Mutex & rMutex ) SAL_THROW(()) \ + WeakComponentImplHelper##N( ::osl::Mutex & rMutex ) \ : WeakComponentImplHelperBase( rMutex ) \ {} \ virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( ::com::sun::star::uno::Type const & rType ) throw (::com::sun::star::uno::RuntimeException) \ @@ -64,7 +64,7 @@ class SAL_NO_VTABLE SAL_DLLPUBLIC_TEMPLATE WeakAggComponentImplHelper##N \ { \ static ClassData##N s_aCD; \ public: \ - WeakAggComponentImplHelper##N( ::osl::Mutex & rMutex ) SAL_THROW(()) \ + WeakAggComponentImplHelper##N( ::osl::Mutex & rMutex ) \ : WeakAggComponentImplHelperBase( rMutex ) \ {} \ virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( ::com::sun::star::uno::Type const & rType ) throw (::com::sun::star::uno::RuntimeException) \ diff --git a/include/cppuhelper/compbase_ex.hxx b/include/cppuhelper/compbase_ex.hxx index 555376eade6a..a5ff85769571 100644 --- a/include/cppuhelper/compbase_ex.hxx +++ b/include/cppuhelper/compbase_ex.hxx @@ -50,20 +50,20 @@ protected: @param rMutex mutex to sync upon disposing */ - WeakComponentImplHelperBase( ::osl::Mutex & rMutex ) SAL_THROW(()); + WeakComponentImplHelperBase( ::osl::Mutex & rMutex ); public: /** Destructor */ - virtual ~WeakComponentImplHelperBase() SAL_THROW(()); + virtual ~WeakComponentImplHelperBase(); // these are here to force memory de/allocation to sal lib. - inline static void * SAL_CALL operator new( size_t nSize ) SAL_THROW(()) + inline static void * SAL_CALL operator new( size_t nSize ) { return ::rtl_allocateMemory( nSize ); } - inline static void SAL_CALL operator delete( void * pMem ) SAL_THROW(()) + inline static void SAL_CALL operator delete( void * pMem ) { ::rtl_freeMemory( pMem ); } - inline static void * SAL_CALL operator new( size_t, void * pMem ) SAL_THROW(()) + inline static void * SAL_CALL operator new( size_t, void * pMem ) { return pMem; } - inline static void SAL_CALL operator delete( void *, void * ) SAL_THROW(()) + inline static void SAL_CALL operator delete( void *, void * ) {} virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( @@ -97,18 +97,18 @@ protected: */ virtual void SAL_CALL disposing(); - WeakAggComponentImplHelperBase( ::osl::Mutex & rMutex ) SAL_THROW(()); + WeakAggComponentImplHelperBase( ::osl::Mutex & rMutex ); public: - virtual ~WeakAggComponentImplHelperBase() SAL_THROW(()); + virtual ~WeakAggComponentImplHelperBase(); // these are here to force memory de/allocation to sal lib. - inline static void * SAL_CALL operator new( size_t nSize ) SAL_THROW(()) + inline static void * SAL_CALL operator new( size_t nSize ) { return ::rtl_allocateMemory( nSize ); } - inline static void SAL_CALL operator delete( void * pMem ) SAL_THROW(()) + inline static void SAL_CALL operator delete( void * pMem ) { ::rtl_freeMemory( pMem ); } - inline static void * SAL_CALL operator new( size_t, void * pMem ) SAL_THROW(()) + inline static void * SAL_CALL operator new( size_t, void * pMem ) { return pMem; } - inline static void SAL_CALL operator delete( void *, void * ) SAL_THROW(()) + inline static void SAL_CALL operator delete( void *, void * ) {} virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( @@ -137,13 +137,11 @@ CPPUHELPER_DLLPUBLIC ::com::sun::star::uno::Any SAL_CALL WeakComponentImplHelper ::com::sun::star::uno::Type const & rType, class_data * cd, void * that, - ::cppu::WeakComponentImplHelperBase * pBase ) - SAL_THROW( (::com::sun::star::uno::RuntimeException) ); + ::cppu::WeakComponentImplHelperBase * pBase ); /** WeakComponentImplHelper */ CPPUHELPER_DLLPUBLIC ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL WeakComponentImplHelper_getTypes( - class_data * cd ) - SAL_THROW( (::com::sun::star::uno::RuntimeException) ); + class_data * cd ); /** WeakAggComponentImplHelper */ @@ -151,13 +149,11 @@ CPPUHELPER_DLLPUBLIC ::com::sun::star::uno::Any SAL_CALL WeakAggComponentImplHel ::com::sun::star::uno::Type const & rType, class_data * cd, void * that, - ::cppu::WeakAggComponentImplHelperBase * pBase ) - SAL_THROW( (::com::sun::star::uno::RuntimeException) ); + ::cppu::WeakAggComponentImplHelperBase * pBase ); /** WeakAggComponentImplHelper */ CPPUHELPER_DLLPUBLIC ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL WeakAggComponentImplHelper_getTypes( - class_data * cd ) - SAL_THROW( (::com::sun::star::uno::RuntimeException) ); + class_data * cd ); } diff --git a/include/cppuhelper/component.hxx b/include/cppuhelper/component.hxx index 2f39ec83a11d..e22bb45b5396 100644 --- a/include/cppuhelper/component.hxx +++ b/include/cppuhelper/component.hxx @@ -54,10 +54,10 @@ public: the mutex used to protect multi-threaded access; lifetime must be longer than the lifetime of this object. */ - OComponentHelper( ::osl::Mutex & rMutex ) SAL_THROW(()); + OComponentHelper( ::osl::Mutex & rMutex ); /** Destructor. If this object was not disposed previously, object will be disposed manually. */ - virtual ~OComponentHelper() SAL_THROW( (::com::sun::star::uno::RuntimeException) ); + virtual ~OComponentHelper(); // XAggregation virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( @@ -102,8 +102,8 @@ protected: /// @endcond private: - inline OComponentHelper( const OComponentHelper & ) SAL_THROW(()); - inline OComponentHelper & operator = ( const OComponentHelper & ) SAL_THROW(()); + inline OComponentHelper( const OComponentHelper & ); + inline OComponentHelper & operator = ( const OComponentHelper & ); }; } diff --git a/include/cppuhelper/component_context.hxx b/include/cppuhelper/component_context.hxx index 6e479d46e923..95c518326e72 100644 --- a/include/cppuhelper/component_context.hxx +++ b/include/cppuhelper/component_context.hxx @@ -47,7 +47,7 @@ struct ContextEntry_Init /** Default ctor. */ - inline ContextEntry_Init() SAL_THROW(()) + inline ContextEntry_Init() : bLateInitService( false ) {} /** Ctor. @@ -63,7 +63,7 @@ struct ContextEntry_Init inline ContextEntry_Init( ::rtl::OUString const & name_, ::com::sun::star::uno::Any const & value_, - bool bLateInitService_ = false ) SAL_THROW(()) + bool bLateInitService_ = false ) : bLateInitService( bLateInitService_ ), name( name_ ), value( value_ ) @@ -81,8 +81,7 @@ CPPUHELPER_DLLPUBLIC ::com::sun::star::uno::Reference< ::com::sun::star::uno::XC SAL_CALL createComponentContext( ContextEntry_Init const * pEntries, sal_Int32 nEntries, ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > const & xDelegate = - ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >() ) - SAL_THROW(()); + ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >() ); } diff --git a/include/cppuhelper/exc_hlp.hxx b/include/cppuhelper/exc_hlp.hxx index 666211822a9b..e6d2e5f4b3f8 100644 --- a/include/cppuhelper/exc_hlp.hxx +++ b/include/cppuhelper/exc_hlp.hxx @@ -33,8 +33,7 @@ namespace cppu @param rExc exception to be thrown. */ -CPPUHELPER_DLLPUBLIC void SAL_CALL throwException( const ::com::sun::star::uno::Any & rExc ) - SAL_THROW( (::com::sun::star::uno::Exception) ); +CPPUHELPER_DLLPUBLIC void SAL_CALL throwException( const ::com::sun::star::uno::Any & rExc ); /** Use this function to get the dynamic type of a caught C++-UNO exception; completes the above function throwing exceptions generically. diff --git a/include/cppuhelper/factory.hxx b/include/cppuhelper/factory.hxx index bde35a7cfcc2..b507674a8ff5 100644 --- a/include/cppuhelper/factory.hxx +++ b/include/cppuhelper/factory.hxx @@ -125,8 +125,7 @@ namespace cppu */ typedef ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >( SAL_CALL * ComponentFactoryFunc)( - ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > const & xContext ) - SAL_THROW( (::com::sun::star::uno::Exception) ); + ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > const & xContext ); /** Creates a single component factory supporting the XSingleComponentFactory interface. @@ -141,8 +140,7 @@ SAL_CALL createSingleComponentFactory( ComponentFactoryFunc fptr, ::rtl::OUString const & rImplementationName, ::com::sun::star::uno::Sequence< ::rtl::OUString > const & rServiceNames, - rtl_ModuleCount * pModCount = 0 ) - SAL_THROW(()); + rtl_ModuleCount * pModCount = 0 ); /** Creates a single service factory which holds the instance created only once. @@ -159,8 +157,7 @@ createOneInstanceComponentFactory( ComponentFactoryFunc fptr, ::rtl::OUString const & rImplementationName, ::com::sun::star::uno::Sequence< ::rtl::OUString > const & rServiceNames, - rtl_ModuleCount * pModCount = 0 ) - SAL_THROW(()); + rtl_ModuleCount * pModCount = 0 ); /** Deprecated. The type of the instanciate function used as argument of the create*Fcatory functions. @@ -191,8 +188,7 @@ createSingleFactory( const ::rtl::OUString & rImplementationName, ComponentInstantiation pCreateFunction, const ::com::sun::star::uno::Sequence< ::rtl::OUString > & rServiceNames, - rtl_ModuleCount * pModCount = 0 ) - SAL_THROW(()); + rtl_ModuleCount * pModCount = 0 ); /** Deprecated. Creates a factory wrapping another one. This means the methods of the interfaces XServiceProvider, XServiceInfo and @@ -211,8 +207,7 @@ createSingleFactory( CPPUHELPER_DLLPUBLIC ::com::sun::star::uno::Reference< ::com::sun::star::lang::XSingleServiceFactory > SAL_CALL createFactoryProxy( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > & rServiceManager, - const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XSingleServiceFactory > & rFactory ) - SAL_THROW(()); + const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XSingleServiceFactory > & rFactory ); /** Deprecated. Creates a single service factory which holds the instance created only once. @@ -234,8 +229,7 @@ createOneInstanceFactory( const ::rtl::OUString & rComponentName, ComponentInstantiation pCreateFunction, const ::com::sun::star::uno::Sequence< ::rtl::OUString > & rServiceNames, - rtl_ModuleCount * pModCount = 0 ) - SAL_THROW(()); + rtl_ModuleCount * pModCount = 0 ); /** Deprecated. Creates a single service factory based on a registry. @@ -250,8 +244,7 @@ CPPUHELPER_DLLPUBLIC ::com::sun::star::uno::Reference< ::com::sun::star::lang::X createSingleRegistryFactory( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > & rServiceManager, const ::rtl::OUString & rImplementationName, - const ::com::sun::star::uno::Reference< ::com::sun::star::registry::XRegistryKey > & rImplementationKey ) - SAL_THROW(()); + const ::com::sun::star::uno::Reference< ::com::sun::star::registry::XRegistryKey > & rImplementationKey ); /** Deprecated. Creates a single service factory which holds the instance created only once based on a registry. @@ -269,8 +262,7 @@ CPPUHELPER_DLLPUBLIC ::com::sun::star::uno::Reference< ::com::sun::star::lang::X createOneInstanceRegistryFactory( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > & rServiceManager, const ::rtl::OUString & rComponentName, - const ::com::sun::star::uno::Reference< ::com::sun::star::registry::XRegistryKey > & rImplementationKey ) - SAL_THROW(()); + const ::com::sun::star::uno::Reference< ::com::sun::star::registry::XRegistryKey > & rImplementationKey ); } diff --git a/include/cppuhelper/implbase.hxx b/include/cppuhelper/implbase.hxx index 315b67fdf4f3..c8a5e4e6b96b 100644 --- a/include/cppuhelper/implbase.hxx +++ b/include/cppuhelper/implbase.hxx @@ -81,15 +81,15 @@ struct CPPUHELPER_DLLPUBLIC ClassDataBase /** def ctor */ - ClassDataBase() SAL_THROW(()); + ClassDataBase(); /** class code ctor @param nClassCode class code, see ClassDataBase::nClassCode */ - ClassDataBase( sal_Int32 nClassCode ) SAL_THROW(()); + ClassDataBase( sal_Int32 nClassCode ); /** dtor */ - ~ClassDataBase() SAL_THROW(()); + ~ClassDataBase(); }; /** Struct used for inline template implementation helpers: There will be versions of this struct with varying arType2Offset[] array sizes, each of which @@ -105,14 +105,13 @@ struct CPPUHELPER_DLLPUBLIC ClassData : public ClassDataBase /** init call for supporting com.sun.star.lang.XTypeProvider */ - void SAL_CALL initTypeProvider() SAL_THROW(()); + void SAL_CALL initTypeProvider(); /** initial writing type offsets for vtables @param rType type of interface @param nOffset offset to vtable entry */ - void SAL_CALL writeTypeOffset( const ::com::sun::star::uno::Type & rType, sal_Int32 nOffset ) - SAL_THROW(()); + void SAL_CALL writeTypeOffset( const ::com::sun::star::uno::Type & rType, sal_Int32 nOffset ); /** Queries for an interface. @@ -121,26 +120,23 @@ struct CPPUHELPER_DLLPUBLIC ClassData : public ClassDataBase @return demanded interface or empty any */ ::com::sun::star::uno::Any SAL_CALL query( - const ::com::sun::star::uno::Type & rType, ::com::sun::star::lang::XTypeProvider * pBase ) - SAL_THROW(()); + const ::com::sun::star::uno::Type & rType, ::com::sun::star::lang::XTypeProvider * pBase ); /** Gets the types for supporting com.sun.star.lang.XTypeProvider @return sequence of types supported */ - ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes() - SAL_THROW(()); + ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes(); /** Gets the class id of implementation supporting com.sun.star.lang.XTypeProvider @return class identifier (sequence< byte >) */ - ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() - SAL_THROW(()); + ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId(); }; /** Shared mutex for implementation helper initialization. Not for public use. */ -CPPUHELPER_DLLPUBLIC ::osl::Mutex & SAL_CALL getImplHelperInitMutex(void) SAL_THROW(()); +CPPUHELPER_DLLPUBLIC ::osl::Mutex & SAL_CALL getImplHelperInitMutex(void); } @@ -174,7 +170,7 @@ namespace cppu \ struct ClassData##N : public ClassDataBase \ { \ Type_Offset arType2Offset[ N ]; \ - ClassData##N( sal_Int32 nInClassCode ) SAL_THROW(()) \ + ClassData##N( sal_Int32 nInClassCode ) \ : ClassDataBase( nInClassCode ) \ {} \ }; \ @@ -186,7 +182,7 @@ class SAL_NO_VTABLE SAL_DLLPUBLIC_TEMPLATE ImplHelperBase##N \ CPPUHELPER_DETAIL_IMPLHELPER_PROTECTED: \ ~ImplHelperBase##N() throw () {} \ protected: \ - ClassData & SAL_CALL getClassData( ClassDataBase & s_aCD ) SAL_THROW(()) \ + ClassData & SAL_CALL getClassData( ClassDataBase & s_aCD ) \ { \ ClassData & rCD = * static_cast< ClassData * >( &s_aCD ); \ if (! rCD.bOffsetsInit) \ diff --git a/include/cppuhelper/implbase_ex.hxx b/include/cppuhelper/implbase_ex.hxx index 36d379cb6de1..e9d871a0c01f 100644 --- a/include/cppuhelper/implbase_ex.hxx +++ b/include/cppuhelper/implbase_ex.hxx @@ -46,7 +46,7 @@ namespace cppu /** function pointer signature for getCppuType */ -typedef ::com::sun::star::uno::Type const & (SAL_CALL * fptr_getCppuType)( void * ) SAL_THROW(()); +typedef ::com::sun::star::uno::Type const & (SAL_CALL * fptr_getCppuType)( void * ); /** single type + object offset */ @@ -96,34 +96,29 @@ struct class_data CPPUHELPER_DLLPUBLIC ::com::sun::star::uno::Any SAL_CALL ImplHelper_query( ::com::sun::star::uno::Type const & rType, class_data * cd, - void * that ) - SAL_THROW( (::com::sun::star::uno::RuntimeException) ); + void * that ); /** ImplHelper */ CPPUHELPER_DLLPUBLIC ::com::sun::star::uno::Any SAL_CALL ImplHelper_queryNoXInterface( ::com::sun::star::uno::Type const & rType, class_data * cd, - void * that ) - SAL_THROW( (::com::sun::star::uno::RuntimeException) ); + void * that ); /** ImplHelper */ CPPUHELPER_DLLPUBLIC ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL ImplHelper_getTypes( - class_data * cd ) - SAL_THROW( (::com::sun::star::uno::RuntimeException) ); + class_data * cd ); /** ImplHelper */ CPPUHELPER_DLLPUBLIC ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL ImplInhHelper_getTypes( class_data * cd, - ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > const & rAddTypes ) - SAL_THROW( (::com::sun::star::uno::RuntimeException) ); + ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > const & rAddTypes ); /** ImplHelper */ CPPUHELPER_DLLPUBLIC ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL ImplHelper_getImplementationId( - class_data * cd ) - SAL_THROW( (::com::sun::star::uno::RuntimeException) ); + class_data * cd ); /** WeakImplHelper */ @@ -131,14 +126,12 @@ CPPUHELPER_DLLPUBLIC ::com::sun::star::uno::Any SAL_CALL WeakImplHelper_query( ::com::sun::star::uno::Type const & rType, class_data * cd, void * that, - ::cppu::OWeakObject * pBase ) - SAL_THROW( (::com::sun::star::uno::RuntimeException) ); + ::cppu::OWeakObject * pBase ); /** WeakImplHelper */ CPPUHELPER_DLLPUBLIC ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL WeakImplHelper_getTypes( - class_data * cd ) - SAL_THROW( (::com::sun::star::uno::RuntimeException) ); + class_data * cd ); /** WeakAggImplHelper */ @@ -147,14 +140,12 @@ SAL_CALL WeakAggImplHelper_queryAgg( ::com::sun::star::uno::Type const & rType, class_data * cd, void * that, - ::cppu::OWeakAggObject * pBase ) - SAL_THROW( (::com::sun::star::uno::RuntimeException) ); + ::cppu::OWeakAggObject * pBase ); /** WeakAggImplHelper */ CPPUHELPER_DLLPUBLIC ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL WeakAggImplHelper_getTypes( - class_data * cd ) - SAL_THROW( (::com::sun::star::uno::RuntimeException) ); + class_data * cd ); } diff --git a/include/cppuhelper/interfacecontainer.h b/include/cppuhelper/interfacecontainer.h index 7dfff29d43d6..56805f099da2 100644 --- a/include/cppuhelper/interfacecontainer.h +++ b/include/cppuhelper/interfacecontainer.h @@ -72,28 +72,28 @@ public: @param rCont the container of the elements. */ - OInterfaceIteratorHelper( OInterfaceContainerHelper & rCont ) SAL_THROW(()); + OInterfaceIteratorHelper( OInterfaceContainerHelper & rCont ); /** Releases the connection to the container. */ - ~OInterfaceIteratorHelper() SAL_THROW(()); + ~OInterfaceIteratorHelper(); /** Return true, if there are more elements in the iterator. */ - bool SAL_CALL hasMoreElements() const SAL_THROW(()) + bool SAL_CALL hasMoreElements() const { return nRemain != 0; } /** Return the next element of the iterator. Calling this method if hasMoreElements() has returned false, is an error. Cast the returned pointer to the */ - ::com::sun::star::uno::XInterface * SAL_CALL next() SAL_THROW(()); + ::com::sun::star::uno::XInterface * SAL_CALL next(); /** Removes the current element (the last one returned by next()) from the underlying container. Calling this method before next() has been called or calling it twice with no next() inbetween is an error. */ - void SAL_CALL remove() SAL_THROW(()); + void SAL_CALL remove(); private: OInterfaceContainerHelper & rCont; @@ -103,8 +103,8 @@ private: sal_Int32 nRemain; - OInterfaceIteratorHelper( const OInterfaceIteratorHelper & ) SAL_THROW(()); - OInterfaceIteratorHelper & operator = ( const OInterfaceIteratorHelper & ) SAL_THROW(()); + OInterfaceIteratorHelper( const OInterfaceIteratorHelper & ); + OInterfaceIteratorHelper & operator = ( const OInterfaceIteratorHelper & ); }; @@ -118,13 +118,13 @@ class CPPUHELPER_DLLPUBLIC OInterfaceContainerHelper { public: // these are here to force memory de/allocation to sal lib. - inline static void * SAL_CALL operator new( size_t nSize ) SAL_THROW(()) + inline static void * SAL_CALL operator new( size_t nSize ) { return ::rtl_allocateMemory( nSize ); } - inline static void SAL_CALL operator delete( void * pMem ) SAL_THROW(()) + inline static void SAL_CALL operator delete( void * pMem ) { ::rtl_freeMemory( pMem ); } - inline static void * SAL_CALL operator new( size_t, void * pMem ) SAL_THROW(()) + inline static void * SAL_CALL operator new( size_t, void * pMem ) { return pMem; } - inline static void SAL_CALL operator delete( void *, void * ) SAL_THROW(()) + inline static void SAL_CALL operator delete( void *, void * ) {} /** @@ -134,22 +134,22 @@ public: The lifetime must be longer than the lifetime of this object. */ - OInterfaceContainerHelper( ::osl::Mutex & rMutex ) SAL_THROW(()); + OInterfaceContainerHelper( ::osl::Mutex & rMutex ); /** Release all interfaces. All iterators must be destroyed before the container is destructed. */ - ~OInterfaceContainerHelper() SAL_THROW(()); + ~OInterfaceContainerHelper(); /** Return the number of Elements in the container. Only useful if you have acquired the mutex. */ - sal_Int32 SAL_CALL getLength() const SAL_THROW(()); + sal_Int32 SAL_CALL getLength() const; /** Return all interfaces added to this container. **/ - ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > > SAL_CALL getElements() const SAL_THROW(()); + ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > > SAL_CALL getElements() const; /** Inserts an element into the container. The position is not specified, thus it is not specified in which order events are fired. @@ -167,7 +167,7 @@ public: @return the new count of elements in the container */ - sal_Int32 SAL_CALL addInterface( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > & rxIFace ) SAL_THROW(()); + sal_Int32 SAL_CALL addInterface( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > & rxIFace ); /** Removes an element from the container. It uses interface equality to remove the interface. @param rxIFace @@ -175,16 +175,16 @@ public: @return the new count of elements in the container */ - sal_Int32 SAL_CALL removeInterface( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > & rxIFace ) SAL_THROW(()); + sal_Int32 SAL_CALL removeInterface( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > & rxIFace ); /** Call disposing on all object in the container that support XEventListener. Than clear the container. */ - void SAL_CALL disposeAndClear( const ::com::sun::star::lang::EventObject & rEvt ) SAL_THROW(()); + void SAL_CALL disposeAndClear( const ::com::sun::star::lang::EventObject & rEvt ); /** Clears the container without calling disposing(). */ - void SAL_CALL clear() SAL_THROW(()); + void SAL_CALL clear(); /** Executes a functor for each contained listener of specified type, e.g. <code>forEach<awt::XPaintListener>(...</code>. @@ -237,14 +237,14 @@ friend class OInterfaceIteratorHelper; /** TRUE -> aData.pAsSequence is of type Sequence< XInterfaceSequence >. */ sal_Bool bIsList; - OInterfaceContainerHelper( const OInterfaceContainerHelper & ) SAL_THROW(()); - OInterfaceContainerHelper & operator = ( const OInterfaceContainerHelper & ) SAL_THROW(()); + OInterfaceContainerHelper( const OInterfaceContainerHelper & ); + OInterfaceContainerHelper & operator = ( const OInterfaceContainerHelper & ); /* Dulicate content of the conaitner and release the old one without destroying. The mutex must be locked and the memberbInUse must be true. */ - void copyAndResetInUse() SAL_THROW(()); + void copyAndResetInUse(); private: template< typename ListenerT, typename EventT > @@ -301,13 +301,13 @@ class OMultiTypeInterfaceContainerHelperVar { public: // these are here to force memory de/allocation to sal lib. - inline static void * SAL_CALL operator new( size_t nSize ) SAL_THROW(()) + inline static void * SAL_CALL operator new( size_t nSize ) { return ::rtl_allocateMemory( nSize ); } - inline static void SAL_CALL operator delete( void * pMem ) SAL_THROW(()) + inline static void SAL_CALL operator delete( void * pMem ) { ::rtl_freeMemory( pMem ); } - inline static void * SAL_CALL operator new( size_t, void * pMem ) SAL_THROW(()) + inline static void * SAL_CALL operator new( size_t, void * pMem ) { return pMem; } - inline static void SAL_CALL operator delete( void *, void * ) SAL_THROW(()) + inline static void SAL_CALL operator delete( void *, void * ) {} /** @@ -317,16 +317,16 @@ public: The lifetime must be longer than the lifetime of this object. */ - inline OMultiTypeInterfaceContainerHelperVar( ::osl::Mutex & rMutex ) SAL_THROW(()); + inline OMultiTypeInterfaceContainerHelperVar( ::osl::Mutex & rMutex ); /** Deletes all containers. */ - inline ~OMultiTypeInterfaceContainerHelperVar() SAL_THROW(()); + inline ~OMultiTypeInterfaceContainerHelperVar(); /** Return all id's under which at least one interface is added. */ - inline ::com::sun::star::uno::Sequence< key > SAL_CALL getContainedTypes() const SAL_THROW(()); + inline ::com::sun::star::uno::Sequence< key > SAL_CALL getContainedTypes() const; /** Return the container created under this key. @@ -334,7 +334,7 @@ public: @return the container created under this key. If the container was not created, null was returned. */ - inline OInterfaceContainerHelper * SAL_CALL getContainer( const key & ) const SAL_THROW(()); + inline OInterfaceContainerHelper * SAL_CALL getContainer( const key & ) const; /** Inserts an element into the container with the specified key. The position is not specified, thus it is not specified in which order events are fired. @@ -356,8 +356,7 @@ public: */ inline sal_Int32 SAL_CALL addInterface( const key & rKey, - const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > & r ) - SAL_THROW(()); + const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > & r ); /** Removes an element from the container with the specified key. It uses interface equality to remove the interface. @@ -371,19 +370,18 @@ public: */ inline sal_Int32 SAL_CALL removeInterface( const key & rKey, - const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > & rxIFace ) - SAL_THROW(()); + const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > & rxIFace ); /** Call disposing on all references in the container, that support XEventListener. Then clears the container. @param rEvt the event object which is passed during disposing() call */ - inline void SAL_CALL disposeAndClear( const ::com::sun::star::lang::EventObject & rEvt ) SAL_THROW(()); + inline void SAL_CALL disposeAndClear( const ::com::sun::star::lang::EventObject & rEvt ); /** Remove all elements of all containers. Does not delete the container. */ - inline void SAL_CALL clear() SAL_THROW(()); + inline void SAL_CALL clear(); typedef key keyType; private: @@ -406,8 +404,8 @@ private: return iter; } - inline OMultiTypeInterfaceContainerHelperVar( const OMultiTypeInterfaceContainerHelperVar & ) SAL_THROW(()); - inline OMultiTypeInterfaceContainerHelperVar & operator = ( const OMultiTypeInterfaceContainerHelperVar & ) SAL_THROW(()); + inline OMultiTypeInterfaceContainerHelperVar( const OMultiTypeInterfaceContainerHelperVar & ); + inline OMultiTypeInterfaceContainerHelperVar & operator = ( const OMultiTypeInterfaceContainerHelperVar & ); }; @@ -438,7 +436,7 @@ struct OBroadcastHelperVar Initialize the structur. bDispose and bInDispose are set to false. @param rMutex_ the mutex reference. */ - OBroadcastHelperVar( ::osl::Mutex & rMutex_ ) SAL_THROW(()) + OBroadcastHelperVar( ::osl::Mutex & rMutex_ ) : rMutex( rMutex_ ) , aLC( rMutex_ ) , bDisposed( sal_False ) @@ -451,7 +449,6 @@ struct OBroadcastHelperVar inline void addListener( const keyType &key, const ::com::sun::star::uno::Reference < ::com::sun::star::uno::XInterface > &r ) - SAL_THROW(()) { ::osl::MutexGuard guard( rMutex ); OSL_ENSURE( !bInDispose, "do not add listeners in the dispose call" ); @@ -466,7 +463,6 @@ struct OBroadcastHelperVar inline void removeListener( const keyType &key, const ::com::sun::star::uno::Reference < ::com::sun::star::uno::XInterface > & r ) - SAL_THROW(()) { ::osl::MutexGuard guard( rMutex ); OSL_ENSURE( !bDisposed, "object is disposed" ); @@ -480,7 +476,7 @@ struct OBroadcastHelperVar was not created, null was returned. This can be used to optimize performance ( construction of an event object can be avoided ). ***/ - inline OInterfaceContainerHelper * SAL_CALL getContainer( const keyType &key ) const SAL_THROW(()) + inline OInterfaceContainerHelper * SAL_CALL getContainer( const keyType &key ) const { return aLC.getContainer( key ); } }; @@ -494,7 +490,7 @@ struct OBroadcastHelperVar // helper function call class struct hashType_Impl { - size_t operator()(const ::com::sun::star::uno::Type & s) const SAL_THROW(()) + size_t operator()(const ::com::sun::star::uno::Type & s) const { return (size_t) s.getTypeName().hashCode(); } }; @@ -506,13 +502,13 @@ class CPPUHELPER_DLLPUBLIC OMultiTypeInterfaceContainerHelper { public: // these are here to force memory de/allocation to sal lib. - inline static void * SAL_CALL operator new( size_t nSize ) SAL_THROW(()) + inline static void * SAL_CALL operator new( size_t nSize ) { return ::rtl_allocateMemory( nSize ); } - inline static void SAL_CALL operator delete( void * pMem ) SAL_THROW(()) + inline static void SAL_CALL operator delete( void * pMem ) { ::rtl_freeMemory( pMem ); } - inline static void * SAL_CALL operator new( size_t, void * pMem ) SAL_THROW(()) + inline static void * SAL_CALL operator new( size_t, void * pMem ) { return pMem; } - inline static void SAL_CALL operator delete( void *, void * ) SAL_THROW(()) + inline static void SAL_CALL operator delete( void *, void * ) {} /** @@ -522,23 +518,23 @@ public: The lifetime must be longer than the lifetime of this object. */ - OMultiTypeInterfaceContainerHelper( ::osl::Mutex & rMutex ) SAL_THROW(()); + OMultiTypeInterfaceContainerHelper( ::osl::Mutex & rMutex ); /** Delete all containers. */ - ~OMultiTypeInterfaceContainerHelper() SAL_THROW(()); + ~OMultiTypeInterfaceContainerHelper(); /** Return all id's under which at least one interface is added. */ - ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getContainedTypes() const SAL_THROW(()); + ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getContainedTypes() const; /** Return the container created under this key. @return the container created under this key. If the container was not created, null was returned. */ - OInterfaceContainerHelper * SAL_CALL getContainer( const ::com::sun::star::uno::Type & rKey ) const SAL_THROW(()); + OInterfaceContainerHelper * SAL_CALL getContainer( const ::com::sun::star::uno::Type & rKey ) const; /** Inserts an element into the container with the specified key. The position is not specified, thus it is not specified in which order events are fired. @@ -560,8 +556,7 @@ public: */ sal_Int32 SAL_CALL addInterface( const ::com::sun::star::uno::Type & rKey, - const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > & r ) - SAL_THROW(()); + const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > & r ); /** Removes an element from the container with the specified key. It uses interface equality to remove the interface. @@ -575,26 +570,25 @@ public: */ sal_Int32 SAL_CALL removeInterface( const ::com::sun::star::uno::Type & rKey, - const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > & rxIFace ) - SAL_THROW(()); + const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > & rxIFace ); /** Call disposing on all object in the container that support XEventListener. Than clear the container. */ - void SAL_CALL disposeAndClear( const ::com::sun::star::lang::EventObject & rEvt ) SAL_THROW(()); + void SAL_CALL disposeAndClear( const ::com::sun::star::lang::EventObject & rEvt ); /** Remove all elements of all containers. Does not delete the container. */ - void SAL_CALL clear() SAL_THROW(()); + void SAL_CALL clear(); typedef ::com::sun::star::uno::Type keyType; private: void *m_pMap; ::osl::Mutex & rMutex; - inline OMultiTypeInterfaceContainerHelper( const OMultiTypeInterfaceContainerHelper & ) SAL_THROW(()); - inline OMultiTypeInterfaceContainerHelper & operator = ( const OMultiTypeInterfaceContainerHelper & ) SAL_THROW(()); + inline OMultiTypeInterfaceContainerHelper( const OMultiTypeInterfaceContainerHelper & ); + inline OMultiTypeInterfaceContainerHelper & operator = ( const OMultiTypeInterfaceContainerHelper & ); }; typedef OBroadcastHelperVar< OMultiTypeInterfaceContainerHelper , OMultiTypeInterfaceContainerHelper::keyType > OBroadcastHelper; diff --git a/include/cppuhelper/interfacecontainer.hxx b/include/cppuhelper/interfacecontainer.hxx index 88f340b60c41..759f44094119 100644 --- a/include/cppuhelper/interfacecontainer.hxx +++ b/include/cppuhelper/interfacecontainer.hxx @@ -27,7 +27,6 @@ namespace cppu template< class key , class hashImpl , class equalImpl > inline OMultiTypeInterfaceContainerHelperVar< key , hashImpl , equalImpl >::OMultiTypeInterfaceContainerHelperVar( ::osl::Mutex & rMutex_ ) - SAL_THROW(()) : rMutex( rMutex_ ) { m_pMap = new InterfaceMap; @@ -36,7 +35,6 @@ inline OMultiTypeInterfaceContainerHelperVar< key , hashImpl , equalImpl >::OMul template< class key , class hashImpl , class equalImpl > inline OMultiTypeInterfaceContainerHelperVar< key , hashImpl , equalImpl >::~OMultiTypeInterfaceContainerHelperVar() - SAL_THROW(()) { typename InterfaceMap::iterator iter = m_pMap->begin(); typename InterfaceMap::iterator end = m_pMap->end(); @@ -53,7 +51,6 @@ inline OMultiTypeInterfaceContainerHelperVar< key , hashImpl , equalImpl >::~OMu template< class key , class hashImpl , class equalImpl > inline ::com::sun::star::uno::Sequence< key > OMultiTypeInterfaceContainerHelperVar< key , hashImpl , equalImpl >::getContainedTypes() const - SAL_THROW(()) { ::osl::MutexGuard aGuard( rMutex ); typename InterfaceMap::size_type nSize = m_pMap->size(); @@ -86,7 +83,7 @@ inline ::com::sun::star::uno::Sequence< key > OMultiTypeInterfaceContainerHelper template< class key , class hashImpl , class equalImpl > OInterfaceContainerHelper * OMultiTypeInterfaceContainerHelperVar< key , hashImpl , equalImpl >::getContainer( - const key & rKey ) const SAL_THROW(()) + const key & rKey ) const { ::osl::MutexGuard aGuard( rMutex ); @@ -101,7 +98,6 @@ template< class key , class hashImpl , class equalImpl > sal_Int32 OMultiTypeInterfaceContainerHelperVar< key , hashImpl , equalImpl >::addInterface( const key & rKey, const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > & rListener ) - SAL_THROW(()) { ::osl::MutexGuard aGuard( rMutex ); typename InterfaceMap::iterator iter = find( rKey ); @@ -120,7 +116,6 @@ template< class key , class hashImpl , class equalImpl > inline sal_Int32 OMultiTypeInterfaceContainerHelperVar< key , hashImpl , equalImpl >::removeInterface( const key & rKey, const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > & rListener ) - SAL_THROW(()) { ::osl::MutexGuard aGuard( rMutex ); @@ -138,7 +133,6 @@ inline sal_Int32 OMultiTypeInterfaceContainerHelperVar< key , hashImpl , equalIm template< class key , class hashImpl , class equalImpl > void OMultiTypeInterfaceContainerHelperVar< key , hashImpl , equalImpl >::disposeAndClear( const ::com::sun::star::lang::EventObject & rEvt ) - SAL_THROW(()) { typename InterfaceMap::size_type nSize = 0; OInterfaceContainerHelper ** ppListenerContainers = NULL; @@ -174,7 +168,7 @@ void OMultiTypeInterfaceContainerHelperVar< key , hashImpl , equalImpl >::dispos template< class key , class hashImpl , class equalImpl > -void OMultiTypeInterfaceContainerHelperVar< key , hashImpl , equalImpl >::clear() SAL_THROW(()) +void OMultiTypeInterfaceContainerHelperVar< key , hashImpl , equalImpl >::clear() { ::osl::MutexGuard aGuard( rMutex ); typename InterfaceMap::iterator iter = m_pMap->begin(); diff --git a/include/cppuhelper/propshlp.hxx b/include/cppuhelper/propshlp.hxx index aaf3956a52f9..cc462c16ef33 100644 --- a/include/cppuhelper/propshlp.hxx +++ b/include/cppuhelper/propshlp.hxx @@ -48,13 +48,13 @@ class CPPUHELPER_DLLPUBLIC IPropertyArrayHelper { public: // these are here to force memory de/allocation to sal lib. - inline static void * SAL_CALL operator new( size_t nSize ) SAL_THROW(()) + inline static void * SAL_CALL operator new( size_t nSize ) { return ::rtl_allocateMemory( nSize ); } - inline static void SAL_CALL operator delete( void * pMem ) SAL_THROW(()) + inline static void SAL_CALL operator delete( void * pMem ) { ::rtl_freeMemory( pMem ); } - inline static void * SAL_CALL operator new( size_t, void * pMem ) SAL_THROW(()) + inline static void * SAL_CALL operator new( size_t, void * pMem ) { return pMem; } - inline static void SAL_CALL operator delete( void *, void * ) SAL_THROW(()) + inline static void SAL_CALL operator delete( void *, void * ) {} /** @@ -125,8 +125,7 @@ public: OPropertyArrayHelper( ::com::sun::star::beans::Property *pProps, sal_Int32 nElements , - sal_Bool bSorted = sal_True ) - SAL_THROW(()); + sal_Bool bSorted = sal_True ); /** Create an object which supports the common property interfaces. @@ -136,13 +135,12 @@ public: */ OPropertyArrayHelper( const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::Property > & aProps, - sal_Bool bSorted = sal_True ) - SAL_THROW(()); + sal_Bool bSorted = sal_True ); /** Return the number of properties. */ - sal_Int32 SAL_CALL getCount() const SAL_THROW(()); + sal_Int32 SAL_CALL getCount() const; /** Return the property members Name and Attribute from the handle nHandle. @param nHandle the handle of a property. If the values of the handles @@ -194,7 +192,7 @@ protected: void * m_pReserved; private: - void init( sal_Bool bSorted ) SAL_THROW(()); + void init( sal_Bool bSorted ); /** The sequence generated from the pProperties array. */ ::com::sun::star::uno::Sequence< ::com::sun::star::beans::Property > aInfos; @@ -212,13 +210,13 @@ private: struct equalInt32_Impl { - bool operator()(const sal_Int32 & i1 , const sal_Int32 & i2) const SAL_THROW(()) + bool operator()(const sal_Int32 & i1 , const sal_Int32 & i2) const { return i1 == i2; } }; struct hashInt32_Impl { - size_t operator()(const sal_Int32 & i) const SAL_THROW(()) + size_t operator()(const sal_Int32 & i) const { return i; } }; /** Specialized class for key type sal_Int32, @@ -228,13 +226,13 @@ class CPPUHELPER_DLLPUBLIC OMultiTypeInterfaceContainerHelperInt32 { public: // these are here to force memory de/allocation to sal lib. - inline static void * SAL_CALL operator new( size_t nSize ) SAL_THROW(()) + inline static void * SAL_CALL operator new( size_t nSize ) { return ::rtl_allocateMemory( nSize ); } - inline static void SAL_CALL operator delete( void * pMem ) SAL_THROW(()) + inline static void SAL_CALL operator delete( void * pMem ) { ::rtl_freeMemory( pMem ); } - inline static void * SAL_CALL operator new( size_t, void * pMem ) SAL_THROW(()) + inline static void * SAL_CALL operator new( size_t, void * pMem ) { return pMem; } - inline static void SAL_CALL operator delete( void *, void * ) SAL_THROW(()) + inline static void SAL_CALL operator delete( void *, void * ) {} /** @@ -244,23 +242,23 @@ public: The lifetime must be longer than the lifetime of this object. */ - OMultiTypeInterfaceContainerHelperInt32( ::osl::Mutex & rMutex ) SAL_THROW(()); + OMultiTypeInterfaceContainerHelperInt32( ::osl::Mutex & rMutex ); /** Delete all containers. */ - ~OMultiTypeInterfaceContainerHelperInt32() SAL_THROW(()); + ~OMultiTypeInterfaceContainerHelperInt32(); /** Return all id's under which at least one interface is added. */ - ::com::sun::star::uno::Sequence< sal_Int32 > SAL_CALL getContainedTypes() const SAL_THROW(()); + ::com::sun::star::uno::Sequence< sal_Int32 > SAL_CALL getContainedTypes() const; /** Return the container created under this key. @return the container created under this key. If the container was not created, null was returned. */ - OInterfaceContainerHelper * SAL_CALL getContainer( const sal_Int32 & rKey ) const SAL_THROW(()); + OInterfaceContainerHelper * SAL_CALL getContainer( const sal_Int32 & rKey ) const; /** Insert an element in the container specified with the key. The position is not specified. @@ -271,8 +269,7 @@ public: */ sal_Int32 SAL_CALL addInterface( const sal_Int32 & rKey, - const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > & r ) - SAL_THROW(()); + const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > & r ); /** Remove an element from the container specified with the key. @@ -283,26 +280,25 @@ public: */ sal_Int32 SAL_CALL removeInterface( const sal_Int32 & rKey, - const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > & rxIFace ) - SAL_THROW(()); + const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > & rxIFace ); /** Call disposing on all objects in the container that support XEventListener. Then clear the container. */ - void SAL_CALL disposeAndClear( const ::com::sun::star::lang::EventObject & rEvt ) SAL_THROW(()); + void SAL_CALL disposeAndClear( const ::com::sun::star::lang::EventObject & rEvt ); /** Remove all elements of all containers. Does not delete the container. */ - void SAL_CALL clear() SAL_THROW(()); + void SAL_CALL clear(); typedef sal_Int32 keyType; private: void *m_pMap; ::osl::Mutex & rMutex; - inline OMultiTypeInterfaceContainerHelperInt32( const OMultiTypeInterfaceContainerHelperInt32 & ) SAL_THROW(()); - inline OMultiTypeInterfaceContainerHelperInt32 & operator = ( const OMultiTypeInterfaceContainerHelperInt32 & ) SAL_THROW(()); + inline OMultiTypeInterfaceContainerHelperInt32( const OMultiTypeInterfaceContainerHelperInt32 & ); + inline OMultiTypeInterfaceContainerHelperInt32 & operator = ( const OMultiTypeInterfaceContainerHelperInt32 & ); }; @@ -372,7 +368,7 @@ public: The lifetime must be longer than the lifetime of this object. Stored in the variable rBHelper. */ - OPropertySetHelper( OBroadcastHelper & rBHelper ) SAL_THROW(()); + OPropertySetHelper( OBroadcastHelper & rBHelper ); /** Constructor. @@ -439,7 +435,7 @@ public: @see OComponentHelper */ - void SAL_CALL disposing() SAL_THROW(()); + void SAL_CALL disposing(); /** Throw UnknownPropertyException or PropertyVetoException if the property with the name @@ -523,7 +519,7 @@ public: The property sequence is created in the call. The interface isn't used after the call. */ static ::com::sun::star::uno::Reference < ::com::sun::star::beans::XPropertySetInfo > SAL_CALL - createPropertySetInfo( IPropertyArrayHelper & rProperties ) SAL_THROW(()); + createPropertySetInfo( IPropertyArrayHelper & rProperties ); protected: /** This method fire events to all registered property listeners. @@ -554,8 +550,7 @@ protected: sal_Int32 nSeqLen, sal_Int32 * pHandles, const ::com::sun::star::uno::Any * pValues, - sal_Int32 nHitCount ) - SAL_THROW( (::com::sun::star::uno::Exception) ); + sal_Int32 nHitCount ); /** This abstract method must return the name to index table. This table contains all property @@ -655,8 +650,8 @@ protected: const std::auto_ptr<Impl> m_pReserved; private: - OPropertySetHelper( const OPropertySetHelper & ) SAL_THROW(()); - OPropertySetHelper & operator = ( const OPropertySetHelper & ) SAL_THROW(()); + OPropertySetHelper( const OPropertySetHelper & ); + OPropertySetHelper & operator = ( const OPropertySetHelper & ); /** notifies the given changes in property's values, <em>plus</em> all property changes collected during recent |setDependentFastPropertyValue| calls. @@ -681,7 +676,7 @@ protected: /** You must call disposing before destruction. */ - ~OPropertySetHelper() SAL_THROW(()); + ~OPropertySetHelper(); }; #if defined _MSC_VER #pragma warning(pop) @@ -714,8 +709,8 @@ public: private: - OPropertySetHelper2( const OPropertySetHelper2 & ) SAL_THROW(()); - OPropertySetHelper2 & operator = ( const OPropertySetHelper2 & ) SAL_THROW(()); + OPropertySetHelper2( const OPropertySetHelper2 & ); + OPropertySetHelper2 & operator = ( const OPropertySetHelper2 & ); #if defined _MSC_VER // public -> protected changes mangled names there public: @@ -726,7 +721,7 @@ protected: /** You must call disposing before destruction. */ - virtual ~OPropertySetHelper2() SAL_THROW(()); + virtual ~OPropertySetHelper2(); }; } // end namespace cppuhelper diff --git a/include/cppuhelper/proptypehlp.h b/include/cppuhelper/proptypehlp.h index 343a9f82bb5d..a0d863cadccd 100644 --- a/include/cppuhelper/proptypehlp.h +++ b/include/cppuhelper/proptypehlp.h @@ -41,26 +41,16 @@ inline void SAL_CALL convertPropertyValue( target &value , ::com::sun::star::un /** conversion of basic types */ -inline void SAL_CALL convertPropertyValue( sal_Int64 & target , const ::com::sun::star::uno::Any & source ) - SAL_THROW( (::com::sun::star::lang::IllegalArgumentException) ); -inline void SAL_CALL convertPropertyValue( sal_uInt64 & target, const ::com::sun::star::uno::Any & source ) - SAL_THROW( (::com::sun::star::lang::IllegalArgumentException) ); -inline void SAL_CALL convertPropertyValue( sal_Int32 & target , const ::com::sun::star::uno::Any & source ) - SAL_THROW( (::com::sun::star::lang::IllegalArgumentException) ); -inline void SAL_CALL convertPropertyValue( sal_uInt32 & target, const ::com::sun::star::uno::Any & source ) - SAL_THROW( (::com::sun::star::lang::IllegalArgumentException) ); -inline void SAL_CALL convertPropertyValue( sal_Int16 & target , const ::com::sun::star::uno::Any & source ) - SAL_THROW( (::com::sun::star::lang::IllegalArgumentException) ); -inline void SAL_CALL convertPropertyValue( sal_uInt16 & target, const ::com::sun::star::uno::Any & source ) - SAL_THROW( (::com::sun::star::lang::IllegalArgumentException) ); -inline void SAL_CALL convertPropertyValue( sal_Int8 & target , const ::com::sun::star::uno::Any & source ) - SAL_THROW( (::com::sun::star::lang::IllegalArgumentException) ); -inline void SAL_CALL convertPropertyValue( float & target , const ::com::sun::star::uno::Any & source ) - SAL_THROW( (::com::sun::star::lang::IllegalArgumentException) ); -inline void SAL_CALL convertPropertyValue( double &target , const ::com::sun::star::uno::Any &source ) - SAL_THROW( (::com::sun::star::lang::IllegalArgumentException) ); -inline void SAL_CALL convertPropertyValue( ::rtl::OUString &target , const ::com::sun::star::uno::Any &source ) - SAL_THROW( (::com::sun::star::lang::IllegalArgumentException) ); +inline void SAL_CALL convertPropertyValue( sal_Int64 & target , const ::com::sun::star::uno::Any & source ); +inline void SAL_CALL convertPropertyValue( sal_uInt64 & target, const ::com::sun::star::uno::Any & source ); +inline void SAL_CALL convertPropertyValue( sal_Int32 & target , const ::com::sun::star::uno::Any & source ); +inline void SAL_CALL convertPropertyValue( sal_uInt32 & target, const ::com::sun::star::uno::Any & source ); +inline void SAL_CALL convertPropertyValue( sal_Int16 & target , const ::com::sun::star::uno::Any & source ); +inline void SAL_CALL convertPropertyValue( sal_uInt16 & target, const ::com::sun::star::uno::Any & source ); +inline void SAL_CALL convertPropertyValue( sal_Int8 & target , const ::com::sun::star::uno::Any & source ); +inline void SAL_CALL convertPropertyValue( float & target , const ::com::sun::star::uno::Any & source ); +inline void SAL_CALL convertPropertyValue( double &target , const ::com::sun::star::uno::Any &source ); +inline void SAL_CALL convertPropertyValue( ::rtl::OUString &target , const ::com::sun::star::uno::Any &source ); } // end namespace cppu diff --git a/include/cppuhelper/proptypehlp.hxx b/include/cppuhelper/proptypehlp.hxx index 11061c560da9..9a3d26788c0c 100644 --- a/include/cppuhelper/proptypehlp.hxx +++ b/include/cppuhelper/proptypehlp.hxx @@ -52,7 +52,6 @@ inline void SAL_CALL convertPropertyValue( target &value , ::com::sun::star::un conversion of basic types */ inline void SAL_CALL convertPropertyValue( sal_Bool & b , const ::com::sun::star::uno::Any & a ) - SAL_THROW( (::com::sun::star::lang::IllegalArgumentException) ) { const enum ::com::sun::star::uno::TypeClass tc = a.getValueType().getTypeClass(); @@ -94,7 +93,6 @@ inline void SAL_CALL convertPropertyValue( sal_Bool & b , const ::com::sun::st } inline void SAL_CALL convertPropertyValue( sal_Int64 & i , const ::com::sun::star::uno::Any & a ) - SAL_THROW( (::com::sun::star::lang::IllegalArgumentException) ) { const enum ::com::sun::star::uno::TypeClass tc = a.getValueType().getTypeClass(); @@ -148,7 +146,6 @@ inline void SAL_CALL convertPropertyValue( sal_Int64 & i , const ::com::sun::st inline void SAL_CALL convertPropertyValue( sal_uInt64 & i , const ::com::sun::star::uno::Any & a ) - SAL_THROW( (::com::sun::star::lang::IllegalArgumentException) ) { const enum ::com::sun::star::uno::TypeClass tc = a.getValueType().getTypeClass(); @@ -203,7 +200,6 @@ inline void SAL_CALL convertPropertyValue( sal_uInt64 & i , const ::com::sun::s // the basic types // sal_Int32 inline void SAL_CALL convertPropertyValue( sal_Int32 & i , const ::com::sun::star::uno::Any & a ) - SAL_THROW( (::com::sun::star::lang::IllegalArgumentException) ) { const enum ::com::sun::star::uno::TypeClass tc = a.getValueType().getTypeClass(); @@ -246,7 +242,6 @@ inline void SAL_CALL convertPropertyValue( sal_Int32 & i , const ::com::sun::st } inline void SAL_CALL convertPropertyValue( sal_uInt32 & i , const ::com::sun::star::uno::Any & a ) - SAL_THROW( (::com::sun::star::lang::IllegalArgumentException) ) { const enum ::com::sun::star::uno::TypeClass tc = a.getValueType().getTypeClass(); @@ -290,7 +285,6 @@ inline void SAL_CALL convertPropertyValue( sal_uInt32 & i , const ::com::sun::s inline void SAL_CALL convertPropertyValue( sal_Int16 & i , const ::com::sun::star::uno::Any & a ) - SAL_THROW( (::com::sun::star::lang::IllegalArgumentException) ) { const enum ::com::sun::star::uno::TypeClass tc = a.getValueType().getTypeClass(); @@ -323,7 +317,6 @@ inline void SAL_CALL convertPropertyValue( sal_Int16 & i , const ::com::sun::st } inline void SAL_CALL convertPropertyValue( sal_uInt16 & i , const ::com::sun::star::uno::Any & a ) - SAL_THROW( (::com::sun::star::lang::IllegalArgumentException) ) { const enum ::com::sun::star::uno::TypeClass tc = a.getValueType().getTypeClass(); @@ -356,7 +349,6 @@ inline void SAL_CALL convertPropertyValue( sal_uInt16 & i , const ::com::sun::s } inline void SAL_CALL convertPropertyValue( sal_Int8 & i , const ::com::sun::star::uno::Any & a ) - SAL_THROW( (::com::sun::star::lang::IllegalArgumentException) ) { const enum ::com::sun::star::uno::TypeClass tc = a.getValueType().getTypeClass(); @@ -374,7 +366,6 @@ inline void SAL_CALL convertPropertyValue( sal_Int8 & i , const ::com::sun::sta } inline void SAL_CALL convertPropertyValue( float &f , const ::com::sun::star::uno::Any &a ) - SAL_THROW( (::com::sun::star::lang::IllegalArgumentException) ) { const enum ::com::sun::star::uno::TypeClass tc = a.getValueType().getTypeClass(); @@ -439,7 +430,6 @@ inline void SAL_CALL convertPropertyValue( float &f , const ::com::sun::star::un inline void SAL_CALL convertPropertyValue( double &d , const ::com::sun::star::uno::Any &a ) - SAL_THROW( (::com::sun::star::lang::IllegalArgumentException) ) { const enum ::com::sun::star::uno::TypeClass tc = a.getValueType().getTypeClass(); @@ -505,7 +495,6 @@ inline void SAL_CALL convertPropertyValue( double &d , const ::com::sun::star::u } inline void SAL_CALL convertPropertyValue( ::rtl::OUString &ow , const ::com::sun::star::uno::Any &a ) - SAL_THROW( (::com::sun::star::lang::IllegalArgumentException) ) { if( ::com::sun::star::uno::TypeClass_STRING == a.getValueType().getTypeClass() ) { a >>= ow; diff --git a/include/cppuhelper/queryinterface.hxx b/include/cppuhelper/queryinterface.hxx index 29045f34d63a..9ec02e0f1daa 100644 --- a/include/cppuhelper/queryinterface.hxx +++ b/include/cppuhelper/queryinterface.hxx @@ -39,7 +39,6 @@ template< class Interface1 > inline ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type & rType, Interface1 * p1 ) - SAL_THROW(()) { if (rType == Interface1::static_type()) return ::com::sun::star::uno::Any( &p1, rType ); @@ -59,7 +58,6 @@ template< class Interface1, class Interface2 > inline ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type & rType, Interface1 * p1, Interface2 * p2 ) - SAL_THROW(()) { if (rType == Interface1::static_type()) return ::com::sun::star::uno::Any( &p1, rType ); @@ -83,7 +81,6 @@ template< class Interface1, class Interface2, class Interface3 > inline ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type & rType, Interface1 * p1, Interface2 * p2, Interface3 * p3 ) - SAL_THROW(()) { if (rType == Interface1::static_type()) return ::com::sun::star::uno::Any( &p1, rType ); @@ -111,7 +108,6 @@ template< class Interface1, class Interface2, class Interface3, class Interface4 inline ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type & rType, Interface1 * p1, Interface2 * p2, Interface3 * p3, Interface4 * p4 ) - SAL_THROW(()) { if (rType == Interface1::static_type()) return ::com::sun::star::uno::Any( &p1, rType ); @@ -143,7 +139,6 @@ template< class Interface1, class Interface2, class Interface3, class Interface4 inline ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type & rType, Interface1 * p1, Interface2 * p2, Interface3 * p3, Interface4 * p4, Interface5 * p5 ) - SAL_THROW(()) { if (rType == Interface1::static_type()) return ::com::sun::star::uno::Any( &p1, rType ); @@ -181,7 +176,6 @@ inline ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type & rType, Interface1 * p1, Interface2 * p2, Interface3 * p3, Interface4 * p4, Interface5 * p5, Interface6 * p6 ) - SAL_THROW(()) { if (rType == Interface1::static_type()) return ::com::sun::star::uno::Any( &p1, rType ); @@ -223,7 +217,6 @@ inline ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type & rType, Interface1 * p1, Interface2 * p2, Interface3 * p3, Interface4 * p4, Interface5 * p5, Interface6 * p6, Interface7 * p7 ) - SAL_THROW(()) { if (rType == Interface1::static_type()) return ::com::sun::star::uno::Any( &p1, rType ); @@ -269,7 +262,6 @@ inline ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type & rType, Interface1 * p1, Interface2 * p2, Interface3 * p3, Interface4 * p4, Interface5 * p5, Interface6 * p6, Interface7 * p7, Interface8 * p8 ) - SAL_THROW(()) { if (rType == Interface1::static_type()) return ::com::sun::star::uno::Any( &p1, rType ); @@ -319,7 +311,6 @@ inline ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type & rType, Interface1 * p1, Interface2 * p2, Interface3 * p3, Interface4 * p4, Interface5 * p5, Interface6 * p6, Interface7 * p7, Interface8 * p8, Interface9 * p9 ) - SAL_THROW(()) { if (rType == Interface1::static_type()) return ::com::sun::star::uno::Any( &p1, rType ); @@ -373,7 +364,6 @@ inline ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type & rType, Interface1 * p1, Interface2 * p2, Interface3 * p3, Interface4 * p4, Interface5 * p5, Interface6 * p6, Interface7 * p7, Interface8 * p8, Interface9 * p9, Interface10 * p10 ) - SAL_THROW(()) { if (rType == Interface1::static_type()) return ::com::sun::star::uno::Any( &p1, rType ); @@ -433,7 +423,6 @@ inline ::com::sun::star::uno::Any SAL_CALL queryInterface( Interface1 * p1, Interface2 * p2, Interface3 * p3, Interface4 * p4, Interface5 * p5, Interface6 * p6, Interface7 * p7, Interface8 * p8, Interface9 * p9, Interface10 * p10, Interface11 * p11 ) - SAL_THROW(()) { if (rType == Interface1::static_type()) return ::com::sun::star::uno::Any( &p1, rType ); @@ -497,7 +486,6 @@ inline ::com::sun::star::uno::Any SAL_CALL queryInterface( Interface1 * p1, Interface2 * p2, Interface3 * p3, Interface4 * p4, Interface5 * p5, Interface6 * p6, Interface7 * p7, Interface8 * p8, Interface9 * p9, Interface10 * p10, Interface11 * p11, Interface12 * p12 ) - SAL_THROW(()) { if (rType == Interface1::static_type()) return ::com::sun::star::uno::Any( &p1, rType ); diff --git a/include/cppuhelper/shlib.hxx b/include/cppuhelper/shlib.hxx index f04a6ad12542..bc2c6c14b420 100644 --- a/include/cppuhelper/shlib.hxx +++ b/include/cppuhelper/shlib.hxx @@ -51,8 +51,7 @@ SAL_CALL loadSharedLibComponentFactory( ::rtl::OUString const & uri, ::rtl::OUString const & rPath, ::rtl::OUString const & rImplName, ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > const & xMgr, - ::com::sun::star::uno::Reference< ::com::sun::star::registry::XRegistryKey > const & xKey ) - SAL_THROW( (::com::sun::star::loader::CannotActivateFactoryException) ); + ::com::sun::star::uno::Reference< ::com::sun::star::registry::XRegistryKey > const & xKey ); /** Invokes component_writeInfo() function of specified component library. You can give either a fully qualified libname or single lib name. The libname need not be pre/postfixed @@ -72,8 +71,7 @@ CPPUHELPER_DLLPUBLIC void SAL_CALL writeSharedLibComponentInfo( ::rtl::OUString const & uri, ::rtl::OUString const & rPath, ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > const & xMgr, - ::com::sun::star::uno::Reference< ::com::sun::star::registry::XRegistryKey > const & xKey ) - SAL_THROW( (::com::sun::star::registry::CannotRegisterImplementationException) ); + ::com::sun::star::uno::Reference< ::com::sun::star::registry::XRegistryKey > const & xKey ); } // end namespace cppu diff --git a/include/cppuhelper/typeprovider.hxx b/include/cppuhelper/typeprovider.hxx index ca21dbfcba30..6b77bf5b5042 100644 --- a/include/cppuhelper/typeprovider.hxx +++ b/include/cppuhelper/typeprovider.hxx @@ -38,50 +38,44 @@ class CPPUHELPER_DLLPUBLIC OTypeCollection public: /// @cond INTERNAL // these are here to force memory de/allocation to sal lib. - inline static void * SAL_CALL operator new( size_t nSize ) SAL_THROW(()) + inline static void * SAL_CALL operator new( size_t nSize ) { return ::rtl_allocateMemory( nSize ); } - inline static void SAL_CALL operator delete( void * pMem ) SAL_THROW(()) + inline static void SAL_CALL operator delete( void * pMem ) { ::rtl_freeMemory( pMem ); } - inline static void * SAL_CALL operator new( size_t, void * pMem ) SAL_THROW(()) + inline static void * SAL_CALL operator new( size_t, void * pMem ) { return pMem; } - inline static void SAL_CALL operator delete( void *, void * ) SAL_THROW(()) + inline static void SAL_CALL operator delete( void *, void * ) {} /// @endcond inline OTypeCollection( const OTypeCollection & rCollection ) - SAL_THROW(()) : _aTypes( rCollection._aTypes ) {} OTypeCollection( const ::com::sun::star::uno::Type & rType1, - const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > & rAddTypes = ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type >() ) - SAL_THROW(()); + const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > & rAddTypes = ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type >() ); OTypeCollection( const ::com::sun::star::uno::Type & rType1, const ::com::sun::star::uno::Type & rType2, - const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > & rAddTypes = ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type >() ) - SAL_THROW(()); + const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > & rAddTypes = ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type >() ); OTypeCollection( const ::com::sun::star::uno::Type & rType1, const ::com::sun::star::uno::Type & rType2, const ::com::sun::star::uno::Type & rType3, - const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > & rAddTypes = ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type >() ) - SAL_THROW(()); + const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > & rAddTypes = ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type >() ); OTypeCollection( const ::com::sun::star::uno::Type & rType1, const ::com::sun::star::uno::Type & rType2, const ::com::sun::star::uno::Type & rType3, const ::com::sun::star::uno::Type & rType4, - const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > & rAddTypes = ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type >() ) - SAL_THROW(()); + const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > & rAddTypes = ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type >() ); OTypeCollection( const ::com::sun::star::uno::Type & rType1, const ::com::sun::star::uno::Type & rType2, const ::com::sun::star::uno::Type & rType3, const ::com::sun::star::uno::Type & rType4, const ::com::sun::star::uno::Type & rType5, - const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > & rAddTypes = ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type >() ) - SAL_THROW(()); + const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > & rAddTypes = ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type >() ); OTypeCollection( const ::com::sun::star::uno::Type & rType1, const ::com::sun::star::uno::Type & rType2, @@ -89,8 +83,7 @@ public: const ::com::sun::star::uno::Type & rType4, const ::com::sun::star::uno::Type & rType5, const ::com::sun::star::uno::Type & rType6, - const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > & rAddTypes = ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type >() ) - SAL_THROW(()); + const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > & rAddTypes = ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type >() ); OTypeCollection( const ::com::sun::star::uno::Type & rType1, const ::com::sun::star::uno::Type & rType2, @@ -99,8 +92,7 @@ public: const ::com::sun::star::uno::Type & rType5, const ::com::sun::star::uno::Type & rType6, const ::com::sun::star::uno::Type & rType7, - const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > & rAddTypes = ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type >() ) - SAL_THROW(()); + const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > & rAddTypes = ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type >() ); OTypeCollection( const ::com::sun::star::uno::Type & rType1, const ::com::sun::star::uno::Type & rType2, @@ -110,8 +102,7 @@ public: const ::com::sun::star::uno::Type & rType6, const ::com::sun::star::uno::Type & rType7, const ::com::sun::star::uno::Type & rType8, - const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > & rAddTypes = ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type >() ) - SAL_THROW(()); + const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > & rAddTypes = ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type >() ); OTypeCollection( const ::com::sun::star::uno::Type & rType1, const ::com::sun::star::uno::Type & rType2, @@ -122,8 +113,7 @@ public: const ::com::sun::star::uno::Type & rType7, const ::com::sun::star::uno::Type & rType8, const ::com::sun::star::uno::Type & rType9, - const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > & rAddTypes = ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type >() ) - SAL_THROW(()); + const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > & rAddTypes = ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type >() ); OTypeCollection( const ::com::sun::star::uno::Type & rType1, const ::com::sun::star::uno::Type & rType2, @@ -135,8 +125,7 @@ public: const ::com::sun::star::uno::Type & rType8, const ::com::sun::star::uno::Type & rType9, const ::com::sun::star::uno::Type & rType10, - const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > & rAddTypes = ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type >() ) - SAL_THROW(()); + const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > & rAddTypes = ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type >() ); OTypeCollection( const ::com::sun::star::uno::Type & rType1, const ::com::sun::star::uno::Type & rType2, @@ -149,8 +138,7 @@ public: const ::com::sun::star::uno::Type & rType9, const ::com::sun::star::uno::Type & rType10, const ::com::sun::star::uno::Type & rType11, - const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > & rAddTypes = ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type >() ) - SAL_THROW(()); + const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > & rAddTypes = ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type >() ); OTypeCollection( const ::com::sun::star::uno::Type & rType1, const ::com::sun::star::uno::Type & rType2, @@ -164,14 +152,13 @@ public: const ::com::sun::star::uno::Type & rType10, const ::com::sun::star::uno::Type & rType11, const ::com::sun::star::uno::Type & rType12, - const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > & rAddTypes = ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type >() ) - SAL_THROW(()); + const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > & rAddTypes = ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type >() ); /** Called upon XTypeProvider::getTypes(). @return type collection */ - ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes() SAL_THROW(()) + ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes() { return _aTypes; } }; @@ -187,16 +174,16 @@ public: /// @cond INTERNAL // these are here to force memory de/allocation to sal lib. - inline static void * SAL_CALL operator new( size_t nSize ) SAL_THROW(()) + inline static void * SAL_CALL operator new( size_t nSize ) { return ::rtl_allocateMemory( nSize ); } - inline static void SAL_CALL operator delete( void * pMem ) SAL_THROW(()) + inline static void SAL_CALL operator delete( void * pMem ) { ::rtl_freeMemory( pMem ); } - inline static void * SAL_CALL operator new( size_t, void * pMem ) SAL_THROW(()) + inline static void * SAL_CALL operator new( size_t, void * pMem ) { return pMem; } - inline static void SAL_CALL operator delete( void *, void * ) SAL_THROW(()) + inline static void SAL_CALL operator delete( void *, void * ) {} - ~OImplementationId() SAL_THROW(()); + ~OImplementationId(); /// @endcond @@ -204,7 +191,7 @@ public: @param bUseEthernetAddress whether an ethernet mac address should be taken into account */ - inline OImplementationId( bool bUseEthernetAddress = true ) SAL_THROW(()) + inline OImplementationId( bool bUseEthernetAddress = true ) : _pSeq( 0 ) , _bUseEthernetAddress( bUseEthernetAddress ) {} @@ -212,11 +199,11 @@ public: @param rSeq implementation id */ - inline OImplementationId( const ::com::sun::star::uno::Sequence< sal_Int8 > & rSeq ) SAL_THROW(()) + inline OImplementationId( const ::com::sun::star::uno::Sequence< sal_Int8 > & rSeq ) : _pSeq( new ::com::sun::star::uno::Sequence< sal_Int8 >( rSeq ) ) , _bUseEthernetAddress( false ) {} - inline OImplementationId( const OImplementationId & rId ) SAL_THROW(()) + inline OImplementationId( const OImplementationId & rId ) : _pSeq( new ::com::sun::star::uno::Sequence< sal_Int8 >( rId.getImplementationId() ) ) , _bUseEthernetAddress( false ) {} @@ -225,7 +212,7 @@ public: @return implementation id */ - ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() const SAL_THROW(()); + ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() const; }; } diff --git a/include/cppuhelper/weak.hxx b/include/cppuhelper/weak.hxx index 03399fe46277..41a8073dac34 100644 --- a/include/cppuhelper/weak.hxx +++ b/include/cppuhelper/weak.hxx @@ -51,7 +51,7 @@ protected: Despite the fact that a RuntimeException is allowed to be thrown, you must not throw any exception upon destruction! */ - virtual ~OWeakObject() SAL_THROW( (::com::sun::star::uno::RuntimeException) ); + virtual ~OWeakObject(); /** disposes and resets m_pWeakConnectionPoint @pre @@ -81,13 +81,13 @@ protected: public: /// @cond INTERNAL // these are here to force memory de/allocation to sal lib. - inline static void * SAL_CALL operator new( size_t nSize ) SAL_THROW(()) + inline static void * SAL_CALL operator new( size_t nSize ) { return ::rtl_allocateMemory( nSize ); } - inline static void SAL_CALL operator delete( void * pMem ) SAL_THROW(()) + inline static void SAL_CALL operator delete( void * pMem ) { ::rtl_freeMemory( pMem ); } - inline static void * SAL_CALL operator new( size_t, void * pMem ) SAL_THROW(()) + inline static void * SAL_CALL operator new( size_t, void * pMem ) { return pMem; } - inline static void SAL_CALL operator delete( void *, void * ) SAL_THROW(()) + inline static void SAL_CALL operator delete( void *, void * ) {} /// @endcond @@ -95,11 +95,11 @@ public: /** Default Constructor. Sets the reference count to zero. Accidentally occurs in msvc mapfile = > had to be outlined. */ - OWeakObject() SAL_THROW(()); + OWeakObject(); #else /** Default Constructor. Sets the reference count to zero. */ - inline OWeakObject() SAL_THROW(()) + inline OWeakObject() : m_refCount( 0 ) , m_pWeakConnectionPoint( 0 ) , m_pReserved(0) @@ -109,7 +109,7 @@ public: @param rObj dummy param */ - inline OWeakObject( const OWeakObject & rObj ) SAL_THROW(()) + inline OWeakObject( const OWeakObject & rObj ) : com::sun::star::uno::XWeak() , m_refCount( 0 ) , m_pWeakConnectionPoint( 0 ) @@ -122,7 +122,6 @@ public: @return this OWeakObject */ inline OWeakObject & SAL_CALL operator = ( const OWeakObject &) - SAL_THROW(()) { return *this; } /** Basic queryInterface() implementation supporting \::com::sun::star::uno::XWeak and @@ -154,7 +153,7 @@ public: @return XInterface reference */ - inline SAL_CALL operator ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > () SAL_THROW(()) + inline SAL_CALL operator ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > () { return this; } }; diff --git a/include/cppuhelper/weakagg.hxx b/include/cppuhelper/weakagg.hxx index 0514fd6bacec..8575fb3cce5b 100644 --- a/include/cppuhelper/weakagg.hxx +++ b/include/cppuhelper/weakagg.hxx @@ -44,7 +44,7 @@ class CPPUHELPER_DLLPUBLIC OWeakAggObject public: /** Constructor. No delegator set. */ - inline OWeakAggObject() SAL_THROW(()) + inline OWeakAggObject() {} /** If a delegator is set, then the delegators gets acquired. Otherwise call is delegated to @@ -87,14 +87,14 @@ protected: Despite the fact that a RuntimeException is allowed to be thrown, you must not throw any exception upon destruction! */ - virtual ~OWeakAggObject() SAL_THROW( (::com::sun::star::uno::RuntimeException) ); + virtual ~OWeakAggObject(); /** weak reference to delegator. */ ::com::sun::star::uno::WeakReferenceHelper xDelegator; private: - OWeakAggObject( const OWeakAggObject & rObj ) SAL_THROW(()); - OWeakAggObject & operator = ( const OWeakAggObject & rObj ) SAL_THROW(()); + OWeakAggObject( const OWeakAggObject & rObj ); + OWeakAggObject & operator = ( const OWeakAggObject & rObj ); }; } diff --git a/include/cppuhelper/weakref.hxx b/include/cppuhelper/weakref.hxx index 849196ab1074..796e744ed17b 100644 --- a/include/cppuhelper/weakref.hxx +++ b/include/cppuhelper/weakref.hxx @@ -42,7 +42,7 @@ class CPPUHELPER_DLLPUBLIC WeakReferenceHelper public: /** Default ctor. Creates an empty weak reference. */ - inline WeakReferenceHelper() SAL_THROW(()) + inline WeakReferenceHelper() : m_pImpl( 0 ) {} @@ -50,23 +50,22 @@ public: @param rWeakRef another weak ref */ - WeakReferenceHelper( const WeakReferenceHelper & rWeakRef ) SAL_THROW(()); + WeakReferenceHelper( const WeakReferenceHelper & rWeakRef ); /** Initialize this reference with the hard interface reference xInt. If the implementation behind xInt does not support XWeak or XInt is null then this reference will be null. @param xInt another hard interface reference */ - WeakReferenceHelper( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > & xInt ) - SAL_THROW(()); + WeakReferenceHelper( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > & xInt ); /** Releases this reference. */ - ~WeakReferenceHelper() SAL_THROW(()); + ~WeakReferenceHelper(); /** Releases this reference and takes over rWeakRef. @param rWeakRef another weak ref */ - WeakReferenceHelper & SAL_CALL operator = ( const WeakReferenceHelper & rWeakRef ) SAL_THROW(()); + WeakReferenceHelper & SAL_CALL operator = ( const WeakReferenceHelper & rWeakRef ); /** Releases this reference and takes over hard reference xInt. If the implementation behind xInt does not support XWeak @@ -76,33 +75,33 @@ public: */ WeakReferenceHelper & SAL_CALL operator = ( const ::com::sun::star::uno::Reference< - ::com::sun::star::uno::XInterface > & xInt ) SAL_THROW(()); + ::com::sun::star::uno::XInterface > & xInt ); /** Returns true if both weak refs reference to the same object. @param rObj another weak ref @return true, if both weak refs reference to the same object. */ - inline bool SAL_CALL operator == ( const WeakReferenceHelper & rObj ) const SAL_THROW(()) + inline bool SAL_CALL operator == ( const WeakReferenceHelper & rObj ) const { return (get() == rObj.get()); } /** Gets a hard reference to the object. @return hard reference or null, if the weakly referenced interface has gone */ - ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL get() const SAL_THROW(()); + ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL get() const; /** Gets a hard reference to the object. @return hard reference or null, if the weakly referenced interface has gone */ - inline SAL_CALL operator Reference< XInterface > () const SAL_THROW(()) + inline SAL_CALL operator Reference< XInterface > () const { return get(); } /** Releases this reference. @since UDK 3.2.12 */ - void SAL_CALL clear() SAL_THROW(()); + void SAL_CALL clear(); protected: /// @cond INTERNAL @@ -121,7 +120,7 @@ class WeakReference : public WeakReferenceHelper public: /** Default ctor. Creates an empty weak reference. */ - inline WeakReference() SAL_THROW(()) + inline WeakReference() : WeakReferenceHelper() {} @@ -129,7 +128,7 @@ public: @param rRef another hard ref */ - inline WeakReference( const Reference< interface_type > & rRef ) SAL_THROW(()) + inline WeakReference( const Reference< interface_type > & rRef ) : WeakReferenceHelper( rRef ) {} @@ -143,14 +142,13 @@ public: */ WeakReference & SAL_CALL operator = ( const ::com::sun::star::uno::Reference< interface_type > & xInt ) - SAL_THROW(()) { WeakReferenceHelper::operator=(xInt); return *this; } /** Gets a hard reference to the object. @return hard reference or null, if the weakly referenced interface has gone */ - inline SAL_CALL operator Reference< interface_type > () const SAL_THROW(()) + inline SAL_CALL operator Reference< interface_type > () const { return Reference< interface_type >::query( get() ); } }; |