From da906ab93781928adc51c605825f91b16fe8dd19 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Thu, 5 Jun 2014 08:08:06 +0200 Subject: cppuhelper: remove SAL_THROW macro Change-Id: I54141071396d04e7bead56da14a665b8556ba6d2 --- include/cppuhelper/access_control.hxx | 24 +++---- include/cppuhelper/bootstrap.hxx | 7 +- include/cppuhelper/compbase.hxx | 4 +- include/cppuhelper/compbase_ex.hxx | 36 +++++----- include/cppuhelper/component.hxx | 8 +-- include/cppuhelper/component_context.hxx | 7 +- include/cppuhelper/exc_hlp.hxx | 3 +- include/cppuhelper/factory.hxx | 24 +++---- include/cppuhelper/implbase.hxx | 26 +++---- include/cppuhelper/implbase_ex.hxx | 29 +++----- include/cppuhelper/interfacecontainer.h | 112 ++++++++++++++---------------- include/cppuhelper/interfacecontainer.hxx | 10 +-- include/cppuhelper/propshlp.hxx | 73 +++++++++---------- include/cppuhelper/proptypehlp.h | 30 +++----- include/cppuhelper/proptypehlp.hxx | 11 --- include/cppuhelper/queryinterface.hxx | 12 ---- include/cppuhelper/shlib.hxx | 6 +- include/cppuhelper/typeprovider.hxx | 65 +++++++---------- include/cppuhelper/weak.hxx | 19 +++-- include/cppuhelper/weakagg.hxx | 8 +-- include/cppuhelper/weakref.hxx | 28 ++++---- 21 files changed, 220 insertions(+), 322 deletions(-) (limited to 'include') 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. forEach(.... @@ -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 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, plus 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() ); } }; -- cgit