diff options
author | Noel Grandin <noel@peralex.com> | 2014-06-05 08:16:59 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2014-06-05 08:17:52 +0200 |
commit | 0e507ae031768deceab236a41d1bbe9fb5123cea (patch) | |
tree | 34cc1626f1e8fa6d50d6edd88045be6252150f19 /include | |
parent | db246b491c1639942d9f952658d33974e9b06201 (diff) |
various: remove SAL_THROW macro
Change-Id: I9464179a736b91f5bc32eb5e5e89b3b4e3da3494
Diffstat (limited to 'include')
23 files changed, 442 insertions, 504 deletions
diff --git a/include/com/sun/star/uno/Any.h b/include/com/sun/star/uno/Any.h index ca22957c1823..67374e5acd0f 100644 --- a/include/com/sun/star/uno/Any.h +++ b/include/com/sun/star/uno/Any.h @@ -48,19 +48,19 @@ class SAL_WARN_UNUSED Any : public uno_Any 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 /** Default constructor: Any holds no value; its type is void. */ - inline Any() SAL_THROW(()); + inline Any(); /** Templated ctor. Sets a copy of the given value. @@ -75,51 +75,51 @@ public: @param rAny another any */ - inline Any( const Any & rAny ) SAL_THROW(()); + inline Any( const Any & rAny ); /** Constructor: Sets a copy of the given data. @param pData_ value @param rType type of value */ - inline Any( const void * pData_, const Type & rType ) SAL_THROW(()); + inline Any( const void * pData_, const Type & rType ); /** Constructor: Sets a copy of the given data. @param pData_ value @param pTypeDescr type of value */ - inline Any( const void * pData_, typelib_TypeDescription * pTypeDescr ) SAL_THROW(()); + inline Any( const void * pData_, typelib_TypeDescription * pTypeDescr ); /** Constructor: Sets a copy of the given data. @param pData_ value @param pType type of value */ - inline Any( const void * pData_, typelib_TypeDescriptionReference * pType ) SAL_THROW(()); + inline Any( const void * pData_, typelib_TypeDescriptionReference * pType ); /** Destructor: Destructs any content and frees memory. */ - inline ~Any() SAL_THROW(()); + inline ~Any(); /** Assignment operator: Sets the value of the given any. @param rAny another any (right side) @return this any */ - inline Any & SAL_CALL operator = ( const Any & rAny ) SAL_THROW(()); + inline Any & SAL_CALL operator = ( const Any & rAny ); /** Gets the type of the set value. @return a Type object of the set value */ - inline const Type & SAL_CALL getValueType() const SAL_THROW(()) + inline const Type & SAL_CALL getValueType() const { return * reinterpret_cast< const Type * >( &pType ); } /** Gets the type of the set value. @return the unacquired type description reference of the set value */ - inline typelib_TypeDescriptionReference * SAL_CALL getValueTypeRef() const SAL_THROW(()) + inline typelib_TypeDescriptionReference * SAL_CALL getValueTypeRef() const { return pType; } /** Gets the type description of the set value. Provides ownership of the type description! @@ -127,34 +127,34 @@ public: @param ppTypeDescr a pointer to type description pointer */ - inline void SAL_CALL getValueTypeDescription( typelib_TypeDescription ** ppTypeDescr ) const SAL_THROW(()) + inline void SAL_CALL getValueTypeDescription( typelib_TypeDescription ** ppTypeDescr ) const { ::typelib_typedescriptionreference_getDescription( ppTypeDescr, pType ); } /** Gets the type class of the set value. @return the type class of the set value */ - inline TypeClass SAL_CALL getValueTypeClass() const SAL_THROW(()) + inline TypeClass SAL_CALL getValueTypeClass() const { return (TypeClass)pType->eTypeClass; } /** Gets the type name of the set value. @return the type name of the set value */ - inline ::rtl::OUString SAL_CALL getValueTypeName() const SAL_THROW(()); + inline ::rtl::OUString SAL_CALL getValueTypeName() const; /** Tests if any contains a value. @return true if any has a value, false otherwise */ - inline bool SAL_CALL hasValue() const SAL_THROW(()) + inline bool SAL_CALL hasValue() const { return (typelib_TypeClass_VOID != pType->eTypeClass); } /** Gets a pointer to the set value. @return a pointer to the set value */ - inline const void * SAL_CALL getValue() const SAL_THROW(()) + inline const void * SAL_CALL getValue() const { return pData; } /** Provides a value of specified type, so you can easily write e.g. @@ -178,26 +178,26 @@ public: @param pData_ pointer to value @param rType type of value */ - inline void SAL_CALL setValue( const void * pData_, const Type & rType ) SAL_THROW(()); + inline void SAL_CALL setValue( const void * pData_, const Type & rType ); /** Sets a value. If the any already contains a value, that value will be destructed and its memory freed. @param pData_ pointer to value @param pType type of value */ - inline void SAL_CALL setValue( const void * pData_, typelib_TypeDescriptionReference * pType ) SAL_THROW(()); + inline void SAL_CALL setValue( const void * pData_, typelib_TypeDescriptionReference * pType ); /** Sets a value. If the any already contains a value, that value will be destructed and its memory freed. @param pData_ pointer to value @param pTypeDescr type description of value */ - inline void SAL_CALL setValue( const void * pData_, typelib_TypeDescription * pTypeDescr ) SAL_THROW(()); + inline void SAL_CALL setValue( const void * pData_, typelib_TypeDescription * pTypeDescr ); /** Clears this any. If the any already contains a value, that value will be destructed and its memory freed. After this has been called, the any does not contain a value. */ - inline void SAL_CALL clear() SAL_THROW(()); + inline void SAL_CALL clear(); /** Tests whether this any is extractable to a value of given type. Widening conversion without data loss is taken into account. @@ -205,7 +205,7 @@ public: @param rType destination type @return true if this any is extractable to value of given type (e.g. using >>= operator) */ - inline bool SAL_CALL isExtractableTo( const Type & rType ) const SAL_THROW(()); + inline bool SAL_CALL isExtractableTo( const Type & rType ) const; /** Tests whether this any can provide a value of specified type. Widening conversion without data loss is taken into account. @@ -222,14 +222,14 @@ public: @param rAny another any (right side) @return true if both any contains equal values */ - inline bool SAL_CALL operator == ( const Any & rAny ) const SAL_THROW(()); + inline bool SAL_CALL operator == ( const Any & rAny ) const; /** Unequality operator: compares two anys. The values need not be of equal type, e.g. a short integer is compared to a long integer. @param rAny another any (right side) @return true if both any contains unequal values */ - inline bool SAL_CALL operator != ( const Any & rAny ) const SAL_THROW(()); + inline bool SAL_CALL operator != ( const Any & rAny ) const; private: /// @cond INTERNAL @@ -251,11 +251,11 @@ template<> bool Any::has<sal_uInt16>() const SAL_DELETED_FUNCTION; @return an any */ template< class C > -inline Any SAL_CALL makeAny( const C & value ) SAL_THROW(()); +inline Any SAL_CALL makeAny( const C & value ); // additionally specialized for C++ bool template<> -inline Any SAL_CALL makeAny( bool const & value ) SAL_THROW(()); +inline Any SAL_CALL makeAny( bool const & value ); class BaseReference; class Type; @@ -267,12 +267,11 @@ class Type; @param value source value (right side) */ template< class C > -inline void SAL_CALL operator <<= ( Any & rAny, const C & value ) SAL_THROW(()); +inline void SAL_CALL operator <<= ( Any & rAny, const C & value ); // additionally for C++ bool: template<> -inline void SAL_CALL operator <<= ( Any & rAny, bool const & value ) - SAL_THROW(()); +inline void SAL_CALL operator <<= ( Any & rAny, bool const & value ); /** Template binary >>= operator to assign a value from an any. If the any does not contain a value that can be assigned without data loss, then this @@ -284,7 +283,7 @@ inline void SAL_CALL operator <<= ( Any & rAny, bool const & value ) @return true if assignment was possible without data loss */ template< class C > -inline bool SAL_CALL operator >>= ( const Any & rAny, C & value ) SAL_THROW(()); +inline bool SAL_CALL operator >>= ( const Any & rAny, C & value ); /** Template equality operator: compares set value of left side any to right side value. The values need not be of equal type, e.g. a short integer is compared to a long integer. @@ -297,7 +296,7 @@ inline bool SAL_CALL operator >>= ( const Any & rAny, C & value ) SAL_THROW(()); @return true if values are equal, false otherwise */ template< class C > -inline bool SAL_CALL operator == ( const Any & rAny, const C & value ) SAL_THROW(()); +inline bool SAL_CALL operator == ( const Any & rAny, const C & value ); /** Template unequality operator: compares set value of left side any to right side value. The values need not be of equal type, e.g. a short integer is compared to a long integer. This operator can be implemented as template member function, if all supported compilers @@ -309,60 +308,58 @@ inline bool SAL_CALL operator == ( const Any & rAny, const C & value ) SAL_THROW @return true if values are unequal, false otherwise */ template< class C > -inline bool SAL_CALL operator != ( const Any & rAny, const C & value ) SAL_THROW(()); +inline bool SAL_CALL operator != ( const Any & rAny, const C & value ); // additional specialized >>= and == operators // bool template<> -inline bool SAL_CALL operator >>= ( const Any & rAny, sal_Bool & value ) SAL_THROW(()); +inline bool SAL_CALL operator >>= ( const Any & rAny, sal_Bool & value ); template<> -inline bool SAL_CALL operator == ( const Any & rAny, const sal_Bool & value ) SAL_THROW(()); +inline bool SAL_CALL operator == ( const Any & rAny, const sal_Bool & value ); template<> -inline bool SAL_CALL operator >>= ( Any const & rAny, bool & value ) - SAL_THROW(()); +inline bool SAL_CALL operator >>= ( Any const & rAny, bool & value ); template<> -inline bool SAL_CALL operator == ( Any const & rAny, bool const & value ) - SAL_THROW(()); +inline bool SAL_CALL operator == ( Any const & rAny, bool const & value ); // byte template<> -inline bool SAL_CALL operator >>= ( const Any & rAny, sal_Int8 & value ) SAL_THROW(()); +inline bool SAL_CALL operator >>= ( const Any & rAny, sal_Int8 & value ); // short template<> -inline bool SAL_CALL operator >>= ( const Any & rAny, sal_Int16 & value ) SAL_THROW(()); +inline bool SAL_CALL operator >>= ( const Any & rAny, sal_Int16 & value ); template<> -inline bool SAL_CALL operator >>= ( const Any & rAny, sal_uInt16 & value ) SAL_THROW(()); +inline bool SAL_CALL operator >>= ( const Any & rAny, sal_uInt16 & value ); // long template<> -inline bool SAL_CALL operator >>= ( const Any & rAny, sal_Int32 & value ) SAL_THROW(()); +inline bool SAL_CALL operator >>= ( const Any & rAny, sal_Int32 & value ); template<> -inline bool SAL_CALL operator >>= ( const Any & rAny, sal_uInt32 & value ) SAL_THROW(()); +inline bool SAL_CALL operator >>= ( const Any & rAny, sal_uInt32 & value ); // hyper template<> -inline bool SAL_CALL operator >>= ( const Any & rAny, sal_Int64 & value ) SAL_THROW(()); +inline bool SAL_CALL operator >>= ( const Any & rAny, sal_Int64 & value ); template<> -inline bool SAL_CALL operator >>= ( const Any & rAny, sal_uInt64 & value ) SAL_THROW(()); +inline bool SAL_CALL operator >>= ( const Any & rAny, sal_uInt64 & value ); // float template<> -inline bool SAL_CALL operator >>= ( const Any & rAny, float & value ) SAL_THROW(()); +inline bool SAL_CALL operator >>= ( const Any & rAny, float & value ); // double template<> -inline bool SAL_CALL operator >>= ( const Any & rAny, double & value ) SAL_THROW(()); +inline bool SAL_CALL operator >>= ( const Any & rAny, double & value ); // string template<> -inline bool SAL_CALL operator >>= ( const Any & rAny, ::rtl::OUString & value ) SAL_THROW(()); +inline bool SAL_CALL operator >>= ( const Any & rAny, ::rtl::OUString & value ); template<> -inline bool SAL_CALL operator == ( const Any & rAny, const ::rtl::OUString & value ) SAL_THROW(()); +inline bool SAL_CALL operator == ( const Any & rAny, const ::rtl::OUString & value ); // type template<> -inline bool SAL_CALL operator >>= ( const Any & rAny, Type & value ) SAL_THROW(()); +inline bool SAL_CALL operator >>= ( const Any & rAny, Type & value ); template<> -inline bool SAL_CALL operator == ( const Any & rAny, const Type & value ) SAL_THROW(()); +inline bool SAL_CALL operator == ( const Any & rAny, const Type & value ); // any template<> -inline bool SAL_CALL operator >>= ( const Any & rAny, Any & value ) SAL_THROW(()); +inline bool SAL_CALL operator >>= ( const Any & rAny, Any & value ); // interface template<> -inline bool SAL_CALL operator == ( const Any & rAny, const BaseReference & value ) SAL_THROW(()); +inline bool SAL_CALL operator == ( const Any & rAny, const BaseReference & value ); } } @@ -378,7 +375,7 @@ inline bool SAL_CALL operator == ( const Any & rAny, const BaseReference & value @return type of IDL type any */ -inline const ::com::sun::star::uno::Type & SAL_CALL getCppuType( SAL_UNUSED_PARAMETER const ::com::sun::star::uno::Any * ) SAL_THROW(()) +inline const ::com::sun::star::uno::Type & SAL_CALL getCppuType( SAL_UNUSED_PARAMETER const ::com::sun::star::uno::Any * ) { return ::cppu::UnoType< ::com::sun::star::uno::Any >::get(); } diff --git a/include/com/sun/star/uno/Any.hxx b/include/com/sun/star/uno/Any.hxx index fa3693911c5b..edb0da42297b 100644 --- a/include/com/sun/star/uno/Any.hxx +++ b/include/com/sun/star/uno/Any.hxx @@ -43,7 +43,7 @@ namespace uno { -inline Any::Any() SAL_THROW(()) +inline Any::Any() { ::uno_any_construct( this, 0, 0, (uno_AcquireFunc)cpp_acquire ); } @@ -67,37 +67,37 @@ inline Any::Any( bool value ) } -inline Any::Any( const Any & rAny ) SAL_THROW(()) +inline Any::Any( const Any & rAny ) { ::uno_type_any_construct( this, rAny.pData, rAny.pType, (uno_AcquireFunc)cpp_acquire ); } -inline Any::Any( const void * pData_, const Type & rType ) SAL_THROW(()) +inline Any::Any( const void * pData_, const Type & rType ) { ::uno_type_any_construct( this, const_cast< void * >( pData_ ), rType.getTypeLibType(), (uno_AcquireFunc)cpp_acquire ); } -inline Any::Any( const void * pData_, typelib_TypeDescription * pTypeDescr ) SAL_THROW(()) +inline Any::Any( const void * pData_, typelib_TypeDescription * pTypeDescr ) { ::uno_any_construct( this, const_cast< void * >( pData_ ), pTypeDescr, (uno_AcquireFunc)cpp_acquire ); } -inline Any::Any( const void * pData_, typelib_TypeDescriptionReference * pType_ ) SAL_THROW(()) +inline Any::Any( const void * pData_, typelib_TypeDescriptionReference * pType_ ) { ::uno_type_any_construct( this, const_cast< void * >( pData_ ), pType_, (uno_AcquireFunc)cpp_acquire ); } -inline Any::~Any() SAL_THROW(()) +inline Any::~Any() { ::uno_any_destruct( this, (uno_ReleaseFunc)cpp_release ); } -inline Any & Any::operator = ( const Any & rAny ) SAL_THROW(()) +inline Any & Any::operator = ( const Any & rAny ) { if (this != &rAny) { @@ -108,39 +108,39 @@ inline Any & Any::operator = ( const Any & rAny ) SAL_THROW(()) return *this; } -inline ::rtl::OUString Any::getValueTypeName() const SAL_THROW(()) +inline ::rtl::OUString Any::getValueTypeName() const { return ::rtl::OUString( pType->pTypeName ); } -inline void Any::setValue( const void * pData_, const Type & rType ) SAL_THROW(()) +inline void Any::setValue( const void * pData_, const Type & rType ) { ::uno_type_any_assign( this, const_cast< void * >( pData_ ), rType.getTypeLibType(), (uno_AcquireFunc)cpp_acquire, (uno_ReleaseFunc)cpp_release ); } -inline void Any::setValue( const void * pData_, typelib_TypeDescriptionReference * pType_ ) SAL_THROW(()) +inline void Any::setValue( const void * pData_, typelib_TypeDescriptionReference * pType_ ) { ::uno_type_any_assign( this, const_cast< void * >( pData_ ), pType_, (uno_AcquireFunc)cpp_acquire, (uno_ReleaseFunc)cpp_release ); } -inline void Any::setValue( const void * pData_, typelib_TypeDescription * pTypeDescr ) SAL_THROW(()) +inline void Any::setValue( const void * pData_, typelib_TypeDescription * pTypeDescr ) { ::uno_any_assign( this, const_cast< void * >( pData_ ), pTypeDescr, (uno_AcquireFunc)cpp_acquire, (uno_ReleaseFunc)cpp_release ); } -inline void Any::clear() SAL_THROW(()) +inline void Any::clear() { ::uno_any_clear( this, (uno_ReleaseFunc)cpp_release ); } -inline bool Any::isExtractableTo( const Type & rType ) const SAL_THROW(()) +inline bool Any::isExtractableTo( const Type & rType ) const { return ::uno_type_isAssignableFromData( rType.getTypeLibType(), pData, pType, @@ -163,14 +163,14 @@ template <> bool Any::has<sal_uInt16>() const; -inline bool Any::operator == ( const Any & rAny ) const SAL_THROW(()) +inline bool Any::operator == ( const Any & rAny ) const { return ::uno_type_equalData( pData, pType, rAny.pData, rAny.pType, (uno_QueryInterfaceFunc)cpp_queryInterface, (uno_ReleaseFunc)cpp_release ); } -inline bool Any::operator != ( const Any & rAny ) const SAL_THROW(()) +inline bool Any::operator != ( const Any & rAny ) const { return (! ::uno_type_equalData( pData, pType, rAny.pData, rAny.pType, @@ -179,7 +179,7 @@ inline bool Any::operator != ( const Any & rAny ) const SAL_THROW(()) template< class C > -inline Any SAL_CALL makeAny( const C & value ) SAL_THROW(()) +inline Any SAL_CALL makeAny( const C & value ) { return Any( &value, ::cppu::getTypeFavourUnsigned(&value) ); } @@ -187,7 +187,7 @@ inline Any SAL_CALL makeAny( const C & value ) SAL_THROW(()) // additionally specialized for C++ bool template<> -inline Any SAL_CALL makeAny( bool const & value ) SAL_THROW(()) +inline Any SAL_CALL makeAny( bool const & value ) { const sal_Bool b = value; return Any( &b, ::getCppuBooleanType() ); @@ -196,7 +196,7 @@ inline Any SAL_CALL makeAny( bool const & value ) SAL_THROW(()) #ifdef RTL_FAST_STRING template< class C1, class C2 > -inline Any SAL_CALL makeAny( const rtl::OUStringConcat< C1, C2 >& value ) SAL_THROW(()) +inline Any SAL_CALL makeAny( const rtl::OUStringConcat< C1, C2 >& value ) { const rtl::OUString str( value ); return Any( &str, ::cppu::getTypeFavourUnsigned(&str) ); @@ -204,7 +204,7 @@ inline Any SAL_CALL makeAny( const rtl::OUStringConcat< C1, C2 >& value ) SAL_TH #endif template< class C > -inline void SAL_CALL operator <<= ( Any & rAny, const C & value ) SAL_THROW(()) +inline void SAL_CALL operator <<= ( Any & rAny, const C & value ) { const Type & rType = ::cppu::getTypeFavourUnsigned(&value); ::uno_type_any_assign( @@ -216,7 +216,6 @@ inline void SAL_CALL operator <<= ( Any & rAny, const C & value ) SAL_THROW(()) template<> inline void SAL_CALL operator <<= ( Any & rAny, bool const & value ) - SAL_THROW(()) { sal_Bool b = value; ::uno_type_any_assign( @@ -228,7 +227,6 @@ inline void SAL_CALL operator <<= ( Any & rAny, bool const & value ) #ifdef RTL_FAST_STRING template< class C1, class C2 > inline void SAL_CALL operator <<= ( Any & rAny, const rtl::OUStringConcat< C1, C2 >& value ) - SAL_THROW(()) { const rtl::OUString str( value ); const Type & rType = ::cppu::getTypeFavourUnsigned(&str); @@ -239,7 +237,7 @@ inline void SAL_CALL operator <<= ( Any & rAny, const rtl::OUStringConcat< C1, C #endif template< class C > -inline bool SAL_CALL operator >>= ( const Any & rAny, C & value ) SAL_THROW(()) +inline bool SAL_CALL operator >>= ( const Any & rAny, C & value ) { const Type & rType = ::cppu::getTypeFavourUnsigned(&value); return ::uno_type_assignData( @@ -252,7 +250,7 @@ inline bool SAL_CALL operator >>= ( const Any & rAny, C & value ) SAL_THROW(()) // bool template<> -inline bool SAL_CALL operator >>= ( const ::com::sun::star::uno::Any & rAny, sal_Bool & value ) SAL_THROW(()) +inline bool SAL_CALL operator >>= ( const ::com::sun::star::uno::Any & rAny, sal_Bool & value ) { if (typelib_TypeClass_BOOLEAN == rAny.pType->eTypeClass) { @@ -263,7 +261,7 @@ inline bool SAL_CALL operator >>= ( const ::com::sun::star::uno::Any & rAny, sal } template<> -inline bool SAL_CALL operator == ( const Any & rAny, const sal_Bool & value ) SAL_THROW(()) +inline bool SAL_CALL operator == ( const Any & rAny, const sal_Bool & value ) { return (typelib_TypeClass_BOOLEAN == rAny.pType->eTypeClass && (value != sal_False) == (* reinterpret_cast< const sal_Bool * >( rAny.pData ) != sal_False)); @@ -272,7 +270,6 @@ inline bool SAL_CALL operator == ( const Any & rAny, const sal_Bool & value ) SA template<> inline bool SAL_CALL operator >>= ( Any const & rAny, bool & value ) - SAL_THROW(()) { if (rAny.pType->eTypeClass == typelib_TypeClass_BOOLEAN) { @@ -286,7 +283,6 @@ inline bool SAL_CALL operator >>= ( Any const & rAny, bool & value ) template<> inline bool SAL_CALL operator == ( Any const & rAny, bool const & value ) - SAL_THROW(()) { return (rAny.pType->eTypeClass == typelib_TypeClass_BOOLEAN && (value == @@ -297,7 +293,7 @@ inline bool SAL_CALL operator == ( Any const & rAny, bool const & value ) // byte template<> -inline bool SAL_CALL operator >>= ( const ::com::sun::star::uno::Any & rAny, sal_Int8 & value ) SAL_THROW(()) +inline bool SAL_CALL operator >>= ( const ::com::sun::star::uno::Any & rAny, sal_Int8 & value ) { if (typelib_TypeClass_BYTE == rAny.pType->eTypeClass) { @@ -309,7 +305,7 @@ inline bool SAL_CALL operator >>= ( const ::com::sun::star::uno::Any & rAny, sal // short template<> -inline bool SAL_CALL operator >>= ( const Any & rAny, sal_Int16 & value ) SAL_THROW(()) +inline bool SAL_CALL operator >>= ( const Any & rAny, sal_Int16 & value ) { switch (rAny.pType->eTypeClass) { @@ -326,7 +322,7 @@ inline bool SAL_CALL operator >>= ( const Any & rAny, sal_Int16 & value ) SAL_TH } template<> -inline bool SAL_CALL operator >>= ( const Any & rAny, sal_uInt16 & value ) SAL_THROW(()) +inline bool SAL_CALL operator >>= ( const Any & rAny, sal_uInt16 & value ) { switch (rAny.pType->eTypeClass) { @@ -344,7 +340,7 @@ inline bool SAL_CALL operator >>= ( const Any & rAny, sal_uInt16 & value ) SAL_T // long template<> -inline bool SAL_CALL operator >>= ( const Any & rAny, sal_Int32 & value ) SAL_THROW(()) +inline bool SAL_CALL operator >>= ( const Any & rAny, sal_Int32 & value ) { switch (rAny.pType->eTypeClass) { @@ -367,7 +363,7 @@ inline bool SAL_CALL operator >>= ( const Any & rAny, sal_Int32 & value ) SAL_TH } template<> -inline bool SAL_CALL operator >>= ( const Any & rAny, sal_uInt32 & value ) SAL_THROW(()) +inline bool SAL_CALL operator >>= ( const Any & rAny, sal_uInt32 & value ) { switch (rAny.pType->eTypeClass) { @@ -391,7 +387,7 @@ inline bool SAL_CALL operator >>= ( const Any & rAny, sal_uInt32 & value ) SAL_T // hyper template<> -inline bool SAL_CALL operator >>= ( const Any & rAny, sal_Int64 & value ) SAL_THROW(()) +inline bool SAL_CALL operator >>= ( const Any & rAny, sal_Int64 & value ) { switch (rAny.pType->eTypeClass) { @@ -420,7 +416,7 @@ inline bool SAL_CALL operator >>= ( const Any & rAny, sal_Int64 & value ) SAL_TH } template<> -inline bool SAL_CALL operator >>= ( const Any & rAny, sal_uInt64 & value ) SAL_THROW(()) +inline bool SAL_CALL operator >>= ( const Any & rAny, sal_uInt64 & value ) { switch (rAny.pType->eTypeClass) { @@ -450,7 +446,7 @@ inline bool SAL_CALL operator >>= ( const Any & rAny, sal_uInt64 & value ) SAL_T // float template<> -inline bool SAL_CALL operator >>= ( const Any & rAny, float & value ) SAL_THROW(()) +inline bool SAL_CALL operator >>= ( const Any & rAny, float & value ) { switch (rAny.pType->eTypeClass) { @@ -473,7 +469,7 @@ inline bool SAL_CALL operator >>= ( const Any & rAny, float & value ) SAL_THROW( // double template<> -inline bool SAL_CALL operator >>= ( const Any & rAny, double & value ) SAL_THROW(()) +inline bool SAL_CALL operator >>= ( const Any & rAny, double & value ) { switch (rAny.pType->eTypeClass) { @@ -505,7 +501,7 @@ inline bool SAL_CALL operator >>= ( const Any & rAny, double & value ) SAL_THROW // string template<> -inline bool SAL_CALL operator >>= ( const Any & rAny, ::rtl::OUString & value ) SAL_THROW(()) +inline bool SAL_CALL operator >>= ( const Any & rAny, ::rtl::OUString & value ) { if (typelib_TypeClass_STRING == rAny.pType->eTypeClass) { @@ -516,7 +512,7 @@ inline bool SAL_CALL operator >>= ( const Any & rAny, ::rtl::OUString & value ) } template<> -inline bool SAL_CALL operator == ( const Any & rAny, const ::rtl::OUString & value ) SAL_THROW(()) +inline bool SAL_CALL operator == ( const Any & rAny, const ::rtl::OUString & value ) { return (typelib_TypeClass_STRING == rAny.pType->eTypeClass && value.equals( * reinterpret_cast< const ::rtl::OUString * >( rAny.pData ) )); @@ -524,7 +520,7 @@ inline bool SAL_CALL operator == ( const Any & rAny, const ::rtl::OUString & val // type template<> -inline bool SAL_CALL operator >>= ( const Any & rAny, Type & value ) SAL_THROW(()) +inline bool SAL_CALL operator >>= ( const Any & rAny, Type & value ) { if (typelib_TypeClass_TYPE == rAny.pType->eTypeClass) { @@ -535,7 +531,7 @@ inline bool SAL_CALL operator >>= ( const Any & rAny, Type & value ) SAL_THROW(( } template<> -inline bool SAL_CALL operator == ( const Any & rAny, const Type & value ) SAL_THROW(()) +inline bool SAL_CALL operator == ( const Any & rAny, const Type & value ) { return (typelib_TypeClass_TYPE == rAny.pType->eTypeClass && value.equals( * reinterpret_cast< const Type * >( rAny.pData ) )); @@ -543,7 +539,7 @@ inline bool SAL_CALL operator == ( const Any & rAny, const Type & value ) SAL_TH // any template<> -inline bool SAL_CALL operator >>= ( const Any & rAny, Any & value ) SAL_THROW(()) +inline bool SAL_CALL operator >>= ( const Any & rAny, Any & value ) { if (&rAny != &value) { @@ -556,7 +552,7 @@ inline bool SAL_CALL operator >>= ( const Any & rAny, Any & value ) SAL_THROW(() // interface template<> -inline bool SAL_CALL operator == ( const Any & rAny, const BaseReference & value ) SAL_THROW(()) +inline bool SAL_CALL operator == ( const Any & rAny, const BaseReference & value ) { if (typelib_TypeClass_INTERFACE == rAny.pType->eTypeClass) { @@ -568,7 +564,7 @@ inline bool SAL_CALL operator == ( const Any & rAny, const BaseReference & value // operator to compare to an any. template< class C > -inline bool SAL_CALL operator == ( const Any & rAny, const C & value ) SAL_THROW(()) +inline bool SAL_CALL operator == ( const Any & rAny, const C & value ) { const Type & rType = ::cppu::getTypeFavourUnsigned(&value); return ::uno_type_equalData( @@ -579,7 +575,7 @@ inline bool SAL_CALL operator == ( const Any & rAny, const C & value ) SAL_THROW // operator to compare to an any. may use specialized operators ==. template< class C > -inline bool SAL_CALL operator != ( const Any & rAny, const C & value ) SAL_THROW(()) +inline bool SAL_CALL operator != ( const Any & rAny, const C & value ) { return (! operator == ( rAny, value )); } diff --git a/include/com/sun/star/uno/Reference.h b/include/com/sun/star/uno/Reference.h index b1299fd42ba8..3b721933579c 100644 --- a/include/com/sun/star/uno/Reference.h +++ b/include/com/sun/star/uno/Reference.h @@ -64,8 +64,7 @@ protected: @param rType interface type @return interface of demanded type (may be null) */ - inline static XInterface * SAL_CALL iquery( XInterface * pInterface, const Type & rType ) - SAL_THROW( (RuntimeException) ); + inline static XInterface * SAL_CALL iquery( XInterface * pInterface, const Type & rType ); /** Queries given interface for type rType. Throws a RuntimeException if the demanded interface cannot be queried. @@ -73,22 +72,21 @@ protected: @param rType interface type @return interface of demanded type */ - inline static XInterface * SAL_CALL iquery_throw( XInterface * pInterface, const Type & rType ) - SAL_THROW( (RuntimeException) ); + inline static XInterface * SAL_CALL iquery_throw( XInterface * pInterface, const Type & rType ); public: /** Gets interface pointer. This call does not acquire the interface. @return UNacquired interface pointer */ - inline XInterface * SAL_CALL get() const SAL_THROW(()) + inline XInterface * SAL_CALL get() const { return _pInterface; } /** Checks if reference is null. @return true if reference acquires an interface, i.e. true if it is not null */ - inline bool SAL_CALL is() const SAL_THROW(()) + inline bool SAL_CALL is() const { return (0 != _pInterface); } /** Equality operator: compares two interfaces @@ -97,14 +95,14 @@ public: @param pInterface another interface @return true if both references are null or refer to the same object, false otherwise */ - inline bool SAL_CALL operator == ( XInterface * pInterface ) const SAL_THROW(()); + inline bool SAL_CALL operator == ( XInterface * pInterface ) const; /** Unequality operator: compares two interfaces Checks if both references are null or refer to the same object. @param pInterface another interface @return false if both references are null or refer to the same object, true otherwise */ - inline bool SAL_CALL operator != ( XInterface * pInterface ) const SAL_THROW(()); + inline bool SAL_CALL operator != ( XInterface * pInterface ) const; /** Equality operator: compares two interfaces Checks if both references are null or refer to the same object. @@ -112,21 +110,21 @@ public: @param rRef another reference @return true if both references are null or refer to the same object, false otherwise */ - inline bool SAL_CALL operator == ( const BaseReference & rRef ) const SAL_THROW(()); + inline bool SAL_CALL operator == ( const BaseReference & rRef ) const; /** Unequality operator: compares two interfaces Checks if both references are null or refer to the same object. @param rRef another reference @return false if both references are null or refer to the same object, true otherwise */ - inline bool SAL_CALL operator != ( const BaseReference & rRef ) const SAL_THROW(()); + inline bool SAL_CALL operator != ( const BaseReference & rRef ) const; /** Needed by some STL containers. @param rRef another reference @return true, if this reference is less than rRef */ - inline bool SAL_CALL operator < ( const BaseReference & rRef ) const SAL_THROW(()); + inline bool SAL_CALL operator < ( const BaseReference & rRef ) const; }; /** Enum defining UNO_QUERY for implicit interface query. @@ -219,23 +217,20 @@ class Reference : public BaseReference @param pInterface interface pointer @return interface of demanded type (may be null) */ - inline static XInterface * SAL_CALL iquery( XInterface * pInterface ) - SAL_THROW( (RuntimeException) ); + inline static XInterface * SAL_CALL iquery( XInterface * pInterface ); /** Queries given interface for type interface_type. Throws a RuntimeException if the demanded interface cannot be queried. @param pInterface interface pointer @return interface of demanded type */ - inline static XInterface * SAL_CALL iquery_throw( XInterface * pInterface ) - SAL_THROW( (RuntimeException) ); + inline static XInterface * SAL_CALL iquery_throw( XInterface * pInterface ); /** Returns the given interface if it is not <NULL/>, throws a RuntimeException otherwise. @param pInterface interface pointer @return pInterface */ - inline static interface_type * SAL_CALL iset_throw( interface_type * pInterface ) - SAL_THROW( (RuntimeException) ); + inline static interface_type * SAL_CALL iset_throw( interface_type * pInterface ); /** Cast from an "interface pointer" (e.g., BaseReference::_pInterface) to a pointer to this interface_type. @@ -270,29 +265,29 @@ class Reference : public BaseReference 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 /** Destructor: Releases interface if set. */ - inline ~Reference() SAL_THROW(()); + inline ~Reference(); /** Default Constructor: Sets null reference. */ - inline Reference() SAL_THROW(()); + inline Reference(); /** Copy constructor: Copies interface reference. @param rRef another reference */ - inline Reference( const Reference< interface_type > & rRef ) SAL_THROW(()); + inline Reference( const Reference< interface_type > & rRef ); /** Up-casting conversion constructor: Copies interface reference. @@ -305,21 +300,20 @@ public: template< class derived_type > inline Reference( const Reference< derived_type > & rRef, - typename detail::UpCast< interface_type, derived_type >::t = 0 ) - SAL_THROW(()); + typename detail::UpCast< interface_type, derived_type >::t = 0 ); /** Constructor: Sets given interface pointer. @param pInterface an interface pointer */ - inline Reference( interface_type * pInterface ) SAL_THROW(()); + inline Reference( interface_type * pInterface ); /** Constructor: Sets given interface pointer without acquiring it. @param pInterface another reference @param dummy SAL_NO_ACQUIRE to force obvious distinction to other constructors */ - inline Reference( interface_type * pInterface, __sal_NoAcquire dummy) SAL_THROW(()); + inline Reference( interface_type * pInterface, __sal_NoAcquire dummy); /** Constructor: Sets given interface pointer without acquiring it. Deprecated, please use SAL_NO_ACQUIRE version. @@ -327,26 +321,26 @@ public: @param pInterface another reference @param dummy UNO_REF_NO_ACQUIRE to force obvious distinction to other constructors */ - inline Reference( interface_type * pInterface, UnoReference_NoAcquire dummy ) SAL_THROW(()); + inline Reference( interface_type * pInterface, UnoReference_NoAcquire dummy ); /** Constructor: Queries given interface for reference interface type (interface_type). @param rRef another reference @param dummy UNO_QUERY to force obvious distinction to other constructors */ - inline Reference( const BaseReference & rRef, UnoReference_Query dummy ) SAL_THROW( (RuntimeException) ); + inline Reference( const BaseReference & rRef, UnoReference_Query dummy ); /** Constructor: Queries given interface for reference interface type (interface_type). @param pInterface an interface pointer @param dummy UNO_QUERY to force obvious distinction to other constructors */ - inline Reference( XInterface * pInterface, UnoReference_Query dummy) SAL_THROW( (RuntimeException) ); + inline Reference( XInterface * pInterface, UnoReference_Query dummy); /** Constructor: Queries given any for reference interface type (interface_type). @param rAny an any @param dummy UNO_QUERY to force obvious distinction to other constructors */ - inline Reference( const Any & rAny, UnoReference_Query dummy) SAL_THROW( (RuntimeException) ); + inline Reference( const Any & rAny, UnoReference_Query dummy); /** Constructor: Queries given interface for reference interface type (interface_type). Throws a RuntimeException if the demanded interface cannot be queried. @@ -354,7 +348,7 @@ public: @param dummy UNO_QUERY_THROW to force obvious distinction to other constructors */ - inline Reference( const BaseReference & rRef, UnoReference_QueryThrow dummy ) SAL_THROW( (RuntimeException) ); + inline Reference( const BaseReference & rRef, UnoReference_QueryThrow dummy ); /** Constructor: Queries given interface for reference interface type (interface_type). Throws a RuntimeException if the demanded interface cannot be queried. @@ -362,7 +356,7 @@ public: @param dummy UNO_QUERY_THROW to force obvious distinction to other constructors */ - inline Reference( XInterface * pInterface, UnoReference_QueryThrow dummy ) SAL_THROW( (RuntimeException) ); + inline Reference( XInterface * pInterface, UnoReference_QueryThrow dummy ); /** Constructor: Queries given any for reference interface type (interface_type). Throws a RuntimeException if the demanded interface cannot be queried. @@ -370,7 +364,7 @@ public: @param dummy UNO_QUERY_THROW to force obvious distinction to other constructors */ - inline Reference( const Any & rAny, UnoReference_QueryThrow dummy ) SAL_THROW( (RuntimeException) ); + inline Reference( const Any & rAny, UnoReference_QueryThrow dummy ); /** Constructor: assigns from the given interface of the same type. Throws a RuntimeException if the source interface is NULL. @@ -379,7 +373,7 @@ public: @since UDK 3.2.8 */ - inline Reference( const Reference< interface_type > & rRef, UnoReference_SetThrow dummy ) SAL_THROW( (RuntimeException) ); + inline Reference( const Reference< interface_type > & rRef, UnoReference_SetThrow dummy ); /** Constructor: assigns from the given interface of the same type. Throws a RuntimeException if the source interface is NULL. @@ -388,45 +382,45 @@ public: @since UDK 3.2.8 */ - inline Reference( interface_type * pInterface, UnoReference_SetThrow dummy ) SAL_THROW( (RuntimeException) ); + inline Reference( interface_type * pInterface, UnoReference_SetThrow dummy ); /** Cast operator to Reference< XInterface >: Reference objects are binary compatible and any interface must be derived from com.sun.star.uno.XInterface. This a useful direct cast possibility. */ - inline SAL_CALL operator const Reference< XInterface > & () const SAL_THROW(()) + inline SAL_CALL operator const Reference< XInterface > & () const { return * reinterpret_cast< const Reference< XInterface > * >( this ); } /** Dereference operator: Used to call interface methods. @return UNacquired interface pointer */ - inline interface_type * SAL_CALL operator -> () const SAL_THROW(()) + inline interface_type * SAL_CALL operator -> () const { return castFromXInterface(_pInterface); } /** Gets interface pointer. This call does not acquire the interface. @return UNacquired interface pointer */ - inline interface_type * SAL_CALL get() const SAL_THROW(()) + inline interface_type * SAL_CALL get() const { return castFromXInterface(_pInterface); } /** Clears reference, i.e. releases interface. Reference is null after clear() call. */ - inline void SAL_CALL clear() SAL_THROW(()); + inline void SAL_CALL clear(); /** Sets the given interface. An interface already set will be released. @param rRef another reference @return true, if non-null interface was set */ - inline bool SAL_CALL set( const Reference< interface_type > & rRef ) SAL_THROW(()); + inline bool SAL_CALL set( const Reference< interface_type > & rRef ); /** Sets the given interface. An interface already set will be released. @param pInterface another interface @return true, if non-null interface was set */ - inline bool SAL_CALL set( interface_type * pInterface ) SAL_THROW(()); + inline bool SAL_CALL set( interface_type * pInterface ); /** Sets interface pointer without acquiring it. An interface already set will be released. @@ -434,7 +428,7 @@ public: @param dummy SAL_NO_ACQUIRE to force obvious distinction to set methods @return true, if non-null interface was set */ - inline bool SAL_CALL set( interface_type * pInterface, __sal_NoAcquire dummy) SAL_THROW(()); + inline bool SAL_CALL set( interface_type * pInterface, __sal_NoAcquire dummy); /** Sets interface pointer without acquiring it. An interface already set will be released. Deprecated, please use SAL_NO_ACQUIRE version. @@ -443,7 +437,7 @@ public: @param dummy UNO_REF_NO_ACQUIRE to force obvious distinction to set methods @return true, if non-null interface was set */ - inline bool SAL_CALL set( interface_type * pInterface, UnoReference_NoAcquire dummy) SAL_THROW(()); + inline bool SAL_CALL set( interface_type * pInterface, UnoReference_NoAcquire dummy); /** Queries given interface for reference interface type (interface_type) and sets it. An interface already set will be released. @@ -452,7 +446,7 @@ public: @param dummy UNO_QUERY to force obvious distinction to set methods @return true, if non-null interface was set */ - inline bool SAL_CALL set( XInterface * pInterface, UnoReference_Query dummy ) SAL_THROW( (RuntimeException) ); + inline bool SAL_CALL set( XInterface * pInterface, UnoReference_Query dummy ); /** Queries given interface for reference interface type (interface_type) and sets it. An interface already set will be released. @@ -460,7 +454,7 @@ public: @param dummy UNO_QUERY to force obvious distinction to set methods @return true, if non-null interface was set */ - inline bool SAL_CALL set( const BaseReference & rRef, UnoReference_Query dummy) SAL_THROW( (RuntimeException) ); + inline bool SAL_CALL set( const BaseReference & rRef, UnoReference_Query dummy); /** Queries given any for reference interface type (interface_type) and sets it. An interface already set will be released. @@ -483,7 +477,7 @@ public: @param dummy UNO_QUERY_THROW to force obvious distinction to set methods */ - inline void SAL_CALL set( XInterface * pInterface, UnoReference_QueryThrow dummy ) SAL_THROW( (RuntimeException) ); + inline void SAL_CALL set( XInterface * pInterface, UnoReference_QueryThrow dummy ); /** Queries given interface for reference interface type (interface_type) and sets it. An interface already set will be released. Throws a RuntimeException if the demanded interface cannot be set. @@ -492,7 +486,7 @@ public: @param dummy UNO_QUERY_THROW to force obvious distinction to set methods */ - inline void SAL_CALL set( const BaseReference & rRef, UnoReference_QueryThrow dummy ) SAL_THROW( (RuntimeException) ); + inline void SAL_CALL set( const BaseReference & rRef, UnoReference_QueryThrow dummy ); /** Queries given any for reference interface type (interface_type) and sets it. An interface already set will be released. @@ -513,7 +507,7 @@ public: @since UDK 3.2.8 */ - inline void SAL_CALL set( interface_type * pInterface, UnoReference_SetThrow dummy) SAL_THROW( (RuntimeException) ); + inline void SAL_CALL set( interface_type * pInterface, UnoReference_SetThrow dummy); /** sets the given interface An interface already set will be released. Throws a RuntimeException if the source interface is @b NULL. @@ -523,7 +517,7 @@ public: @since UDK 3.2.8 */ - inline void SAL_CALL set( const Reference< interface_type > & rRef, UnoReference_SetThrow dummy) SAL_THROW( (RuntimeException) ); + inline void SAL_CALL set( const Reference< interface_type > & rRef, UnoReference_SetThrow dummy); /** Assignment operator: Acquires given interface pointer and sets reference. @@ -532,27 +526,27 @@ public: @param pInterface an interface pointer @return this reference */ - inline Reference< interface_type > & SAL_CALL operator = ( interface_type * pInterface ) SAL_THROW(()); + inline Reference< interface_type > & SAL_CALL operator = ( interface_type * pInterface ); /** Assignment operator: Acquires given interface reference and sets reference. An interface already set will be released. @param rRef an interface reference @return this reference */ - inline Reference< interface_type > & SAL_CALL operator = ( const Reference< interface_type > & rRef ) SAL_THROW(()); + inline Reference< interface_type > & SAL_CALL operator = ( const Reference< interface_type > & rRef ); /** Queries given interface reference for type interface_type. @param rRef interface reference @return interface reference of demanded type (may be null) */ - inline static Reference< interface_type > SAL_CALL query( const BaseReference & rRef ) SAL_THROW( (RuntimeException) ); + inline static Reference< interface_type > SAL_CALL query( const BaseReference & rRef ); /** Queries given interface for type interface_type. @param pInterface interface pointer @return interface reference of demanded type (may be null) */ - inline static Reference< interface_type > SAL_CALL query( XInterface * pInterface ) SAL_THROW( (RuntimeException) ); + inline static Reference< interface_type > SAL_CALL query( XInterface * pInterface ); }; /// @cond INTERNAL diff --git a/include/com/sun/star/uno/Reference.hxx b/include/com/sun/star/uno/Reference.hxx index c26550273abc..69ea87b40c03 100644 --- a/include/com/sun/star/uno/Reference.hxx +++ b/include/com/sun/star/uno/Reference.hxx @@ -36,7 +36,6 @@ namespace uno inline XInterface * BaseReference::iquery( XInterface * pInterface, const Type & rType ) - SAL_THROW( (RuntimeException) ) { if (pInterface) { @@ -53,7 +52,7 @@ inline XInterface * BaseReference::iquery( template< class interface_type > inline XInterface * Reference< interface_type >::iquery( - XInterface * pInterface ) SAL_THROW( (RuntimeException) ) + XInterface * pInterface ) { return BaseReference::iquery(pInterface, interface_type::static_type()); } @@ -66,7 +65,6 @@ extern "C" rtl_uString * SAL_CALL cppu_unsatisfied_iset_msg( inline XInterface * BaseReference::iquery_throw( XInterface * pInterface, const Type & rType ) - SAL_THROW( (RuntimeException) ) { XInterface * pQueried = iquery( pInterface, rType ); if (pQueried) @@ -78,7 +76,7 @@ inline XInterface * BaseReference::iquery_throw( template< class interface_type > inline XInterface * Reference< interface_type >::iquery_throw( - XInterface * pInterface ) SAL_THROW( (RuntimeException) ) + XInterface * pInterface ) { return BaseReference::iquery_throw( pInterface, interface_type::static_type()); @@ -86,7 +84,7 @@ inline XInterface * Reference< interface_type >::iquery_throw( template< class interface_type > inline interface_type * Reference< interface_type >::iset_throw( - interface_type * pInterface ) SAL_THROW( (RuntimeException) ) + interface_type * pInterface ) { if (pInterface) { @@ -100,20 +98,20 @@ inline interface_type * Reference< interface_type >::iset_throw( template< class interface_type > -inline Reference< interface_type >::~Reference() SAL_THROW(()) +inline Reference< interface_type >::~Reference() { if (_pInterface) _pInterface->release(); } template< class interface_type > -inline Reference< interface_type >::Reference() SAL_THROW(()) +inline Reference< interface_type >::Reference() { _pInterface = 0; } template< class interface_type > -inline Reference< interface_type >::Reference( const Reference< interface_type > & rRef ) SAL_THROW(()) +inline Reference< interface_type >::Reference( const Reference< interface_type > & rRef ) { _pInterface = rRef._pInterface; if (_pInterface) @@ -124,7 +122,6 @@ template< class interface_type > template< class derived_type > inline Reference< interface_type >::Reference( const Reference< derived_type > & rRef, typename detail::UpCast< interface_type, derived_type >::t ) - SAL_THROW(()) { interface_type * p = rRef.get(); _pInterface = p; @@ -133,7 +130,7 @@ inline Reference< interface_type >::Reference( } template< class interface_type > -inline Reference< interface_type >::Reference( interface_type * pInterface ) SAL_THROW(()) +inline Reference< interface_type >::Reference( interface_type * pInterface ) { _pInterface = castToXInterface(pInterface); if (_pInterface) @@ -141,70 +138,70 @@ inline Reference< interface_type >::Reference( interface_type * pInterface ) SAL } template< class interface_type > -inline Reference< interface_type >::Reference( interface_type * pInterface, __sal_NoAcquire ) SAL_THROW(()) +inline Reference< interface_type >::Reference( interface_type * pInterface, __sal_NoAcquire ) { _pInterface = castToXInterface(pInterface); } template< class interface_type > -inline Reference< interface_type >::Reference( interface_type * pInterface, UnoReference_NoAcquire ) SAL_THROW(()) +inline Reference< interface_type >::Reference( interface_type * pInterface, UnoReference_NoAcquire ) { _pInterface = castToXInterface(pInterface); } template< class interface_type > -inline Reference< interface_type >::Reference( const BaseReference & rRef, UnoReference_Query ) SAL_THROW( (RuntimeException) ) +inline Reference< interface_type >::Reference( const BaseReference & rRef, UnoReference_Query ) { _pInterface = iquery( rRef.get() ); } template< class interface_type > -inline Reference< interface_type >::Reference( XInterface * pInterface, UnoReference_Query ) SAL_THROW( (RuntimeException) ) +inline Reference< interface_type >::Reference( XInterface * pInterface, UnoReference_Query ) { _pInterface = iquery( pInterface ); } template< class interface_type > -inline Reference< interface_type >::Reference( const Any & rAny, UnoReference_Query ) SAL_THROW( (RuntimeException) ) +inline Reference< interface_type >::Reference( const Any & rAny, UnoReference_Query ) { _pInterface = (typelib_TypeClass_INTERFACE == rAny.pType->eTypeClass ? iquery( static_cast< XInterface * >( rAny.pReserved ) ) : 0); } template< class interface_type > -inline Reference< interface_type >::Reference( const BaseReference & rRef, UnoReference_QueryThrow ) SAL_THROW( (RuntimeException) ) +inline Reference< interface_type >::Reference( const BaseReference & rRef, UnoReference_QueryThrow ) { _pInterface = iquery_throw( rRef.get() ); } template< class interface_type > -inline Reference< interface_type >::Reference( XInterface * pInterface, UnoReference_QueryThrow ) SAL_THROW( (RuntimeException) ) +inline Reference< interface_type >::Reference( XInterface * pInterface, UnoReference_QueryThrow ) { _pInterface = iquery_throw( pInterface ); } template< class interface_type > -inline Reference< interface_type >::Reference( const Any & rAny, UnoReference_QueryThrow ) SAL_THROW( (RuntimeException) ) +inline Reference< interface_type >::Reference( const Any & rAny, UnoReference_QueryThrow ) { _pInterface = iquery_throw( typelib_TypeClass_INTERFACE == rAny.pType->eTypeClass ? static_cast< XInterface * >( rAny.pReserved ) : 0 ); } template< class interface_type > -inline Reference< interface_type >::Reference( const Reference< interface_type > & rRef, UnoReference_SetThrow ) SAL_THROW( (RuntimeException) ) +inline Reference< interface_type >::Reference( const Reference< interface_type > & rRef, UnoReference_SetThrow ) { _pInterface = castToXInterface( iset_throw( rRef.get() ) ); } template< class interface_type > -inline Reference< interface_type >::Reference( interface_type * pInterface, UnoReference_SetThrow ) SAL_THROW( (RuntimeException) ) +inline Reference< interface_type >::Reference( interface_type * pInterface, UnoReference_SetThrow ) { _pInterface = castToXInterface( iset_throw( pInterface ) ); } template< class interface_type > -inline void Reference< interface_type >::clear() SAL_THROW(()) +inline void Reference< interface_type >::clear() { if (_pInterface) { @@ -216,7 +213,7 @@ inline void Reference< interface_type >::clear() SAL_THROW(()) template< class interface_type > inline bool Reference< interface_type >::set( - interface_type * pInterface ) SAL_THROW(()) + interface_type * pInterface ) { if (pInterface) castToXInterface(pInterface)->acquire(); @@ -229,7 +226,7 @@ inline bool Reference< interface_type >::set( template< class interface_type > inline bool Reference< interface_type >::set( - interface_type * pInterface, __sal_NoAcquire ) SAL_THROW(()) + interface_type * pInterface, __sal_NoAcquire ) { XInterface * const pOld = _pInterface; _pInterface = castToXInterface(pInterface); @@ -240,7 +237,7 @@ inline bool Reference< interface_type >::set( template< class interface_type > inline bool Reference< interface_type >::set( - interface_type * pInterface, UnoReference_NoAcquire ) SAL_THROW(()) + interface_type * pInterface, UnoReference_NoAcquire ) { return set( pInterface, SAL_NO_ACQUIRE ); } @@ -248,21 +245,21 @@ inline bool Reference< interface_type >::set( template< class interface_type > inline bool Reference< interface_type >::set( - const Reference< interface_type > & rRef ) SAL_THROW(()) + const Reference< interface_type > & rRef ) { return set( castFromXInterface( rRef._pInterface ) ); } template< class interface_type > inline bool Reference< interface_type >::set( - XInterface * pInterface, UnoReference_Query ) SAL_THROW( (RuntimeException) ) + XInterface * pInterface, UnoReference_Query ) { return set( castFromXInterface(iquery( pInterface )), SAL_NO_ACQUIRE ); } template< class interface_type > inline bool Reference< interface_type >::set( - const BaseReference & rRef, UnoReference_Query ) SAL_THROW( (RuntimeException) ) + const BaseReference & rRef, UnoReference_Query ) { return set( castFromXInterface(iquery( rRef.get() )), SAL_NO_ACQUIRE ); } @@ -283,14 +280,14 @@ inline bool Reference< interface_type >::set( template< class interface_type > inline void Reference< interface_type >::set( - XInterface * pInterface, UnoReference_QueryThrow ) SAL_THROW( (RuntimeException) ) + XInterface * pInterface, UnoReference_QueryThrow ) { set( castFromXInterface(iquery_throw( pInterface )), SAL_NO_ACQUIRE ); } template< class interface_type > inline void Reference< interface_type >::set( - const BaseReference & rRef, UnoReference_QueryThrow ) SAL_THROW( (RuntimeException) ) + const BaseReference & rRef, UnoReference_QueryThrow ) { set( castFromXInterface(iquery_throw( rRef.get() )), SAL_NO_ACQUIRE ); } @@ -309,14 +306,14 @@ inline void Reference< interface_type >::set( template< class interface_type > inline void Reference< interface_type >::set( - interface_type * pInterface, UnoReference_SetThrow ) SAL_THROW( (RuntimeException) ) + interface_type * pInterface, UnoReference_SetThrow ) { set( iset_throw( pInterface ), SAL_NO_ACQUIRE ); } template< class interface_type > inline void Reference< interface_type >::set( - const Reference< interface_type > & rRef, UnoReference_SetThrow ) SAL_THROW( (RuntimeException) ) + const Reference< interface_type > & rRef, UnoReference_SetThrow ) { set( rRef.get(), UNO_SET_THROW ); } @@ -324,7 +321,7 @@ inline void Reference< interface_type >::set( template< class interface_type > inline Reference< interface_type > & Reference< interface_type >::operator = ( - interface_type * pInterface ) SAL_THROW(()) + interface_type * pInterface ) { set( pInterface ); return *this; @@ -332,7 +329,7 @@ inline Reference< interface_type > & Reference< interface_type >::operator = ( template< class interface_type > inline Reference< interface_type > & Reference< interface_type >::operator = ( - const Reference< interface_type > & rRef ) SAL_THROW(()) + const Reference< interface_type > & rRef ) { set( castFromXInterface( rRef._pInterface ) ); return *this; @@ -341,7 +338,7 @@ inline Reference< interface_type > & Reference< interface_type >::operator = ( template< class interface_type > inline Reference< interface_type > Reference< interface_type >::query( - const BaseReference & rRef ) SAL_THROW( (RuntimeException) ) + const BaseReference & rRef ) { return Reference< interface_type >( castFromXInterface(iquery( rRef.get() )), SAL_NO_ACQUIRE ); @@ -349,7 +346,7 @@ inline Reference< interface_type > Reference< interface_type >::query( template< class interface_type > inline Reference< interface_type > Reference< interface_type >::query( - XInterface * pInterface ) SAL_THROW( (RuntimeException) ) + XInterface * pInterface ) { return Reference< interface_type >( castFromXInterface(iquery( pInterface )), SAL_NO_ACQUIRE ); @@ -358,7 +355,7 @@ inline Reference< interface_type > Reference< interface_type >::query( -inline bool BaseReference::operator == ( XInterface * pInterface ) const SAL_THROW(()) +inline bool BaseReference::operator == ( XInterface * pInterface ) const { if (_pInterface == pInterface) return true; @@ -377,7 +374,7 @@ inline bool BaseReference::operator == ( XInterface * pInterface ) const SAL_THR inline bool BaseReference::operator < ( - const BaseReference & rRef ) const SAL_THROW(()) + const BaseReference & rRef ) const { if (_pInterface == rRef._pInterface) return false; @@ -395,17 +392,17 @@ inline bool BaseReference::operator < ( } -inline bool BaseReference::operator != ( XInterface * pInterface ) const SAL_THROW(()) +inline bool BaseReference::operator != ( XInterface * pInterface ) const { return (! operator == ( pInterface )); } -inline bool BaseReference::operator == ( const BaseReference & rRef ) const SAL_THROW(()) +inline bool BaseReference::operator == ( const BaseReference & rRef ) const { return operator == ( rRef._pInterface ); } -inline bool BaseReference::operator != ( const BaseReference & rRef ) const SAL_THROW(()) +inline bool BaseReference::operator != ( const BaseReference & rRef ) const { return (! operator == ( rRef._pInterface )); } diff --git a/include/com/sun/star/uno/Sequence.h b/include/com/sun/star/uno/Sequence.h index 92bcf8a8dd34..fa2aa96f3fc9 100644 --- a/include/com/sun/star/uno/Sequence.h +++ b/include/com/sun/star/uno/Sequence.h @@ -59,16 +59,12 @@ public: // these are here to force memory de/allocation to sal lib. inline static void * SAL_CALL operator new ( ::size_t nSize ) - SAL_THROW(()) { return ::rtl_allocateMemory( nSize ); } inline static void SAL_CALL operator delete ( void * pMem ) - SAL_THROW(()) { ::rtl_freeMemory( pMem ); } inline static void * SAL_CALL operator new ( ::size_t, void * pMem ) - SAL_THROW(()) { return pMem; } inline static void SAL_CALL operator delete ( void *, void * ) - SAL_THROW(()) {} /** Static pointer to typelib type of sequence. @@ -84,13 +80,13 @@ public: /** Default constructor: Creates an empty sequence. */ - inline Sequence() SAL_THROW(()); + inline Sequence(); /** Copy constructor: Creates a copy of given sequence. @param rSeq another sequence of same type */ - inline Sequence( const Sequence< E > & rSeq ) SAL_THROW(()); + inline Sequence( const Sequence< E > & rSeq ); /** Constructor: Takes over ownership of given sequence. @@ -98,8 +94,7 @@ public: @param dummy SAL_NO_ACQUIRE to force obvious distinction to other constructors */ - inline Sequence( uno_Sequence * pSequence, __sal_NoAcquire dummy ) - SAL_THROW(()); + inline Sequence( uno_Sequence * pSequence, __sal_NoAcquire dummy ); /** Constructor: Creates a copy of given elements. @@ -117,7 +112,7 @@ public: /** Destructor: Releases sequence handle. Last handle will destruct elements and free memory. */ - inline ~Sequence() SAL_THROW(()); + inline ~Sequence(); /** Assignment operator: Acquires given sequence handle and releases previously set handle. @@ -125,14 +120,13 @@ public: @param rSeq another sequence of same type @return this sequence */ - inline Sequence< E > & SAL_CALL operator = ( const Sequence< E > & rSeq ) - SAL_THROW(()); + inline Sequence< E > & SAL_CALL operator = ( const Sequence< E > & rSeq ); /** Gets length of the sequence. @return length of sequence */ - inline sal_Int32 SAL_CALL getLength() const SAL_THROW(()) + inline sal_Int32 SAL_CALL getLength() const { return _pSequence->nElements; } /** Tests whether the sequence has elements, i.e. elements count is @@ -140,7 +134,7 @@ public: @return true, if elements count is greater than zero */ - inline bool SAL_CALL hasElements() const SAL_THROW(()) + inline bool SAL_CALL hasElements() const { return (_pSequence->nElements > 0); } /** Gets a pointer to elements array for reading. @@ -149,7 +143,7 @@ public: @return pointer to elements array */ - inline const E * SAL_CALL getConstArray() const SAL_THROW(()) + inline const E * SAL_CALL getConstArray() const { return reinterpret_cast< const E * >( _pSequence->elements ); } /** Gets a pointer to elements array for reading and writing. @@ -209,24 +203,21 @@ public: @param nIndex index @return const C++ reference to element */ - inline const E & SAL_CALL operator [] ( sal_Int32 nIndex ) const - SAL_THROW(()); + inline const E & SAL_CALL operator [] ( sal_Int32 nIndex ) const; /** Equality operator: Compares two sequences. @param rSeq another sequence of same type (right side) @return true if both sequences are equal, false otherwise */ - inline bool SAL_CALL operator == ( const Sequence< E > & rSeq ) const - SAL_THROW(()); + inline bool SAL_CALL operator == ( const Sequence< E > & rSeq ) const; /** Unequality operator: Compares two sequences. @param rSeq another sequence of same type (right side) @return false if both sequences are equal, true otherwise */ - inline bool SAL_CALL operator != ( const Sequence< E > & rSeq ) const - SAL_THROW(()); + inline bool SAL_CALL operator != ( const Sequence< E > & rSeq ) const; /** Reallocates sequence to new length. If the new length is smaller than the former, then upper elements will @@ -244,7 +235,7 @@ public: @return UNacquired sequence handle */ - inline uno_Sequence * SAL_CALL get() const SAL_THROW(()) + inline uno_Sequence * SAL_CALL get() const { return _pSequence; } }; @@ -260,7 +251,7 @@ template<> class Sequence<bool> { @return a UNO byte sequence */ inline ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL toUnoSequence( - const ::rtl::ByteSequence & rByteSequence ) SAL_THROW(()); + const ::rtl::ByteSequence & rByteSequence ); } } @@ -279,8 +270,7 @@ inline ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL toUnoSequence( */ template< class E > inline const ::com::sun::star::uno::Type & -SAL_CALL getCppuType( const ::com::sun::star::uno::Sequence< E > * ) - SAL_THROW(()); +SAL_CALL getCppuType( const ::com::sun::star::uno::Sequence< E > * ); /** Gets the meta type of IDL sequence. This function has been introduced, because one cannot get the (templated) @@ -294,8 +284,7 @@ SAL_CALL getCppuType( const ::com::sun::star::uno::Sequence< E > * ) */ template< class E > inline const ::com::sun::star::uno::Type & -SAL_CALL getCppuSequenceType( const ::com::sun::star::uno::Type & rElementType ) - SAL_THROW(()); +SAL_CALL getCppuSequenceType( const ::com::sun::star::uno::Type & rElementType ); /** Gets the meta type of IDL sequence< char >. This function has been introduced due to ambiguities with unsigned short. @@ -305,7 +294,7 @@ SAL_CALL getCppuSequenceType( const ::com::sun::star::uno::Type & rElementType ) @return type of IDL sequence< char > */ inline const ::com::sun::star::uno::Type & -SAL_CALL getCharSequenceCppuType() SAL_THROW(()); +SAL_CALL getCharSequenceCppuType(); #endif diff --git a/include/com/sun/star/uno/Sequence.hxx b/include/com/sun/star/uno/Sequence.hxx index 347953c828e2..ba3b8c123322 100644 --- a/include/com/sun/star/uno/Sequence.hxx +++ b/include/com/sun/star/uno/Sequence.hxx @@ -45,7 +45,7 @@ typelib_TypeDescriptionReference * Sequence< E >::s_pType = 0; /// @endcond template< class E > -inline Sequence< E >::Sequence() SAL_THROW(()) +inline Sequence< E >::Sequence() { const Type & rType = ::cppu::getTypeFavourUnsigned( this ); ::uno_type_sequence_construct( @@ -55,7 +55,7 @@ inline Sequence< E >::Sequence() SAL_THROW(()) } template< class E > -inline Sequence< E >::Sequence( const Sequence< E > & rSeq ) SAL_THROW(()) +inline Sequence< E >::Sequence( const Sequence< E > & rSeq ) { osl_atomic_increment( &rSeq._pSequence->nRefCount ); _pSequence = rSeq._pSequence; @@ -63,7 +63,7 @@ inline Sequence< E >::Sequence( const Sequence< E > & rSeq ) SAL_THROW(()) template< class E > inline Sequence< E >::Sequence( - uno_Sequence * pSequence, __sal_NoAcquire ) SAL_THROW(()) + uno_Sequence * pSequence, __sal_NoAcquire ) : _pSequence( pSequence ) { } @@ -93,7 +93,7 @@ inline Sequence< E >::Sequence( sal_Int32 len ) } template< class E > -inline Sequence< E >::~Sequence() SAL_THROW(()) +inline Sequence< E >::~Sequence() { const Type & rType = ::cppu::getTypeFavourUnsigned( this ); ::uno_type_destructData( @@ -101,7 +101,7 @@ inline Sequence< E >::~Sequence() SAL_THROW(()) } template< class E > -inline Sequence< E > & Sequence< E >::operator = ( const Sequence< E > & rSeq ) SAL_THROW(()) +inline Sequence< E > & Sequence< E >::operator = ( const Sequence< E > & rSeq ) { const Type & rType = ::cppu::getTypeFavourUnsigned( this ); ::uno_type_sequence_assign( @@ -111,7 +111,6 @@ inline Sequence< E > & Sequence< E >::operator = ( const Sequence< E > & rSeq ) template< class E > inline bool Sequence< E >::operator == ( const Sequence< E > & rSeq ) const - SAL_THROW(()) { if (_pSequence == rSeq._pSequence) return true; @@ -125,7 +124,6 @@ inline bool Sequence< E >::operator == ( const Sequence< E > & rSeq ) const template< class E > inline bool Sequence< E >::operator != ( const Sequence< E > & rSeq ) const - SAL_THROW(()) { return (! operator == ( rSeq )); } @@ -163,7 +161,6 @@ inline E & Sequence< E >::operator [] ( sal_Int32 nIndex ) template< class E > inline const E & Sequence< E >::operator [] ( sal_Int32 nIndex ) const - SAL_THROW(()) { // silence spurious -Werror=strict-overflow warnings from GCC 4.8.2 assert(nIndex >= 0 && static_cast<sal_uInt32>(nIndex) < static_cast<sal_uInt32>(getLength())); @@ -183,7 +180,7 @@ inline void Sequence< E >::realloc( sal_Int32 nSize ) } inline ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL toUnoSequence( - const ::rtl::ByteSequence & rByteSequence ) SAL_THROW(()) + const ::rtl::ByteSequence & rByteSequence ) { return ::com::sun::star::uno::Sequence< sal_Int8 >( * reinterpret_cast< const ::com::sun::star::uno::Sequence< sal_Int8 > * >( &rByteSequence ) ); @@ -239,7 +236,6 @@ template< class E > inline const ::com::sun::star::uno::Type & SAL_CALL getCppuType( SAL_UNUSED_PARAMETER const ::com::sun::star::uno::Sequence< E > * ) - SAL_THROW(()) { return ::cppu::getTypeFavourUnsigned( static_cast< ::com::sun::star::uno::Sequence< E > * >(0)); @@ -249,7 +245,6 @@ SAL_CALL getCppuType( template< class E > inline const ::com::sun::star::uno::Type & SAL_CALL getCppuSequenceType( const ::com::sun::star::uno::Type & rElementType ) - SAL_THROW(()) { if (! ::com::sun::star::uno::Sequence< E >::s_pType) { @@ -263,7 +258,7 @@ SAL_CALL getCppuSequenceType( const ::com::sun::star::uno::Type & rElementType ) // char sequence inline const ::com::sun::star::uno::Type & -SAL_CALL getCharSequenceCppuType() SAL_THROW(()) +SAL_CALL getCharSequenceCppuType() { static typelib_TypeDescriptionReference * s_pType_com_sun_star_uno_Sequence_Char = 0; if (! s_pType_com_sun_star_uno_Sequence_Char) diff --git a/include/com/sun/star/uno/Type.h b/include/com/sun/star/uno/Type.h index 1b3775f259fb..eb35313e1baf 100644 --- a/include/com/sun/star/uno/Type.h +++ b/include/com/sun/star/uno/Type.h @@ -61,39 +61,39 @@ class SAL_WARN_UNUSED Type 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 /** Default Constructor: Type is set to void. */ - inline Type() SAL_THROW(()); + inline Type(); /** Constructor: Type is constructed by given name and type class. @param eTypeClass type class of type @param rTypeName name of type */ - inline Type( TypeClass eTypeClass, const ::rtl::OUString & rTypeName ) SAL_THROW(()); + inline Type( TypeClass eTypeClass, const ::rtl::OUString & rTypeName ); /** Constructor: Type is constructed by given name and type class. @param eTypeClass type class of type @param pTypeName name of type */ - inline Type( TypeClass eTypeClass, const sal_Char * pTypeName ) SAL_THROW(()); + inline Type( TypeClass eTypeClass, const sal_Char * pTypeName ); /** Constructor: Type is (copy) constructed by given C type description reference. @param pType C type description reference */ - inline Type( typelib_TypeDescriptionReference * pType ) SAL_THROW(()); + inline Type( typelib_TypeDescriptionReference * pType ); /** Constructor: Type is (copy) constructed by given C type description reference without acquiring it. @@ -101,24 +101,24 @@ public: @param pType C type description reference @param dummy UNO_TYPE_NO_ACQUIRE to force obvious distinction to other constructors */ - inline Type( typelib_TypeDescriptionReference * pType, UnoType_NoAcquire dummy ) SAL_THROW(()); + inline Type( typelib_TypeDescriptionReference * pType, UnoType_NoAcquire dummy ); /** Constructor: Type is (copy) constructed by given C type description reference without acquiring it. @param pType C type description reference @param dummy SAL_NO_ACQUIRE to force obvious distinction to other constructors */ - inline Type( typelib_TypeDescriptionReference * pType, __sal_NoAcquire dummy ) SAL_THROW(()); + inline Type( typelib_TypeDescriptionReference * pType, __sal_NoAcquire dummy ); /** Copy constructor: Type is copy constructed by given type. @param rType another type */ - inline Type( const Type & rType ) SAL_THROW(()); + inline Type( const Type & rType ); /** Destructor: Releases acquired C type description reference. */ - inline ~Type() SAL_THROW(()) + inline ~Type() { ::typelib_typedescriptionreference_release( _pType ); } /** Assignment operator: Acquires right side type and releases previously set type. @@ -126,33 +126,33 @@ public: @param rType another type (right side) @return this type */ - inline Type & SAL_CALL operator = ( const Type & rType ) SAL_THROW(()); + inline Type & SAL_CALL operator = ( const Type & rType ); /** Gets the type class of set type. @return type class of set type */ - inline TypeClass SAL_CALL getTypeClass() const SAL_THROW(()) + inline TypeClass SAL_CALL getTypeClass() const { return (TypeClass)_pType->eTypeClass; } /** Gets the name of the set type. @return name of the set type */ - inline ::rtl::OUString SAL_CALL getTypeName() const SAL_THROW(()); + inline ::rtl::OUString SAL_CALL getTypeName() const; /** Obtains a full type description of set type. @param ppDescr [inout] type description */ - inline void SAL_CALL getDescription( typelib_TypeDescription ** ppDescr ) const SAL_THROW(()) + inline void SAL_CALL getDescription( typelib_TypeDescription ** ppDescr ) const { ::typelib_typedescriptionreference_getDescription( ppDescr, _pType ); } /** Gets the C typelib type description reference pointer. Does not acquire the reference! @return UNacquired type description reference */ - inline typelib_TypeDescriptionReference * SAL_CALL getTypeLibType() const SAL_THROW(()) + inline typelib_TypeDescriptionReference * SAL_CALL getTypeLibType() const { return _pType; } /** Tests if values of this reflected type can be assigned by values of given type. @@ -163,7 +163,7 @@ public: @return true if values of this type can be assigned from values of given type, false otherwise */ - inline bool SAL_CALL isAssignableFrom( const Type & rType ) const SAL_THROW(()) + inline bool SAL_CALL isAssignableFrom( const Type & rType ) const { return ::typelib_typedescriptionreference_isAssignableFrom( _pType, rType._pType ); } /** Compares two types. @@ -171,21 +171,21 @@ public: @param rType another type @return true if both types refer the same type, false otherwise */ - inline bool SAL_CALL equals( const Type & rType ) const SAL_THROW(()) + inline bool SAL_CALL equals( const Type & rType ) const { return ::typelib_typedescriptionreference_equals( _pType, rType._pType ); } /** Equality operator: Compares two types. @param rType another type @return true if both types refer the same type, false otherwise */ - inline bool SAL_CALL operator == ( const Type & rType ) const SAL_THROW(()) + inline bool SAL_CALL operator == ( const Type & rType ) const { return ::typelib_typedescriptionreference_equals( _pType, rType._pType ); } /** Unequality operator: Compares two types. @param rType another type @return false if both types refer the same type, true otherwise */ - inline bool SAL_CALL operator != ( const Type & rType ) const SAL_THROW(()) + inline bool SAL_CALL operator != ( const Type & rType ) const { return (! ::typelib_typedescriptionreference_equals( _pType, rType._pType )); } }; @@ -212,28 +212,28 @@ public: @return type of IDL type "type" */ -inline const ::com::sun::star::uno::Type & SAL_CALL getCppuType( const ::com::sun::star::uno::Type * ) SAL_THROW(()); +inline const ::com::sun::star::uno::Type & SAL_CALL getCppuType( const ::com::sun::star::uno::Type * ); /** Gets the meta type of IDL type void. @return type of IDL type void */ -inline const ::com::sun::star::uno::Type & SAL_CALL getCppuVoidType() SAL_THROW(()); +inline const ::com::sun::star::uno::Type & SAL_CALL getCppuVoidType(); /** Gets the meta type of IDL type void. @return type of IDL type void */ -inline const ::com::sun::star::uno::Type & SAL_CALL getVoidCppuType() SAL_THROW(()); +inline const ::com::sun::star::uno::Type & SAL_CALL getVoidCppuType(); /** Gets the meta type of IDL type boolean. @return type of IDL type boolean */ -inline const ::com::sun::star::uno::Type & SAL_CALL getCppuBooleanType() SAL_THROW(()); +inline const ::com::sun::star::uno::Type & SAL_CALL getCppuBooleanType(); /** Gets the meta type of IDL type boolean. @return type of IDL type boolean */ -inline const ::com::sun::star::uno::Type & SAL_CALL getBooleanCppuType() SAL_THROW(()); +inline const ::com::sun::star::uno::Type & SAL_CALL getBooleanCppuType(); /** Gets the meta type of IDL type boolean. There are cases (involving templates) where uses of getCppuType are known to @@ -243,7 +243,7 @@ inline const ::com::sun::star::uno::Type & SAL_CALL getBooleanCppuType() SAL_THR @return type of IDL type boolean */ -inline const ::com::sun::star::uno::Type & SAL_CALL getCppuType( const sal_Bool * ) SAL_THROW(()); +inline const ::com::sun::star::uno::Type & SAL_CALL getCppuType( const sal_Bool * ); /** Gets the meta type of IDL type boolean. There are cases (involving templates) where uses of getCppuType are known to @@ -254,18 +254,18 @@ inline const ::com::sun::star::uno::Type & SAL_CALL getCppuType( const sal_Bool @return type of IDL type boolean */ inline const ::com::sun::star::uno::Type & SAL_CALL getCppuType( - bool const * ) SAL_THROW(()); + bool const * ); /** Gets the meta type of IDL type char. @return type of IDL type char */ -inline const ::com::sun::star::uno::Type & SAL_CALL getCharCppuType() SAL_THROW(()); +inline const ::com::sun::star::uno::Type & SAL_CALL getCharCppuType(); /** Gets the meta type of IDL type char. @return type of IDL type char */ -inline const ::com::sun::star::uno::Type & SAL_CALL getCppuCharType() SAL_THROW(()); +inline const ::com::sun::star::uno::Type & SAL_CALL getCppuCharType(); /** Gets the meta type of IDL type byte. @@ -276,7 +276,7 @@ inline const ::com::sun::star::uno::Type & SAL_CALL getCppuCharType() SAL_THROW( @return type of IDL type byte */ -inline const ::com::sun::star::uno::Type & SAL_CALL getCppuType( const sal_Int8 * ) SAL_THROW(()); +inline const ::com::sun::star::uno::Type & SAL_CALL getCppuType( const sal_Int8 * ); /** Gets the meta type of IDL type string. @@ -287,7 +287,7 @@ inline const ::com::sun::star::uno::Type & SAL_CALL getCppuType( const sal_Int8 @return type of IDL type string */ -inline const ::com::sun::star::uno::Type & SAL_CALL getCppuType( const ::rtl::OUString * ) SAL_THROW(()); +inline const ::com::sun::star::uno::Type & SAL_CALL getCppuType( const ::rtl::OUString * ); /** Gets the meta type of IDL type short. @@ -298,7 +298,7 @@ inline const ::com::sun::star::uno::Type & SAL_CALL getCppuType( const ::rtl::OU @return type of IDL type short */ -inline const ::com::sun::star::uno::Type & SAL_CALL getCppuType( const sal_Int16 * ) SAL_THROW(()); +inline const ::com::sun::star::uno::Type & SAL_CALL getCppuType( const sal_Int16 * ); /** Gets the meta type of IDL type unsigned short. @@ -309,7 +309,7 @@ inline const ::com::sun::star::uno::Type & SAL_CALL getCppuType( const sal_Int16 @return type of IDL type unsigned short */ -inline const ::com::sun::star::uno::Type & SAL_CALL getCppuType( const sal_uInt16 * ) SAL_THROW(()); +inline const ::com::sun::star::uno::Type & SAL_CALL getCppuType( const sal_uInt16 * ); /** Gets the meta type of IDL type long. @@ -320,7 +320,7 @@ inline const ::com::sun::star::uno::Type & SAL_CALL getCppuType( const sal_uInt1 @return type of IDL type long */ -inline const ::com::sun::star::uno::Type & SAL_CALL getCppuType( const sal_Int32 * ) SAL_THROW(()); +inline const ::com::sun::star::uno::Type & SAL_CALL getCppuType( const sal_Int32 * ); /** Gets the meta type of IDL type unsigned long. @@ -331,7 +331,7 @@ inline const ::com::sun::star::uno::Type & SAL_CALL getCppuType( const sal_Int32 @return type of IDL type unsigned long */ -inline const ::com::sun::star::uno::Type & SAL_CALL getCppuType( const sal_uInt32 * ) SAL_THROW(()); +inline const ::com::sun::star::uno::Type & SAL_CALL getCppuType( const sal_uInt32 * ); /** Gets the meta type of IDL type hyper. @@ -342,7 +342,7 @@ inline const ::com::sun::star::uno::Type & SAL_CALL getCppuType( const sal_uInt3 @return type of IDL type hyper */ -inline const ::com::sun::star::uno::Type & SAL_CALL getCppuType( const sal_Int64 * ) SAL_THROW(()); +inline const ::com::sun::star::uno::Type & SAL_CALL getCppuType( const sal_Int64 * ); /** Gets the meta type of IDL type unsigned hyper. @@ -353,7 +353,7 @@ inline const ::com::sun::star::uno::Type & SAL_CALL getCppuType( const sal_Int64 @return type of IDL type unsigned hyper */ -inline const ::com::sun::star::uno::Type & SAL_CALL getCppuType( const sal_uInt64 * ) SAL_THROW(()); +inline const ::com::sun::star::uno::Type & SAL_CALL getCppuType( const sal_uInt64 * ); /** Gets the meta type of IDL type float. @@ -364,7 +364,7 @@ inline const ::com::sun::star::uno::Type & SAL_CALL getCppuType( const sal_uInt6 @return type of IDL type float */ -inline const ::com::sun::star::uno::Type & SAL_CALL getCppuType( const float * ) SAL_THROW(()); +inline const ::com::sun::star::uno::Type & SAL_CALL getCppuType( const float * ); /** Gets the meta type of IDL type double. @@ -375,7 +375,7 @@ inline const ::com::sun::star::uno::Type & SAL_CALL getCppuType( const float * ) @return type of IDL type double */ -inline const ::com::sun::star::uno::Type & SAL_CALL getCppuType( const double * ) SAL_THROW(()); +inline const ::com::sun::star::uno::Type & SAL_CALL getCppuType( const double * ); /** Gets the meta type of an IDL type. @@ -396,7 +396,7 @@ inline const ::com::sun::star::uno::Type & SAL_CALL getCppuType( const double * @since UDK 3.2.0 */ template< typename T > inline const ::com::sun::star::uno::Type & SAL_CALL -getCppuType() SAL_THROW(()); +getCppuType(); /** Gets the meta type of IDL type char. @@ -410,7 +410,7 @@ getCppuType() SAL_THROW(()); @since UDK 3.2.0 */ template<> inline const ::com::sun::star::uno::Type & SAL_CALL -getCppuType< sal_Unicode >() SAL_THROW(()); +getCppuType< sal_Unicode >(); #endif diff --git a/include/com/sun/star/uno/Type.hxx b/include/com/sun/star/uno/Type.hxx index c6456f554f21..cdd4929bd69d 100644 --- a/include/com/sun/star/uno/Type.hxx +++ b/include/com/sun/star/uno/Type.hxx @@ -33,53 +33,53 @@ namespace uno { -inline Type::Type() SAL_THROW(()) +inline Type::Type() { _pType = reinterpret_cast< const ::com::sun::star::uno::Type * >( ::typelib_static_type_getByTypeClass( typelib_TypeClass_VOID ) )->getTypeLibType(); ::typelib_typedescriptionreference_acquire( _pType ); } -inline Type::Type( TypeClass eTypeClass, const ::rtl::OUString & rTypeName ) SAL_THROW(()) +inline Type::Type( TypeClass eTypeClass, const ::rtl::OUString & rTypeName ) : _pType( 0 ) { ::typelib_typedescriptionreference_new( &_pType, (typelib_TypeClass)eTypeClass, rTypeName.pData ); } -inline Type::Type( TypeClass eTypeClass, const sal_Char * pTypeName ) SAL_THROW(()) +inline Type::Type( TypeClass eTypeClass, const sal_Char * pTypeName ) : _pType( 0 ) { ::typelib_typedescriptionreference_newByAsciiName( &_pType, (typelib_TypeClass)eTypeClass, pTypeName ); } -inline Type::Type( typelib_TypeDescriptionReference * pType ) SAL_THROW(()) +inline Type::Type( typelib_TypeDescriptionReference * pType ) : _pType( pType ) { ::typelib_typedescriptionreference_acquire( _pType ); } -inline Type::Type( typelib_TypeDescriptionReference * pType, UnoType_NoAcquire ) SAL_THROW(()) +inline Type::Type( typelib_TypeDescriptionReference * pType, UnoType_NoAcquire ) : _pType( pType ) { } -inline Type::Type( typelib_TypeDescriptionReference * pType, __sal_NoAcquire ) SAL_THROW(()) +inline Type::Type( typelib_TypeDescriptionReference * pType, __sal_NoAcquire ) : _pType( pType ) { } -inline Type::Type( const Type & rType ) SAL_THROW(()) +inline Type::Type( const Type & rType ) : _pType( rType._pType ) { ::typelib_typedescriptionreference_acquire( _pType ); } -inline ::rtl::OUString Type::getTypeName() const SAL_THROW(()) +inline ::rtl::OUString Type::getTypeName() const { return ::rtl::OUString( _pType->pTypeName ); } -inline Type & Type::operator = ( const Type & rType ) SAL_THROW(()) +inline Type & Type::operator = ( const Type & rType ) { ::typelib_typedescriptionreference_assign( &_pType, rType._pType ); return *this; @@ -94,107 +94,106 @@ typelib_TypeDescriptionReference * Array< T >::s_pType = 0; } } -inline const ::com::sun::star::uno::Type & SAL_CALL getCppuType( SAL_UNUSED_PARAMETER const ::com::sun::star::uno::Type * ) SAL_THROW(()) +inline const ::com::sun::star::uno::Type & SAL_CALL getCppuType( SAL_UNUSED_PARAMETER const ::com::sun::star::uno::Type * ) { return ::cppu::UnoType< ::com::sun::star::uno::Type >::get(); } -inline const ::com::sun::star::uno::Type & SAL_CALL getCppuVoidType() SAL_THROW(()) +inline const ::com::sun::star::uno::Type & SAL_CALL getCppuVoidType() { return ::cppu::UnoType< ::cppu::UnoVoidType >::get(); } -inline const ::com::sun::star::uno::Type & SAL_CALL getVoidCppuType() SAL_THROW(()) +inline const ::com::sun::star::uno::Type & SAL_CALL getVoidCppuType() { return ::cppu::UnoType< ::cppu::UnoVoidType >::get(); } -inline const ::com::sun::star::uno::Type & SAL_CALL getCppuBooleanType() SAL_THROW(()) +inline const ::com::sun::star::uno::Type & SAL_CALL getCppuBooleanType() { return ::cppu::UnoType< bool >::get(); } -inline const ::com::sun::star::uno::Type & SAL_CALL getBooleanCppuType() SAL_THROW(()) +inline const ::com::sun::star::uno::Type & SAL_CALL getBooleanCppuType() { return ::cppu::UnoType< bool >::get(); } -inline const ::com::sun::star::uno::Type & SAL_CALL getCppuType( SAL_UNUSED_PARAMETER const sal_Bool * ) SAL_THROW(()) +inline const ::com::sun::star::uno::Type & SAL_CALL getCppuType( SAL_UNUSED_PARAMETER const sal_Bool * ) { return ::cppu::UnoType< bool >::get(); } inline const ::com::sun::star::uno::Type & SAL_CALL getCppuType( - SAL_UNUSED_PARAMETER bool const * ) SAL_THROW(()) + SAL_UNUSED_PARAMETER bool const * ) { return ::cppu::UnoType< bool >::get(); } -inline const ::com::sun::star::uno::Type & SAL_CALL getCharCppuType() SAL_THROW(()) +inline const ::com::sun::star::uno::Type & SAL_CALL getCharCppuType() { return ::cppu::UnoType< ::cppu::UnoCharType >::get(); } -inline const ::com::sun::star::uno::Type & SAL_CALL getCppuCharType() SAL_THROW(()) +inline const ::com::sun::star::uno::Type & SAL_CALL getCppuCharType() { return ::cppu::UnoType< ::cppu::UnoCharType >::get(); } -inline const ::com::sun::star::uno::Type & SAL_CALL getCppuType( SAL_UNUSED_PARAMETER const sal_Int8 * ) SAL_THROW(()) +inline const ::com::sun::star::uno::Type & SAL_CALL getCppuType( SAL_UNUSED_PARAMETER const sal_Int8 * ) { return ::cppu::UnoType< ::sal_Int8 >::get(); } -inline const ::com::sun::star::uno::Type & SAL_CALL getCppuType( SAL_UNUSED_PARAMETER const ::rtl::OUString * ) SAL_THROW(()) +inline const ::com::sun::star::uno::Type & SAL_CALL getCppuType( SAL_UNUSED_PARAMETER const ::rtl::OUString * ) { return ::cppu::UnoType< ::rtl::OUString >::get(); } -inline const ::com::sun::star::uno::Type & SAL_CALL getCppuType( SAL_UNUSED_PARAMETER const sal_Int16 * ) SAL_THROW(()) +inline const ::com::sun::star::uno::Type & SAL_CALL getCppuType( SAL_UNUSED_PARAMETER const sal_Int16 * ) { return ::cppu::UnoType< ::sal_Int16 >::get(); } -inline const ::com::sun::star::uno::Type & SAL_CALL getCppuType( SAL_UNUSED_PARAMETER const sal_uInt16 * ) SAL_THROW(()) +inline const ::com::sun::star::uno::Type & SAL_CALL getCppuType( SAL_UNUSED_PARAMETER const sal_uInt16 * ) { return ::cppu::UnoType< ::cppu::UnoUnsignedShortType >::get(); } -inline const ::com::sun::star::uno::Type & SAL_CALL getCppuType( SAL_UNUSED_PARAMETER const sal_Int32 * ) SAL_THROW(()) +inline const ::com::sun::star::uno::Type & SAL_CALL getCppuType( SAL_UNUSED_PARAMETER const sal_Int32 * ) { return ::cppu::UnoType< ::sal_Int32 >::get(); } -inline const ::com::sun::star::uno::Type & SAL_CALL getCppuType( SAL_UNUSED_PARAMETER const sal_uInt32 * ) SAL_THROW(()) +inline const ::com::sun::star::uno::Type & SAL_CALL getCppuType( SAL_UNUSED_PARAMETER const sal_uInt32 * ) { return ::cppu::UnoType< ::sal_uInt32 >::get(); } -inline const ::com::sun::star::uno::Type & SAL_CALL getCppuType( SAL_UNUSED_PARAMETER const sal_Int64 * ) SAL_THROW(()) +inline const ::com::sun::star::uno::Type & SAL_CALL getCppuType( SAL_UNUSED_PARAMETER const sal_Int64 * ) { return ::cppu::UnoType< ::sal_Int64 >::get(); } -inline const ::com::sun::star::uno::Type & SAL_CALL getCppuType( SAL_UNUSED_PARAMETER const sal_uInt64 * ) SAL_THROW(()) +inline const ::com::sun::star::uno::Type & SAL_CALL getCppuType( SAL_UNUSED_PARAMETER const sal_uInt64 * ) { return ::cppu::UnoType< ::sal_uInt64 >::get(); } -inline const ::com::sun::star::uno::Type & SAL_CALL getCppuType( SAL_UNUSED_PARAMETER const float * ) SAL_THROW(()) +inline const ::com::sun::star::uno::Type & SAL_CALL getCppuType( SAL_UNUSED_PARAMETER const float * ) { return ::cppu::UnoType< float >::get(); } -inline const ::com::sun::star::uno::Type & SAL_CALL getCppuType( SAL_UNUSED_PARAMETER const double * ) SAL_THROW(()) +inline const ::com::sun::star::uno::Type & SAL_CALL getCppuType( SAL_UNUSED_PARAMETER const double * ) { return ::cppu::UnoType< double >::get(); } template< typename T > -inline const ::com::sun::star::uno::Type & SAL_CALL getCppuType() SAL_THROW(()) +inline const ::com::sun::star::uno::Type & SAL_CALL getCppuType() { return ::cppu::UnoType< T >::get(); } template<> inline const ::com::sun::star::uno::Type & SAL_CALL getCppuType< sal_Unicode >() - SAL_THROW(()) { return ::cppu::UnoType< ::cppu::UnoCharType >::get(); } diff --git a/include/com/sun/star/uno/genfunc.h b/include/com/sun/star/uno/genfunc.h index a2f5390136ff..d1603e250bef 100644 --- a/include/com/sun/star/uno/genfunc.h +++ b/include/com/sun/star/uno/genfunc.h @@ -36,22 +36,19 @@ namespace uno @param pCppI C++ interface pointer */ -inline void SAL_CALL cpp_acquire( void * pCppI ) - SAL_THROW(()); +inline void SAL_CALL cpp_acquire( void * pCppI ); /** Function to release a C++ interface. @param pCppI C++ interface pointer */ -inline void SAL_CALL cpp_release( void * pCppI ) - SAL_THROW(()); +inline void SAL_CALL cpp_release( void * pCppI ); /** Function to query for a C++ interface. @param pCppI C++ interface pointer @param pType demanded interface type @return acquired C++ interface pointer or null */ -inline void * SAL_CALL cpp_queryInterface( void * pCppI, typelib_TypeDescriptionReference * pType ) - SAL_THROW(()); +inline void * SAL_CALL cpp_queryInterface( void * pCppI, typelib_TypeDescriptionReference * pType ); } } diff --git a/include/com/sun/star/uno/genfunc.hxx b/include/com/sun/star/uno/genfunc.hxx index 3c230756a6e2..7a85f5a84419 100644 --- a/include/com/sun/star/uno/genfunc.hxx +++ b/include/com/sun/star/uno/genfunc.hxx @@ -34,19 +34,16 @@ namespace uno inline void SAL_CALL cpp_acquire( void * pCppI ) - SAL_THROW(()) { reinterpret_cast< XInterface * >( pCppI )->acquire(); } inline void SAL_CALL cpp_release( void * pCppI ) - SAL_THROW(()) { reinterpret_cast< XInterface * >( pCppI )->release(); } inline void * SAL_CALL cpp_queryInterface( void * pCppI, typelib_TypeDescriptionReference * pType ) - SAL_THROW(()) { if (pCppI) { diff --git a/include/osl/thread.hxx b/include/osl/thread.hxx index 398eca170f2f..e5331efc5291 100644 --- a/include/osl/thread.hxx +++ b/include/osl/thread.hxx @@ -53,13 +53,13 @@ class Thread Thread& operator= ( const Thread& ); 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 * ) {} Thread(): m_hThread(0){} diff --git a/include/salhelper/dynload.hxx b/include/salhelper/dynload.hxx index 35eb81159558..d4942b8b6a53 100644 --- a/include/salhelper/dynload.hxx +++ b/include/salhelper/dynload.hxx @@ -106,7 +106,7 @@ class ODynamicLoader { public: /// Default constructor - ODynamicLoader() SAL_THROW(()) + ODynamicLoader() { m_pLoader = 0; } @@ -118,7 +118,7 @@ public: @param strInitFunction specifies the name of the initialization function. */ ODynamicLoader( const ::rtl::OUString& strModuleName, - const ::rtl::OUString& strInitFunction ) SAL_THROW(()) + const ::rtl::OUString& strInitFunction ) { if (!m_pStaticLoader) { @@ -136,7 +136,7 @@ public: } /// Copy constructor - ODynamicLoader(const ODynamicLoader<API>& toCopy) SAL_THROW(()) + ODynamicLoader(const ODynamicLoader<API>& toCopy) { m_pLoader = toCopy.m_pLoader; if( m_pLoader ) @@ -144,14 +144,14 @@ public: } /// Destructor, decrease the reference count and unload the library if it is tha last instance. - ~ODynamicLoader() SAL_THROW(()) + ~ODynamicLoader() { if( m_pLoader ) m_pLoader->release(); } /// Assign operator - ODynamicLoader<API>& SAL_CALL operator = (const ODynamicLoader<API>& toAssign) SAL_THROW(()) + ODynamicLoader<API>& SAL_CALL operator = (const ODynamicLoader<API>& toAssign) { if( m_pLoader != toAssign.m_pLoader ) { @@ -170,19 +170,19 @@ public: } /// returns a poiner to the initialized API function structure. - API* SAL_CALL getApi() const SAL_THROW(()) + API* SAL_CALL getApi() const { return (API*)m_pLoader->getApi(); } /// cast operator, which cast to a poiner with the initialized API function structure. - API* SAL_CALL operator->() const SAL_THROW(()) + API* SAL_CALL operator->() const { return (API*)m_pLoader->getApi(); } /// checks if the loader works on a loaded and initialized library. - bool SAL_CALL isLoaded() const SAL_THROW(()) + bool SAL_CALL isLoaded() const { return (m_pLoader != NULL); } diff --git a/include/salhelper/refobj.hxx b/include/salhelper/refobj.hxx index 5c5aa8fc9969..6278e2f0fc64 100644 --- a/include/salhelper/refobj.hxx +++ b/include/salhelper/refobj.hxx @@ -45,36 +45,36 @@ class ReferenceObject : public rtl::IReference public: /** Allocation. */ - static void* operator new (size_t n) SAL_THROW(()) + static void* operator new (size_t n) { return ::rtl_allocateMemory (n); } - static void operator delete (void* p) SAL_THROW(()) + static void operator delete (void* p) { ::rtl_freeMemory (p); } - static void* operator new (size_t, void* p) SAL_THROW(()) + static void* operator new (size_t, void* p) { return (p); } - static void operator delete (void*, void*) SAL_THROW(()) + static void operator delete (void*, void*) {} public: /** Construction. */ - inline ReferenceObject() SAL_THROW(()) : m_nReferenceCount (0) + inline ReferenceObject() : m_nReferenceCount (0) {} /** IReference. */ - virtual oslInterlockedCount SAL_CALL acquire() SAL_THROW(()) SAL_OVERRIDE + virtual oslInterlockedCount SAL_CALL acquire() SAL_OVERRIDE { return osl_atomic_increment (&m_nReferenceCount); } - virtual oslInterlockedCount SAL_CALL release() SAL_THROW(()) SAL_OVERRIDE + virtual oslInterlockedCount SAL_CALL release() SAL_OVERRIDE { oslInterlockedCount result; result = ::osl_atomic_decrement (&m_nReferenceCount); @@ -89,7 +89,7 @@ public: protected: /** Destruction. */ - virtual ~ReferenceObject() SAL_THROW(()) + virtual ~ReferenceObject() { OSL_ASSERT(m_nReferenceCount == 0); } diff --git a/include/salhelper/simplereferenceobject.hxx b/include/salhelper/simplereferenceobject.hxx index 5f901c3f1015..b150fb238c14 100644 --- a/include/salhelper/simplereferenceobject.hxx +++ b/include/salhelper/simplereferenceobject.hxx @@ -58,7 +58,7 @@ namespace salhelper { class SALHELPER_DLLPUBLIC SimpleReferenceObject { public: - inline SimpleReferenceObject() SAL_THROW(()): m_nCount(0) {} + inline SimpleReferenceObject(): m_nCount(0) {} /** @attention The results are undefined if, for any individual instance of @@ -66,33 +66,31 @@ public: the total number of calls to release() by a platform dependent amount (which, hopefully, is quite large). */ - inline void acquire() SAL_THROW(()) + inline void acquire() { osl_atomic_increment(&m_nCount); } - inline void release() SAL_THROW(()) + inline void release() { if (osl_atomic_decrement(&m_nCount) == 0) delete this; } /** see general class documentation */ - static void * operator new(std::size_t nSize) SAL_THROW((std::bad_alloc)); + static void * operator new(std::size_t nSize); /** see general class documentation */ static void * operator new(std::size_t nSize, - std::nothrow_t const & rNothrow) - SAL_THROW(()); + std::nothrow_t const & rNothrow); /** see general class documentation */ - static void operator delete(void * pPtr) SAL_THROW(()); + static void operator delete(void * pPtr); /** see general class documentation */ - static void operator delete(void * pPtr, std::nothrow_t const & rNothrow) - SAL_THROW(()); + static void operator delete(void * pPtr, std::nothrow_t const & rNothrow); protected: - virtual ~SimpleReferenceObject() SAL_THROW(()); + virtual ~SimpleReferenceObject(); private: oslInterlockedCount m_nCount; diff --git a/include/store/store.hxx b/include/store/store.hxx index b3861df2da7a..1d9b74c44a9b 100644 --- a/include/store/store.hxx +++ b/include/store/store.hxx @@ -37,13 +37,13 @@ class OStoreStream public: /** Construction. */ - inline OStoreStream (void) SAL_THROW(()) + inline OStoreStream (void) : m_hImpl (0) {} /** Destruction. */ - inline ~OStoreStream (void) SAL_THROW(()) + inline ~OStoreStream (void) { if (m_hImpl) (void) store_releaseHandle (m_hImpl); @@ -51,7 +51,7 @@ public: /** Copy construction. */ - inline OStoreStream (OStoreStream const & rhs) SAL_THROW(()) + inline OStoreStream (OStoreStream const & rhs) : m_hImpl (rhs.m_hImpl) { if (m_hImpl) @@ -60,7 +60,7 @@ public: /** Assignment. */ - inline OStoreStream & operator= (OStoreStream const & rhs) SAL_THROW(()) + inline OStoreStream & operator= (OStoreStream const & rhs) { if (rhs.m_hImpl) (void) store_acquireHandle (rhs.m_hImpl); @@ -72,7 +72,7 @@ public: /** Construction from Stream Handle. */ - inline explicit OStoreStream (storeStreamHandle Handle) SAL_THROW(()) + inline explicit OStoreStream (storeStreamHandle Handle) : m_hImpl (Handle) { if (m_hImpl) @@ -81,7 +81,7 @@ public: /** Conversion into Stream Handle. */ - inline operator storeStreamHandle (void) const SAL_THROW(()) + inline operator storeStreamHandle (void) const { return m_hImpl; } @@ -89,7 +89,7 @@ public: /** Check for a valid Stream Handle. @return sal_True if valid, sal_False otherwise. */ - inline bool isValid (void) const SAL_THROW(()) + inline bool isValid (void) const { return (m_hImpl != 0); } @@ -101,7 +101,7 @@ public: storeFileHandle hFile, rtl::OUString const & rPath, rtl::OUString const & rName, - storeAccessMode eMode) SAL_THROW(()) + storeAccessMode eMode) { if (m_hImpl) { @@ -114,7 +114,7 @@ public: /** Close the stream. @see store_closeStream() */ - inline void close (void) SAL_THROW(()) + inline void close (void) { if (m_hImpl) { @@ -130,7 +130,7 @@ public: sal_uInt32 nOffset, void * pBuffer, sal_uInt32 nBytes, - sal_uInt32 & rnDone) SAL_THROW(()) + sal_uInt32 & rnDone) { if (!m_hImpl) return store_E_InvalidHandle; @@ -145,7 +145,7 @@ public: sal_uInt32 nOffset, void const * pBuffer, sal_uInt32 nBytes, - sal_uInt32 & rnDone) SAL_THROW(()) + sal_uInt32 & rnDone) { if (!m_hImpl) return store_E_InvalidHandle; @@ -156,7 +156,7 @@ public: /** Flush the stream. @see store_flushStream() */ - inline storeError flush (void) const SAL_THROW(()) + inline storeError flush (void) const { if (!m_hImpl) return store_E_InvalidHandle; @@ -167,7 +167,7 @@ public: /** Get the stream size. @see store_getStreamSize() */ - inline storeError getSize (sal_uInt32 & rnSize) const SAL_THROW(()) + inline storeError getSize (sal_uInt32 & rnSize) const { if (!m_hImpl) return store_E_InvalidHandle; @@ -178,7 +178,7 @@ public: /** Set the stream size. @see store_setStreamSize() */ - inline storeError setSize (sal_uInt32 nSize) SAL_THROW(()) + inline storeError setSize (sal_uInt32 nSize) { if (!m_hImpl) return store_E_InvalidHandle; @@ -202,13 +202,13 @@ class OStoreDirectory public: /** Construction. */ - inline OStoreDirectory (void) SAL_THROW(()) + inline OStoreDirectory (void) : m_hImpl (0) {} /** Destruction. */ - inline ~OStoreDirectory (void) SAL_THROW(()) + inline ~OStoreDirectory (void) { if (m_hImpl) (void) store_releaseHandle (m_hImpl); @@ -216,7 +216,7 @@ public: /** Copy construction. */ - inline OStoreDirectory (OStoreDirectory const & rhs) SAL_THROW(()) + inline OStoreDirectory (OStoreDirectory const & rhs) : m_hImpl (rhs.m_hImpl) { if (m_hImpl) @@ -225,7 +225,7 @@ public: /** Assignment. */ - inline OStoreDirectory & operator= (OStoreDirectory const & rhs) SAL_THROW(()) + inline OStoreDirectory & operator= (OStoreDirectory const & rhs) { if (rhs.m_hImpl) (void) store_acquireHandle (rhs.m_hImpl); @@ -237,7 +237,7 @@ public: /** Construction from Directory Handle. */ - inline explicit OStoreDirectory (storeDirectoryHandle Handle) SAL_THROW(()) + inline explicit OStoreDirectory (storeDirectoryHandle Handle) : m_hImpl (Handle) { if (m_hImpl) @@ -246,7 +246,7 @@ public: /** Conversion into Directory Handle. */ - inline operator storeDirectoryHandle(void) const SAL_THROW(()) + inline operator storeDirectoryHandle(void) const { return m_hImpl; } @@ -254,7 +254,7 @@ public: /** Check for a valid Directory Handle. @return sal_True if valid, sal_False otherwise. */ - inline bool isValid (void) const SAL_THROW(()) + inline bool isValid (void) const { return (m_hImpl != 0); } @@ -266,7 +266,7 @@ public: storeFileHandle hFile, rtl::OUString const & rPath, rtl::OUString const & rName, - storeAccessMode eMode) SAL_THROW(()) + storeAccessMode eMode) { if (m_hImpl) { @@ -279,7 +279,7 @@ public: /** Close the directory. @see store_closeDirectory() */ - inline void close (void) SAL_THROW(()) + inline void close (void) { if (m_hImpl) { @@ -297,7 +297,7 @@ public: /** Find first directory entry. @see store_findFirst() */ - inline storeError first (iterator& it) SAL_THROW(()) + inline storeError first (iterator& it) { if (!m_hImpl) return store_E_InvalidHandle; @@ -308,7 +308,7 @@ public: /** Find next directory entry. @see store_findNext() */ - inline storeError next (iterator& it) SAL_THROW(()) + inline storeError next (iterator& it) { if (!m_hImpl) return store_E_InvalidHandle; @@ -368,13 +368,13 @@ class OStoreFile public: /** Construction. */ - inline OStoreFile (void) SAL_THROW(()) + inline OStoreFile (void) : m_hImpl (0) {} /** Destruction. */ - inline ~OStoreFile (void) SAL_THROW(()) + inline ~OStoreFile (void) { if (m_hImpl) (void) store_releaseHandle (m_hImpl); @@ -382,7 +382,7 @@ public: /** Copy construction. */ - inline OStoreFile (OStoreFile const & rhs) SAL_THROW(()) + inline OStoreFile (OStoreFile const & rhs) : m_hImpl (rhs.m_hImpl) { if (m_hImpl) @@ -391,7 +391,7 @@ public: /** Assignment. */ - inline OStoreFile & operator= (OStoreFile const & rhs) SAL_THROW(()) + inline OStoreFile & operator= (OStoreFile const & rhs) { if (rhs.m_hImpl) (void) store_acquireHandle (rhs.m_hImpl); @@ -403,7 +403,7 @@ public: /** Construction from File Handle. */ - inline explicit OStoreFile (storeFileHandle Handle) SAL_THROW(()) + inline explicit OStoreFile (storeFileHandle Handle) : m_hImpl (Handle) { if (m_hImpl) @@ -412,7 +412,7 @@ public: /** Conversion into File Handle. */ - inline operator storeFileHandle (void) const SAL_THROW(()) + inline operator storeFileHandle (void) const { return m_hImpl; } @@ -420,7 +420,7 @@ public: /** Check for a valid File Handle. @return sal_True if valid, sal_False otherwise. */ - inline bool isValid (void) const SAL_THROW(()) + inline bool isValid (void) const { return (m_hImpl != 0); } @@ -431,7 +431,7 @@ public: inline storeError create ( rtl::OUString const & rFilename, storeAccessMode eAccessMode, - sal_uInt16 nPageSize = STORE_DEFAULT_PAGESIZE) SAL_THROW(()) + sal_uInt16 nPageSize = STORE_DEFAULT_PAGESIZE) { if (m_hImpl) { @@ -445,7 +445,7 @@ public: @see store_createMemoryFile() */ inline storeError createInMemory ( - sal_uInt16 nPageSize = STORE_DEFAULT_PAGESIZE) SAL_THROW(()) + sal_uInt16 nPageSize = STORE_DEFAULT_PAGESIZE) { if (m_hImpl) { @@ -458,7 +458,7 @@ public: /** Close the file. @see store_closeFile() */ - inline void close (void) SAL_THROW(()) + inline void close (void) { if (m_hImpl) { @@ -470,7 +470,7 @@ public: /** Flush the file. @see store_flushFile() */ - inline storeError flush (void) const SAL_THROW(()) + inline storeError flush (void) const { if (!m_hImpl) return store_E_InvalidHandle; @@ -481,7 +481,7 @@ public: /** Get the number of referers to the file. @see store_getFileRefererCount() */ - inline storeError getRefererCount (sal_uInt32 & rnRefCount) const SAL_THROW(()) + inline storeError getRefererCount (sal_uInt32 & rnRefCount) const { if (!m_hImpl) return store_E_InvalidHandle; @@ -492,7 +492,7 @@ public: /** Get the file size. @see store_getFileSize() */ - inline storeError getSize (sal_uInt32 & rnSize) const SAL_THROW(()) + inline storeError getSize (sal_uInt32 & rnSize) const { if (!m_hImpl) return store_E_InvalidHandle; @@ -508,7 +508,7 @@ public: rtl::OUString const & rName, sal_uInt32 nMask1, sal_uInt32 nMask2, - sal_uInt32 & rnAttrib) SAL_THROW(()) + sal_uInt32 & rnAttrib) { if (!m_hImpl) return store_E_InvalidHandle; @@ -523,7 +523,7 @@ public: rtl::OUString const & rPath, rtl::OUString const & rName, sal_uInt32 nMask1, - sal_uInt32 nMask2) SAL_THROW(()) + sal_uInt32 nMask2) { if (!m_hImpl) return store_E_InvalidHandle; @@ -536,7 +536,7 @@ public: */ inline storeError link ( rtl::OUString const & rSrcPath, rtl::OUString const & rSrcName, - rtl::OUString const & rDstPath, rtl::OUString const & rDstName) SAL_THROW(()) + rtl::OUString const & rDstPath, rtl::OUString const & rDstName) { if (!m_hImpl) return store_E_InvalidHandle; @@ -550,7 +550,7 @@ public: */ inline storeError symlink ( rtl::OUString const & rSrcPath, rtl::OUString const & rSrcName, - rtl::OUString const & rDstPath, rtl::OUString const & rDstName) SAL_THROW(()) + rtl::OUString const & rDstPath, rtl::OUString const & rDstName) { if (!m_hImpl) return store_E_InvalidHandle; @@ -563,7 +563,7 @@ public: */ inline storeError rename ( rtl::OUString const & rSrcPath, rtl::OUString const & rSrcName, - rtl::OUString const & rDstPath, rtl::OUString const & rDstName) SAL_THROW(()) + rtl::OUString const & rDstPath, rtl::OUString const & rDstName) { if (!m_hImpl) return store_E_InvalidHandle; @@ -575,7 +575,7 @@ public: @see store_remove() */ inline storeError remove ( - rtl::OUString const & rPath, rtl::OUString const & rName) SAL_THROW(()) + rtl::OUString const & rPath, rtl::OUString const & rName) { if (!m_hImpl) return store_E_InvalidHandle; diff --git a/include/typelib/typedescription.hxx b/include/typelib/typedescription.hxx index 7f61423242cd..05e7568373d6 100644 --- a/include/typelib/typedescription.hxx +++ b/include/typelib/typedescription.hxx @@ -48,13 +48,13 @@ class TypeDescription 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 @@ -62,48 +62,48 @@ public: @param pTypeDescr a type description */ - inline TypeDescription( typelib_TypeDescription * pTypeDescr = 0 ) SAL_THROW(()); + inline TypeDescription( typelib_TypeDescription * pTypeDescr = 0 ); /** Constructor: @param pTypeDescrRef a type description reference */ - inline TypeDescription( typelib_TypeDescriptionReference * pTypeDescrRef ) SAL_THROW(()); + inline TypeDescription( typelib_TypeDescriptionReference * pTypeDescrRef ); /** Constructor: @param rType a type */ - inline TypeDescription( const ::com::sun::star::uno::Type & rType ) SAL_THROW(()); + inline TypeDescription( const ::com::sun::star::uno::Type & rType ); /** Copy constructor: @param rDescr another TypeDescription */ - inline TypeDescription( const TypeDescription & rDescr ) SAL_THROW(()); + inline TypeDescription( const TypeDescription & rDescr ); /** Constructor: @param pTypeName a type name */ - inline TypeDescription( rtl_uString * pTypeName ) SAL_THROW(()); + inline TypeDescription( rtl_uString * pTypeName ); /** Constructor: @param rTypeName a type name */ - inline TypeDescription( const ::rtl::OUString & rTypeName ) SAL_THROW(()); + inline TypeDescription( const ::rtl::OUString & rTypeName ); /** Destructor: releases type description */ - inline ~TypeDescription() SAL_THROW(()); + inline ~TypeDescription(); /** Assignment operator: acquires given type description and releases a set one. @param pTypeDescr another type description @return this TypeDescription */ - inline TypeDescription & SAL_CALL operator = ( typelib_TypeDescription * pTypeDescr ) SAL_THROW(()); + inline TypeDescription & SAL_CALL operator = ( typelib_TypeDescription * pTypeDescr ); /** Assignment operator: acquires given type description and releases a set one. @param rTypeDescr another type description @return this TypeDescription */ - inline TypeDescription & SAL_CALL operator =( const TypeDescription & rTypeDescr ) SAL_THROW(()) + inline TypeDescription & SAL_CALL operator =( const TypeDescription & rTypeDescr ) { return this->operator =( rTypeDescr.get() ); } /** Tests whether two type descriptions are equal. @@ -111,80 +111,80 @@ public: @param pTypeDescr another type description @return true, if both type descriptions are equal, false otherwise */ - inline bool SAL_CALL equals( const typelib_TypeDescription * pTypeDescr ) const SAL_THROW(()); + inline bool SAL_CALL equals( const typelib_TypeDescription * pTypeDescr ) const; /** Tests whether two type descriptions are equal. @param rTypeDescr another type description @return true, if both type descriptions are equal, false otherwise */ - inline bool SAL_CALL equals( const TypeDescription & rTypeDescr ) const SAL_THROW(()) + inline bool SAL_CALL equals( const TypeDescription & rTypeDescr ) const { return equals( rTypeDescr._pTypeDescr ); } /** Makes stored type description complete. */ - inline void SAL_CALL makeComplete() const SAL_THROW(()); + inline void SAL_CALL makeComplete() const; /** Gets the UNacquired type description pointer. @return stored pointer of type description */ - inline typelib_TypeDescription * SAL_CALL get() const SAL_THROW(()) + inline typelib_TypeDescription * SAL_CALL get() const { return _pTypeDescr; } /** Tests if a type description is set. @return true, if a type description is set, false otherwise */ - inline bool SAL_CALL is() const SAL_THROW(()) + inline bool SAL_CALL is() const { return (_pTypeDescr != 0); } }; -inline TypeDescription::TypeDescription( typelib_TypeDescription * pTypeDescr ) SAL_THROW(()) +inline TypeDescription::TypeDescription( typelib_TypeDescription * pTypeDescr ) : _pTypeDescr( pTypeDescr ) { if (_pTypeDescr) typelib_typedescription_acquire( _pTypeDescr ); } -inline TypeDescription::TypeDescription( typelib_TypeDescriptionReference * pTypeDescrRef ) SAL_THROW(()) +inline TypeDescription::TypeDescription( typelib_TypeDescriptionReference * pTypeDescrRef ) : _pTypeDescr( 0 ) { if (pTypeDescrRef) typelib_typedescriptionreference_getDescription( &_pTypeDescr, pTypeDescrRef ); } -inline TypeDescription::TypeDescription( const ::com::sun::star::uno::Type & rType ) SAL_THROW(()) +inline TypeDescription::TypeDescription( const ::com::sun::star::uno::Type & rType ) : _pTypeDescr( 0 ) { if (rType.getTypeLibType()) typelib_typedescriptionreference_getDescription( &_pTypeDescr, rType.getTypeLibType() ); } -inline TypeDescription::TypeDescription( const TypeDescription & rTypeDescr ) SAL_THROW(()) +inline TypeDescription::TypeDescription( const TypeDescription & rTypeDescr ) : _pTypeDescr( rTypeDescr._pTypeDescr ) { if (_pTypeDescr) typelib_typedescription_acquire( _pTypeDescr ); } -inline TypeDescription::TypeDescription( rtl_uString * pTypeName ) SAL_THROW(()) +inline TypeDescription::TypeDescription( rtl_uString * pTypeName ) : _pTypeDescr( 0 ) { typelib_typedescription_getByName( &_pTypeDescr , pTypeName ); } -inline TypeDescription::TypeDescription( const ::rtl::OUString & rTypeName ) SAL_THROW(()) +inline TypeDescription::TypeDescription( const ::rtl::OUString & rTypeName ) : _pTypeDescr( 0 ) { typelib_typedescription_getByName( &_pTypeDescr , rTypeName.pData ); } -inline TypeDescription::~TypeDescription() SAL_THROW(()) +inline TypeDescription::~TypeDescription() { if (_pTypeDescr) typelib_typedescription_release( _pTypeDescr ); } -inline TypeDescription & TypeDescription::operator = ( typelib_TypeDescription * pTypeDescr ) SAL_THROW(()) +inline TypeDescription & TypeDescription::operator = ( typelib_TypeDescription * pTypeDescr ) { if (pTypeDescr) typelib_typedescription_acquire( pTypeDescr ); @@ -194,13 +194,13 @@ inline TypeDescription & TypeDescription::operator = ( typelib_TypeDescription * return *this; } -inline bool TypeDescription::equals( const typelib_TypeDescription * pTypeDescr ) const SAL_THROW(()) +inline bool TypeDescription::equals( const typelib_TypeDescription * pTypeDescr ) const { return (_pTypeDescr && pTypeDescr && typelib_typedescription_equals( _pTypeDescr, pTypeDescr )); } -inline void TypeDescription::makeComplete() const SAL_THROW(()) +inline void TypeDescription::makeComplete() const { if (_pTypeDescr && !_pTypeDescr->bComplete) ::typelib_typedescription_complete( &_pTypeDescr ); diff --git a/include/ucbhelper/fileidentifierconverter.hxx b/include/ucbhelper/fileidentifierconverter.hxx index 892234d39fc2..d2ace143c87f 100644 --- a/include/ucbhelper/fileidentifierconverter.hxx +++ b/include/ucbhelper/fileidentifierconverter.hxx @@ -42,8 +42,7 @@ namespace ucbhelper { either a 'root' URL for the most 'local' file content provider, or an empty string, if no such URL can meaningfully be constructed. */ -UCBHELPER_DLLPUBLIC OUString getLocalFileURL() - SAL_THROW((com::sun::star::uno::RuntimeException)); +UCBHELPER_DLLPUBLIC OUString getLocalFileURL(); /** Using a specific content provider manager, convert a file path in system @@ -75,8 +74,7 @@ getFileURLFromSystemPath( com::sun::star::ucb::XUniversalContentBroker > const & rUcb, OUString const & rBaseURL, - OUString const & rSystemPath) - SAL_THROW((com::sun::star::uno::RuntimeException)); + OUString const & rSystemPath); /** Using a specific content provider manager, convert a (file) URL to a @@ -104,8 +102,7 @@ getSystemPathFromFileURL( com::sun::star::uno::Reference< com::sun::star::ucb::XUniversalContentBroker > const & rUcb, - OUString const & rURL) - SAL_THROW((com::sun::star::uno::RuntimeException)); + OUString const & rURL); } diff --git a/include/uno/current_context.hxx b/include/uno/current_context.hxx index 6efc506ebd4a..9e043491e332 100644 --- a/include/uno/current_context.hxx +++ b/include/uno/current_context.hxx @@ -42,7 +42,6 @@ namespace uno @return current context or null ref, if none is set */ inline Reference< XCurrentContext > SAL_CALL getCurrentContext() - SAL_THROW(()) { Reference< XCurrentContext > xRet; ::rtl::OUString aEnvTypeName( CPPU_CURRENT_LANGUAGE_BINDING_NAME ); @@ -56,7 +55,6 @@ inline Reference< XCurrentContext > SAL_CALL getCurrentContext() */ inline bool SAL_CALL setCurrentContext( Reference< XCurrentContext > const & xContext ) - SAL_THROW(()) { ::rtl::OUString aEnvTypeName( CPPU_CURRENT_LANGUAGE_BINDING_NAME ); return (::uno_setCurrentContext( xContext.get(), aEnvTypeName.pData, 0 ) != sal_False); @@ -81,23 +79,20 @@ public: @param xNewContext new context to be set */ inline ContextLayer( - Reference< XCurrentContext > const & xNewContext = Reference< XCurrentContext >() ) - SAL_THROW(()); + Reference< XCurrentContext > const & xNewContext = Reference< XCurrentContext >() ); /** Destructor: restores the previous context. */ - inline ~ContextLayer() SAL_THROW(()); + inline ~ContextLayer(); /** Gets the previously set context. @return the previously set context */ inline Reference< XCurrentContext > SAL_CALL getPreviousContext() const - SAL_THROW(()) { return m_xPreviousContext; } }; inline ContextLayer::ContextLayer( Reference< XCurrentContext > const & xNewContext ) - SAL_THROW(()) : m_aEnvTypeName( CPPU_CURRENT_LANGUAGE_BINDING_NAME ) { ::uno_getCurrentContext( (void **)&m_xPreviousContext, m_aEnvTypeName.pData, 0 ); @@ -105,7 +100,6 @@ inline ContextLayer::ContextLayer( Reference< XCurrentContext > const & xNewCont } inline ContextLayer::~ContextLayer() - SAL_THROW(()) { ::uno_setCurrentContext( m_xPreviousContext.get(), m_aEnvTypeName.pData, 0 ); } diff --git a/include/uno/environment.hxx b/include/uno/environment.hxx index d4b9aefa5502..1878ebcb376e 100644 --- a/include/uno/environment.hxx +++ b/include/uno/environment.hxx @@ -55,17 +55,17 @@ public: respectively to current C++ Environment. @since UDK 3.2.7 */ - inline static Environment getCurrent(rtl::OUString const & typeName = rtl::OUString(CPPU_CURRENT_LANGUAGE_BINDING_NAME)) SAL_THROW(()); + inline static Environment getCurrent(rtl::OUString const & typeName = rtl::OUString(CPPU_CURRENT_LANGUAGE_BINDING_NAME)); /// @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 @@ -73,7 +73,7 @@ public: @param pEnv environment */ - inline Environment( uno_Environment * pEnv = 0 ) SAL_THROW(()); + inline Environment( uno_Environment * pEnv = 0 ); /** Gets a specific environment. If the specified environment does not exist, then a default one is created and registered. @@ -81,64 +81,64 @@ public: @param envDcp descriptor of the environment @param pContext context pointer */ - inline explicit Environment( rtl::OUString const & envDcp, void * pContext = NULL ) SAL_THROW(()); + inline explicit Environment( rtl::OUString const & envDcp, void * pContext = NULL ); /** Copy constructor: acquires given environment @param rEnv another environment */ - inline Environment( const Environment & rEnv ) SAL_THROW(()); + inline Environment( const Environment & rEnv ); /** Destructor: releases a set environment. */ - inline ~Environment() SAL_THROW(()); + inline ~Environment(); /** Sets a given environment, i.e. acquires given one and releases a set one. @param pEnv another environment @return this environment */ - inline Environment & SAL_CALL operator = ( uno_Environment * pEnv ) SAL_THROW(()); + inline Environment & SAL_CALL operator = ( uno_Environment * pEnv ); /** Sets a given environment, i.e. acquires given one and releases a set one. @param rEnv another environment @return this environment */ - inline Environment & SAL_CALL operator = ( const Environment & rEnv ) SAL_THROW(()) + inline Environment & SAL_CALL operator = ( const Environment & rEnv ) { return operator = ( rEnv._pEnv ); } /** Provides UNacquired pointer to the set C environment. @return UNacquired pointer to the C environment struct */ - inline uno_Environment * SAL_CALL get() const SAL_THROW(()) + inline uno_Environment * SAL_CALL get() const { return _pEnv; } /** Gets type name of set environment. @return type name of set environment */ - inline ::rtl::OUString SAL_CALL getTypeName() const SAL_THROW(()) + inline ::rtl::OUString SAL_CALL getTypeName() const { return _pEnv->pTypeName; } /** Gets free context pointer of set environment. @return free context pointer of set environment */ - inline void * SAL_CALL getContext() const SAL_THROW(()) + inline void * SAL_CALL getContext() const { return _pEnv->pContext; } /** Tests if a environment is set. @return true, if a environment is set, false otherwise */ - inline bool SAL_CALL is() const SAL_THROW(()) + inline bool SAL_CALL is() const { return (_pEnv != 0); } /** Releases a set environment. */ - inline void SAL_CALL clear() SAL_THROW(()); + inline void SAL_CALL clear(); /** Invoke the passed function in this environment. @@ -146,7 +146,7 @@ public: @param pParam the parameter pointer to be passed to the function @since UDK 3.2.7 */ - inline void SAL_CALL invoke_v(uno_EnvCallee * pCallee, va_list * pParam) const SAL_THROW(()); + inline void SAL_CALL invoke_v(uno_EnvCallee * pCallee, va_list * pParam) const; /** Invoke the passed function in this environment. @@ -154,49 +154,49 @@ public: @param ... the parameters to be passed to the function @since UDK 3.2.7 */ - inline void SAL_CALL invoke(uno_EnvCallee * pCallee, ...) const SAL_THROW(()); + inline void SAL_CALL invoke(uno_EnvCallee * pCallee, ...) const; /** Enter this environment explicitly. @since UDK 3.2.7 */ - inline void SAL_CALL enter() const SAL_THROW(()); + inline void SAL_CALL enter() const; /** Checks, if it is valid to currently call objects belonging to this environment. @since UDK 3.2.7 */ - inline int SAL_CALL isValid(rtl::OUString * pReason) const SAL_THROW(()); + inline int SAL_CALL isValid(rtl::OUString * pReason) const; }; -inline Environment::Environment( uno_Environment * pEnv ) SAL_THROW(()) +inline Environment::Environment( uno_Environment * pEnv ) : _pEnv( pEnv ) { if (_pEnv) (*_pEnv->acquire)( _pEnv ); } -inline Environment::Environment( rtl::OUString const & rEnvDcp, void * pContext ) SAL_THROW(()) +inline Environment::Environment( rtl::OUString const & rEnvDcp, void * pContext ) : _pEnv(NULL) { uno_getEnvironment(&_pEnv, rEnvDcp.pData, pContext); } -inline Environment::Environment( const Environment & rEnv ) SAL_THROW(()) +inline Environment::Environment( const Environment & rEnv ) : _pEnv( rEnv._pEnv ) { if (_pEnv) (*_pEnv->acquire)( _pEnv ); } -inline Environment::~Environment() SAL_THROW(()) +inline Environment::~Environment() { if (_pEnv) (*_pEnv->release)( _pEnv ); } -inline void Environment::clear() SAL_THROW(()) +inline void Environment::clear() { if (_pEnv) { @@ -205,7 +205,7 @@ inline void Environment::clear() SAL_THROW(()) } } -inline Environment & Environment::operator = ( uno_Environment * pEnv ) SAL_THROW(()) +inline Environment & Environment::operator = ( uno_Environment * pEnv ) { if (pEnv != _pEnv) { @@ -218,13 +218,13 @@ inline Environment & Environment::operator = ( uno_Environment * pEnv ) SAL_THRO return *this; } -inline void SAL_CALL Environment::invoke_v(uno_EnvCallee * pCallee, va_list * pParam) const SAL_THROW(()) +inline void SAL_CALL Environment::invoke_v(uno_EnvCallee * pCallee, va_list * pParam) const { if (_pEnv) uno_Environment_invoke_v(_pEnv, pCallee, pParam); } -inline void SAL_CALL Environment::invoke(uno_EnvCallee * pCallee, ...) const SAL_THROW(()) +inline void SAL_CALL Environment::invoke(uno_EnvCallee * pCallee, ...) const { if (_pEnv) { @@ -237,17 +237,17 @@ inline void SAL_CALL Environment::invoke(uno_EnvCallee * pCallee, ...) const SAL } -inline void SAL_CALL Environment::enter() const SAL_THROW(()) +inline void SAL_CALL Environment::enter() const { uno_Environment_enter(_pEnv); } -inline int SAL_CALL Environment::isValid(rtl::OUString * pReason) const SAL_THROW(()) +inline int SAL_CALL Environment::isValid(rtl::OUString * pReason) const { return uno_Environment_isValid(_pEnv, (rtl_uString **)pReason); } -inline Environment Environment::getCurrent(rtl::OUString const & typeName) SAL_THROW(()) +inline Environment Environment::getCurrent(rtl::OUString const & typeName) { Environment environment; diff --git a/include/uno/mapping.hxx b/include/uno/mapping.hxx index dfc03ae1fdef..a75b315a8442 100644 --- a/include/uno/mapping.hxx +++ b/include/uno/mapping.hxx @@ -53,13 +53,13 @@ class Mapping public: // these are here to force memory de/allocation to sal lib. /// @cond INTERNAL - 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 @@ -72,8 +72,7 @@ public: */ inline Mapping( const ::rtl::OUString & rFrom, const ::rtl::OUString & rTo, - const ::rtl::OUString & rAddPurpose = ::rtl::OUString() ) - SAL_THROW(()); + const ::rtl::OUString & rAddPurpose = ::rtl::OUString() ); /** Holds a mapping from the specified source to the specified destination. @@ -83,8 +82,7 @@ public: */ inline Mapping( uno_Environment * pFrom, uno_Environment * pTo, - const ::rtl::OUString & rAddPurpose = ::rtl::OUString() ) - SAL_THROW(()); + const ::rtl::OUString & rAddPurpose = ::rtl::OUString() ); /** Holds a mapping from the specified source to the specified destination environment. @@ -94,56 +92,55 @@ public: @param rAddPurpose additional purpose */ inline Mapping(const Environment & rFrom, const Environment & rTo, - const ::rtl::OUString & rAddPurpose = ::rtl::OUString() ) - SAL_THROW(()); + const ::rtl::OUString & rAddPurpose = ::rtl::OUString() ); /** Constructor. @param pMapping another mapping */ - inline Mapping( uno_Mapping * pMapping = 0 ) SAL_THROW(()); + inline Mapping( uno_Mapping * pMapping = 0 ); /** Copy constructor. @param rMapping another mapping */ - inline Mapping( const Mapping & rMapping ) SAL_THROW(()); + inline Mapping( const Mapping & rMapping ); /** Destructor. */ - inline ~Mapping() SAL_THROW(()); + inline ~Mapping(); /** Sets a given mapping. @param pMapping another mapping @return this mapping */ - inline Mapping & SAL_CALL operator = ( uno_Mapping * pMapping ) SAL_THROW(()); + inline Mapping & SAL_CALL operator = ( uno_Mapping * pMapping ); /** Sets a given mapping. @param rMapping another mapping @return this mapping */ - inline Mapping & SAL_CALL operator = ( const Mapping & rMapping ) SAL_THROW(()) + inline Mapping & SAL_CALL operator = ( const Mapping & rMapping ) { return operator = ( rMapping._pMapping ); } /** Provides a pointer to the C mapping. The returned mapping is NOT acquired! @return UNacquired C mapping */ - inline uno_Mapping * SAL_CALL get() const SAL_THROW(()) + inline uno_Mapping * SAL_CALL get() const { return _pMapping; } /** Tests if a mapping is set. @return true if a mapping is set */ - inline bool SAL_CALL is() const SAL_THROW(()) + inline bool SAL_CALL is() const { return (_pMapping != 0); } /** Releases a set mapping. */ - inline void SAL_CALL clear() SAL_THROW(()); + inline void SAL_CALL clear(); /** Maps an interface from one environment to another. @@ -151,14 +148,14 @@ public: @param pTypeDescr type description of interface @return mapped interface */ - inline void * SAL_CALL mapInterface( void * pInterface, typelib_InterfaceTypeDescription * pTypeDescr ) const SAL_THROW(()); + inline void * SAL_CALL mapInterface( void * pInterface, typelib_InterfaceTypeDescription * pTypeDescr ) const; /** Maps an interface from one environment to another. @param pInterface source interface @param pTypeDescr type description of interface @return mapped interface */ - inline void * SAL_CALL mapInterface( void * pInterface, typelib_TypeDescription * pTypeDescr ) const SAL_THROW(()) + inline void * SAL_CALL mapInterface( void * pInterface, typelib_TypeDescription * pTypeDescr ) const { return mapInterface( pInterface, (typelib_InterfaceTypeDescription *)pTypeDescr ); } /** Maps an interface from one environment to another. @@ -168,7 +165,7 @@ public: @return mapped interface */ inline void * SAL_CALL mapInterface( - void * pInterface, const ::com::sun::star::uno::Type & rType ) const SAL_THROW(()); + void * pInterface, const ::com::sun::star::uno::Type & rType ) const; /** Maps an interface from one environment to another. @@ -176,7 +173,7 @@ public: @param pInterface source interface @param pTypeDescr type description of interface */ - inline void SAL_CALL mapInterface( void ** ppOut, void * pInterface, typelib_InterfaceTypeDescription * pTypeDescr ) const SAL_THROW(()) + inline void SAL_CALL mapInterface( void ** ppOut, void * pInterface, typelib_InterfaceTypeDescription * pTypeDescr ) const { (*_pMapping->mapInterface)( _pMapping, ppOut, pInterface, pTypeDescr ); } /** Maps an interface from one environment to another. @@ -184,7 +181,7 @@ public: @param pInterface source interface @param pTypeDescr type description of interface */ - inline void SAL_CALL mapInterface( void ** ppOut, void * pInterface, typelib_TypeDescription * pTypeDescr ) const SAL_THROW(()) + inline void SAL_CALL mapInterface( void ** ppOut, void * pInterface, typelib_TypeDescription * pTypeDescr ) const { (*_pMapping->mapInterface)( _pMapping, ppOut, pInterface, (typelib_InterfaceTypeDescription *)pTypeDescr ); } /** Maps an interface from one environment to another. @@ -193,12 +190,11 @@ public: @param pInterface source interface @param rType type of interface to be mapped */ - inline void SAL_CALL mapInterface( void ** ppOut, void * pInterface, const ::com::sun::star::uno::Type & rType ) const SAL_THROW(()); + inline void SAL_CALL mapInterface( void ** ppOut, void * pInterface, const ::com::sun::star::uno::Type & rType ) const; }; inline Mapping::Mapping( const ::rtl::OUString & rFrom, const ::rtl::OUString & rTo, const ::rtl::OUString & rAddPurpose ) - SAL_THROW(()) : _pMapping( 0 ) { uno_getMappingByName( &_pMapping, rFrom.pData, rTo.pData, rAddPurpose.pData ); @@ -206,7 +202,6 @@ inline Mapping::Mapping( inline Mapping::Mapping( uno_Environment * pFrom, uno_Environment * pTo, const ::rtl::OUString & rAddPurpose ) - SAL_THROW(()) : _pMapping( 0 ) { uno_getMapping( &_pMapping, pFrom, pTo, rAddPurpose.pData ); @@ -214,33 +209,32 @@ inline Mapping::Mapping( inline Mapping::Mapping( const Environment & rFrom, const Environment & rTo, const ::rtl::OUString & rAddPurpose ) - SAL_THROW(()) : _pMapping(0) { uno_getMapping( &_pMapping, rFrom.get(), rTo.get(), rAddPurpose.pData ); } -inline Mapping::Mapping( uno_Mapping * pMapping ) SAL_THROW(()) +inline Mapping::Mapping( uno_Mapping * pMapping ) : _pMapping( pMapping ) { if (_pMapping) (*_pMapping->acquire)( _pMapping ); } -inline Mapping::Mapping( const Mapping & rMapping ) SAL_THROW(()) +inline Mapping::Mapping( const Mapping & rMapping ) : _pMapping( rMapping._pMapping ) { if (_pMapping) (*_pMapping->acquire)( _pMapping ); } -inline Mapping::~Mapping() SAL_THROW(()) +inline Mapping::~Mapping() { if (_pMapping) (*_pMapping->release)( _pMapping ); } -inline void Mapping::clear() SAL_THROW(()) +inline void Mapping::clear() { if (_pMapping) { @@ -249,7 +243,7 @@ inline void Mapping::clear() SAL_THROW(()) } } -inline Mapping & Mapping::operator = ( uno_Mapping * pMapping ) SAL_THROW(()) +inline Mapping & Mapping::operator = ( uno_Mapping * pMapping ) { if (pMapping) (*pMapping->acquire)( pMapping ); @@ -261,7 +255,6 @@ inline Mapping & Mapping::operator = ( uno_Mapping * pMapping ) SAL_THROW(()) inline void Mapping::mapInterface( void ** ppOut, void * pInterface, const ::com::sun::star::uno::Type & rType ) const - SAL_THROW(()) { typelib_TypeDescription * pTD = 0; TYPELIB_DANGER_GET( &pTD, rType.getTypeLibType() ); @@ -274,7 +267,6 @@ inline void Mapping::mapInterface( inline void * Mapping::mapInterface( void * pInterface, typelib_InterfaceTypeDescription * pTypeDescr ) const - SAL_THROW(()) { void * pOut = 0; (*_pMapping->mapInterface)( _pMapping, &pOut, pInterface, pTypeDescr ); @@ -283,7 +275,6 @@ inline void * Mapping::mapInterface( inline void * Mapping::mapInterface( void * pInterface, const ::com::sun::star::uno::Type & rType ) const - SAL_THROW(()) { void * pOut = 0; mapInterface( &pOut, pInterface, rType ); @@ -303,7 +294,7 @@ inline void * Mapping::mapInterface( @deprecated */ template< class C > -inline bool mapToCpp( Reference< C > * ppRet, uno_Interface * pUnoI ) SAL_THROW(()) +inline bool mapToCpp( Reference< C > * ppRet, uno_Interface * pUnoI ) { Mapping aMapping( ::rtl::OUString( UNO_LB_UNO ), @@ -326,7 +317,7 @@ inline bool mapToCpp( Reference< C > * ppRet, uno_Interface * pUnoI ) SAL_THROW( @deprecated */ template< class C > -inline bool mapToUno( uno_Interface ** ppRet, const Reference< C > & x ) SAL_THROW(()) +inline bool mapToUno( uno_Interface ** ppRet, const Reference< C > & x ) { Mapping aMapping( ::rtl::OUString( CPPU_CURRENT_LANGUAGE_BINDING_NAME ), diff --git a/include/unotools/sharedunocomponent.hxx b/include/unotools/sharedunocomponent.hxx index 3b8e164dc8a7..5130fa73b88a 100644 --- a/include/unotools/sharedunocomponent.hxx +++ b/include/unotools/sharedunocomponent.hxx @@ -261,13 +261,13 @@ namespace utl // conversion to Any template < class INTERFACE, class COMPONENT > - inline void SAL_CALL operator <<= ( ::com::sun::star::uno::Any & rAny, const SharedUNOComponent< INTERFACE, COMPONENT >& value ) SAL_THROW(()) + inline void SAL_CALL operator <<= ( ::com::sun::star::uno::Any & rAny, const SharedUNOComponent< INTERFACE, COMPONENT >& value ) { rAny <<= value.getTyped(); } template < class INTERFACE, class COMPONENT > - inline ::com::sun::star::uno::Any SAL_CALL makeAny( const SharedUNOComponent< INTERFACE, COMPONENT >& value ) SAL_THROW(()) + inline ::com::sun::star::uno::Any SAL_CALL makeAny( const SharedUNOComponent< INTERFACE, COMPONENT >& value ) { return makeAny( value.getTyped() ); } diff --git a/include/vcl/ImageListProvider.hxx b/include/vcl/ImageListProvider.hxx index faf1c25f3dcc..924720b17842 100644 --- a/include/vcl/ImageListProvider.hxx +++ b/include/vcl/ImageListProvider.hxx @@ -39,7 +39,7 @@ namespace vcl /* abstract */ class IImageListProvider { public: - virtual ImageList getImageList(ImageListType) SAL_THROW (( css::lang::IllegalArgumentException )) = 0; + virtual ImageList getImageList(ImageListType) = 0; protected: ~IImageListProvider() {} diff --git a/include/xmlreader/xmlreader.hxx b/include/xmlreader/xmlreader.hxx index 716c6c7300a0..02866c3f5868 100644 --- a/include/xmlreader/xmlreader.hxx +++ b/include/xmlreader/xmlreader.hxx @@ -41,10 +41,7 @@ class OOO_DLLPUBLIC_XMLREADER XmlReader: private boost::noncopyable { public: XmlReader(char const *sStr, size_t nLength); - explicit XmlReader(OUString const & fileUrl) - SAL_THROW(( - com::sun::star::container::NoSuchElementException, - com::sun::star::uno::RuntimeException)); + explicit XmlReader(OUString const & fileUrl); ~XmlReader(); |