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/com | |
parent | db246b491c1639942d9f952658d33974e9b06201 (diff) |
various: remove SAL_THROW macro
Change-Id: I9464179a736b91f5bc32eb5e5e89b3b4e3da3494
Diffstat (limited to 'include/com')
-rw-r--r-- | include/com/sun/star/uno/Any.h | 107 | ||||
-rw-r--r-- | include/com/sun/star/uno/Any.hxx | 82 | ||||
-rw-r--r-- | include/com/sun/star/uno/Reference.h | 104 | ||||
-rw-r--r-- | include/com/sun/star/uno/Reference.hxx | 77 | ||||
-rw-r--r-- | include/com/sun/star/uno/Sequence.h | 43 | ||||
-rw-r--r-- | include/com/sun/star/uno/Sequence.hxx | 19 | ||||
-rw-r--r-- | include/com/sun/star/uno/Type.h | 84 | ||||
-rw-r--r-- | include/com/sun/star/uno/Type.hxx | 59 | ||||
-rw-r--r-- | include/com/sun/star/uno/genfunc.h | 9 | ||||
-rw-r--r-- | include/com/sun/star/uno/genfunc.hxx | 3 |
10 files changed, 274 insertions, 313 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) { |