diff options
author | Daniel Boelzle <dbo@openoffice.org> | 2001-03-09 11:10:57 +0000 |
---|---|---|
committer | Daniel Boelzle <dbo@openoffice.org> | 2001-03-09 11:10:57 +0000 |
commit | fee2a34fc7ce4301dd5335dd7c6072f5696480dd (patch) | |
tree | 8d9520635af5a7149d58b21bf75d0a38af80ee15 /cppu/inc | |
parent | 6014186320950379ba1ff0a102f792d233b6babe (diff) |
revised function throw () clauses
Diffstat (limited to 'cppu/inc')
-rw-r--r-- | cppu/inc/com/sun/star/uno/Any.h | 102 | ||||
-rw-r--r-- | cppu/inc/com/sun/star/uno/Any.hxx | 70 | ||||
-rw-r--r-- | cppu/inc/com/sun/star/uno/Reference.h | 115 | ||||
-rw-r--r-- | cppu/inc/com/sun/star/uno/Reference.hxx | 26 | ||||
-rw-r--r-- | cppu/inc/com/sun/star/uno/Sequence.h | 57 | ||||
-rw-r--r-- | cppu/inc/com/sun/star/uno/Sequence.hxx | 42 | ||||
-rw-r--r-- | cppu/inc/com/sun/star/uno/Type.h | 87 | ||||
-rw-r--r-- | cppu/inc/com/sun/star/uno/Type.hxx | 59 | ||||
-rw-r--r-- | cppu/inc/com/sun/star/uno/genfunc.h | 10 | ||||
-rw-r--r-- | cppu/inc/com/sun/star/uno/genfunc.hxx | 10 | ||||
-rw-r--r-- | cppu/inc/typelib/typedescription.h | 97 | ||||
-rw-r--r-- | cppu/inc/typelib/typedescription.hxx | 52 | ||||
-rw-r--r-- | cppu/inc/uno/any2.h | 18 | ||||
-rw-r--r-- | cppu/inc/uno/current_context.h | 6 | ||||
-rw-r--r-- | cppu/inc/uno/current_context.hxx | 8 | ||||
-rw-r--r-- | cppu/inc/uno/data.h | 28 | ||||
-rw-r--r-- | cppu/inc/uno/environment.h | 23 | ||||
-rw-r--r-- | cppu/inc/uno/environment.hxx | 47 | ||||
-rw-r--r-- | cppu/inc/uno/mapping.h | 16 | ||||
-rw-r--r-- | cppu/inc/uno/mapping.hxx | 75 | ||||
-rw-r--r-- | cppu/inc/uno/sequence2.h | 20 | ||||
-rw-r--r-- | cppu/inc/uno/threadpool.h | 22 |
22 files changed, 532 insertions, 458 deletions
diff --git a/cppu/inc/com/sun/star/uno/Any.h b/cppu/inc/com/sun/star/uno/Any.h index 45de58e237a2..623769cceb44 100644 --- a/cppu/inc/com/sun/star/uno/Any.h +++ b/cppu/inc/com/sun/star/uno/Any.h @@ -2,9 +2,9 @@ * * $RCSfile: Any.h,v $ * - * $Revision: 1.2 $ + * $Revision: 1.3 $ * - * last change: $Author: dbo $ $Date: 2000-12-21 14:35:22 $ + * last change: $Author: dbo $ $Date: 2001-03-09 12:10:55 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -79,7 +79,6 @@ #include <rtl/alloc.h> #endif -class BinaryCompatible_Impl; /** */ //for docpp namespace com @@ -110,27 +109,27 @@ class Any : public uno_Any { public: // these are here to force memory de/allocation to sal lib. - inline static void * SAL_CALL operator new( size_t nSize ) throw () + 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 ) throw () + 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 ) throw () + inline static void * SAL_CALL operator new( size_t, void * pMem ) SAL_THROW( () ) { return pMem; } - inline static void SAL_CALL operator delete( void *, void * ) throw () + inline static void SAL_CALL operator delete( void *, void * ) SAL_THROW( () ) {} /** Default constructor: Any holds no value; its type is void. <br> */ - inline Any() throw (); + inline Any() SAL_THROW( () ); /** Copy constructor: Sets value of the given any. <br> @param rAny another any */ - inline Any( const Any & rAny ) throw (); + inline Any( const Any & rAny ) SAL_THROW( () ); /** Constructor: Sets a copy of the given data. @@ -138,7 +137,7 @@ public: @param pData value @param rType type of value */ - inline Any( const void * pData, const Type & rType ) throw (); + inline Any( const void * pData, const Type & rType ) SAL_THROW( () ); /** Constructor: Sets a copy of the given data. @@ -146,7 +145,7 @@ public: @param pData value @param pTypeDescr type of value */ - inline Any( const void * pData, typelib_TypeDescription * pTypeDescr ) throw (); + inline Any( const void * pData, typelib_TypeDescription * pTypeDescr ) SAL_THROW( () ); /** Constructor: Sets a copy of the given data. @@ -154,13 +153,13 @@ public: @param pData value @param pType type of value */ - inline Any( const void * pData, typelib_TypeDescriptionReference * pType ) throw (); + inline Any( const void * pData, typelib_TypeDescriptionReference * pType ) SAL_THROW( () ); /** Destructor: Destructs any content and frees memory. <br> */ - inline ~Any() throw (); + inline ~Any() SAL_THROW( () ); /** Assignment operator: Sets the value of the given any. @@ -168,19 +167,19 @@ public: @param rAny another any (right side) @return this any */ - inline Any & SAL_CALL operator = ( const Any & rAny ) throw (); + inline Any & SAL_CALL operator = ( const Any & rAny ) SAL_THROW( () ); /** Gets the type of the set value. <br> @return a Type object of the set value */ - inline const Type & SAL_CALL getValueType() const throw () + inline const Type & SAL_CALL getValueType() const SAL_THROW( () ) { return * reinterpret_cast< const Type * >( &pType ); } /** Gets the type of the set value. <br> @return the <b>un</b>acquired type description reference of the set value */ - inline typelib_TypeDescriptionReference * SAL_CALL getValueTypeRef() const throw () + inline typelib_TypeDescriptionReference * SAL_CALL getValueTypeRef() const SAL_THROW( () ) { return pType; } /** Gets the type description of the set value.<br> @@ -189,35 +188,35 @@ public: <br> @param a pointer to type description pointer */ - inline void SAL_CALL getValueTypeDescription( typelib_TypeDescription ** ppTypeDescr ) const throw () + inline void SAL_CALL getValueTypeDescription( typelib_TypeDescription ** ppTypeDescr ) const SAL_THROW( () ) { ::typelib_typedescriptionreference_getDescription( ppTypeDescr, getValueTypeRef() ); } /** Gets the type class of the set value. <br> @return the type class of the set value */ - inline TypeClass SAL_CALL getValueTypeClass() const throw () + inline TypeClass SAL_CALL getValueTypeClass() const SAL_THROW( () ) { return (TypeClass)pType->eTypeClass; } /** Gets the type name of the set value. <br> @return the type name of the set value */ - inline ::rtl::OUString SAL_CALL getValueTypeName() const throw () + inline ::rtl::OUString SAL_CALL getValueTypeName() const SAL_THROW( () ) { return ::rtl::OUString( pType->pTypeName ); } /** Tests if any contains a value. <br> @return true if any has a value, false otherwise */ - inline sal_Bool SAL_CALL hasValue() const throw () + inline sal_Bool SAL_CALL hasValue() const SAL_THROW( () ) { return (TypeClass_VOID != getValueTypeClass()); } /** Gets a pointer to the set value. <br> @return a pointer to the set value */ - inline const void * SAL_CALL getValue() const throw () + inline const void * SAL_CALL getValue() const SAL_THROW( () ) { return pData; } /** Sets a value. If the any already contains a value, that value will be destructed @@ -226,27 +225,27 @@ public: @param pData pointer to value @param rType type of value */ - inline void SAL_CALL setValue( const void * pData, const Type & rType ) throw (); + inline void SAL_CALL setValue( const void * pData, const Type & rType ) SAL_THROW( () ); /** Sets a value. If the any already contains a value, that value will be destructed and its memory freed. <br> @param pData pointer to value @param pType type of value */ - inline void SAL_CALL setValue( const void * pData, typelib_TypeDescriptionReference * pType ) throw (); + inline void SAL_CALL setValue( const void * pData, typelib_TypeDescriptionReference * pType ) SAL_THROW( () ); /** Sets a value. If the any already contains a value, that value will be destructed and its memory freed. <br> @param pData pointer to value @param pTypeDescr type description of value */ - inline void SAL_CALL setValue( const void * pData, typelib_TypeDescription * pTypeDescr ) throw (); + inline void SAL_CALL setValue( const void * pData, typelib_TypeDescription * pTypeDescr ) SAL_THROW( () ); /** 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. <br> */ - inline void SAL_CALL clear() throw (); + inline void SAL_CALL clear() SAL_THROW( () ); /** Equality operator: compares two anys.<br> The values need not be of equal type, e.g. a short integer is compared to @@ -255,7 +254,7 @@ public: @param rAny another any (right side) @return true if both any contains equal values */ - inline sal_Bool SAL_CALL operator == ( const Any & rAny ) const throw (); + inline sal_Bool SAL_CALL operator == ( const Any & rAny ) const SAL_THROW( () ); /** Unequality operator: compares two anys.<br> The values need not be of equal type, e.g. a short integer is compared to a long integer. @@ -263,11 +262,8 @@ public: @param rAny another any (right side) @return true if both any contains unequal values */ - inline sal_Bool SAL_CALL operator != ( const Any & rAny ) const throw () + inline sal_Bool SAL_CALL operator != ( const Any & rAny ) const SAL_THROW( () ) { return (! operator == ( rAny )); } - - // test the binary compatibility - friend class BinaryCompatible_Impl; }; /** Template function to generically construct an any from a C++ value. @@ -276,7 +272,7 @@ public: @return an any */ template< class C > -inline Any SAL_CALL makeAny( const C & value ) throw (); +inline Any SAL_CALL makeAny( const C & value ) SAL_THROW( () ); class BaseReference; class Type; @@ -287,7 +283,7 @@ class Type; @param value source value (right side) */ template< class C > -inline void SAL_CALL operator <<= ( ::com::sun::star::uno::Any & rAny, const C & value ) throw (); +inline void SAL_CALL operator <<= ( ::com::sun::star::uno::Any & rAny, const C & value ) SAL_THROW( () ); /** Template binary >>= operator to assign a value from an any.<br> If the any does not contain a value that can be assigned <b>without</b> data loss, this operation will fail returning false. @@ -297,7 +293,7 @@ inline void SAL_CALL operator <<= ( ::com::sun::star::uno::Any & rAny, const C & @return true if assignment was possible without data loss */ template< class C > -inline sal_Bool SAL_CALL operator >>= ( const ::com::sun::star::uno::Any & rAny, C & value ) throw (); +inline sal_Bool SAL_CALL operator >>= ( const ::com::sun::star::uno::Any & rAny, C & value ) SAL_THROW( () ); /** Template equality operator: compares set value of left side any to right side value.<br> The values need not be of equal type, e.g. a short integer is compared to @@ -310,7 +306,7 @@ inline sal_Bool SAL_CALL operator >>= ( const ::com::sun::star::uno::Any & rAny, @return true if values are equal, false otherwise */ template< class C > -inline sal_Bool SAL_CALL operator == ( const ::com::sun::star::uno::Any & rAny, const C & value ) throw (); +inline sal_Bool SAL_CALL operator == ( const ::com::sun::star::uno::Any & rAny, const C & value ) SAL_THROW( () ); /** Template unequality operator: compares set value of left side any to right side value.<br> The values need not be of equal type, e.g. a short integer is compared to a long integer.<br> @@ -322,40 +318,40 @@ inline sal_Bool SAL_CALL operator == ( const ::com::sun::star::uno::Any & rAny, @return true if values are unequal, false otherwise */ template< class C > -inline sal_Bool SAL_CALL operator != ( const ::com::sun::star::uno::Any & rAny, const C & value ) throw () +inline sal_Bool SAL_CALL operator != ( const ::com::sun::star::uno::Any & rAny, const C & value ) SAL_THROW( () ) { return (! operator == ( rAny, value )); } // additional specialized >>= and == operators // bool -inline sal_Bool SAL_CALL operator >>= ( const Any & rAny, sal_Bool & value ) throw (); -inline sal_Bool SAL_CALL operator == ( const Any & rAny, const sal_Bool & value ) throw (); +inline sal_Bool SAL_CALL operator >>= ( const Any & rAny, sal_Bool & value ) SAL_THROW( () ); +inline sal_Bool SAL_CALL operator == ( const Any & rAny, const sal_Bool & value ) SAL_THROW( () ); // byte -inline sal_Bool SAL_CALL operator >>= ( const Any & rAny, sal_Int8 & value ) throw (); +inline sal_Bool SAL_CALL operator >>= ( const Any & rAny, sal_Int8 & value ) SAL_THROW( () ); // short -inline sal_Bool SAL_CALL operator >>= ( const Any & rAny, sal_Int16 & value ) throw (); -inline sal_Bool SAL_CALL operator >>= ( const Any & rAny, sal_uInt16 & value ) throw (); +inline sal_Bool SAL_CALL operator >>= ( const Any & rAny, sal_Int16 & value ) SAL_THROW( () ); +inline sal_Bool SAL_CALL operator >>= ( const Any & rAny, sal_uInt16 & value ) SAL_THROW( () ); // long -inline sal_Bool SAL_CALL operator >>= ( const Any & rAny, sal_Int32 & value ) throw (); -inline sal_Bool SAL_CALL operator >>= ( const Any & rAny, sal_uInt32 & value ) throw (); +inline sal_Bool SAL_CALL operator >>= ( const Any & rAny, sal_Int32 & value ) SAL_THROW( () ); +inline sal_Bool SAL_CALL operator >>= ( const Any & rAny, sal_uInt32 & value ) SAL_THROW( () ); // hyper -inline sal_Bool SAL_CALL operator >>= ( const Any & rAny, sal_Int64 & value ) throw (); -inline sal_Bool SAL_CALL operator >>= ( const Any & rAny, sal_uInt64 & value ) throw (); +inline sal_Bool SAL_CALL operator >>= ( const Any & rAny, sal_Int64 & value ) SAL_THROW( () ); +inline sal_Bool SAL_CALL operator >>= ( const Any & rAny, sal_uInt64 & value ) SAL_THROW( () ); // float -inline sal_Bool SAL_CALL operator >>= ( const Any & rAny, float & value ) throw (); +inline sal_Bool SAL_CALL operator >>= ( const Any & rAny, float & value ) SAL_THROW( () ); // double -inline sal_Bool SAL_CALL operator >>= ( const Any & rAny, double & value ) throw (); +inline sal_Bool SAL_CALL operator >>= ( const Any & rAny, double & value ) SAL_THROW( () ); // string -inline sal_Bool SAL_CALL operator >>= ( const Any & rAny, ::rtl::OUString & value ) throw (); -inline sal_Bool SAL_CALL operator == ( const Any & rAny, const ::rtl::OUString & value ) throw (); +inline sal_Bool SAL_CALL operator >>= ( const Any & rAny, ::rtl::OUString & value ) SAL_THROW( () ); +inline sal_Bool SAL_CALL operator == ( const Any & rAny, const ::rtl::OUString & value ) SAL_THROW( () ); // type -inline sal_Bool SAL_CALL operator >>= ( const Any & rAny, Type & value ) throw (); -inline sal_Bool SAL_CALL operator == ( const Any & rAny, const Type & value ) throw (); +inline sal_Bool SAL_CALL operator >>= ( const Any & rAny, Type & value ) SAL_THROW( () ); +inline sal_Bool SAL_CALL operator == ( const Any & rAny, const Type & value ) SAL_THROW( () ); // any -inline sal_Bool SAL_CALL operator >>= ( const Any & rAny, Any & value ) throw (); +inline sal_Bool SAL_CALL operator >>= ( const Any & rAny, Any & value ) SAL_THROW( () ); // interface -inline sal_Bool SAL_CALL operator == ( const Any & rAny, const BaseReference & value ) throw (); +inline sal_Bool SAL_CALL operator == ( const Any & rAny, const BaseReference & value ) SAL_THROW( () ); } } @@ -367,7 +363,7 @@ inline sal_Bool SAL_CALL operator == ( const Any & rAny, const BaseReference & v @param dummy typed pointer for function signature @return type of IDL type <b>any</b> */ -inline const ::com::sun::star::uno::Type & SAL_CALL getCppuType( const ::com::sun::star::uno::Any * ) throw () +inline const ::com::sun::star::uno::Type & SAL_CALL getCppuType( const ::com::sun::star::uno::Any * ) SAL_THROW( () ) { return * reinterpret_cast< const ::com::sun::star::uno::Type * >( ::typelib_static_type_getByTypeClass( typelib_TypeClass_ANY ) ); diff --git a/cppu/inc/com/sun/star/uno/Any.hxx b/cppu/inc/com/sun/star/uno/Any.hxx index d2e4d88349d5..bc5cab368b07 100644 --- a/cppu/inc/com/sun/star/uno/Any.hxx +++ b/cppu/inc/com/sun/star/uno/Any.hxx @@ -2,9 +2,9 @@ * * $RCSfile: Any.hxx,v $ * - * $Revision: 1.2 $ + * $Revision: 1.3 $ * - * last change: $Author: dbo $ $Date: 2000-12-21 14:35:22 $ + * last change: $Author: dbo $ $Date: 2001-03-09 12:10:55 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -95,72 +95,72 @@ namespace uno { //__________________________________________________________________________________________________ -inline Any::Any() throw () +inline Any::Any() SAL_THROW( () ) { ::uno_any_construct( this, 0, 0, cpp_acquire ); } //__________________________________________________________________________________________________ -inline Any::Any( const Any & rAny ) throw () +inline Any::Any( const Any & rAny ) SAL_THROW( () ) { ::uno_type_any_construct( this, rAny.pData, rAny.getValueTypeRef(), cpp_acquire ); } //__________________________________________________________________________________________________ -inline Any::Any( const void * pData, const Type & rType ) throw () +inline Any::Any( const void * pData, const Type & rType ) SAL_THROW( () ) { ::uno_type_any_construct( this, const_cast< void * >( pData ), rType.getTypeLibType(), cpp_acquire ); } //__________________________________________________________________________________________________ -inline Any::Any( const void * pData, typelib_TypeDescription * pTypeDescr ) throw () +inline Any::Any( const void * pData, typelib_TypeDescription * pTypeDescr ) SAL_THROW( () ) { ::uno_any_construct( this, const_cast< void * >( pData ), pTypeDescr, cpp_acquire ); } //__________________________________________________________________________________________________ -inline Any::Any( const void * pData, typelib_TypeDescriptionReference * pType ) throw () +inline Any::Any( const void * pData, typelib_TypeDescriptionReference * pType ) SAL_THROW( () ) { ::uno_type_any_construct( this, const_cast< void * >( pData ), pType, cpp_acquire ); } //__________________________________________________________________________________________________ -inline Any::~Any() throw () +inline Any::~Any() SAL_THROW( () ) { ::uno_any_destruct( this, cpp_release ); } //__________________________________________________________________________________________________ -inline Any & Any::operator = ( const Any & rAny ) throw () +inline Any & Any::operator = ( const Any & rAny ) SAL_THROW( () ) { if (this != &rAny) setValue( rAny.getValue(), rAny.getValueTypeRef() ); return *this; } //__________________________________________________________________________________________________ -inline void Any::setValue( const void * pData, const Type & rType ) throw () +inline void Any::setValue( const void * pData, const Type & rType ) SAL_THROW( () ) { ::uno_type_any_assign( this, const_cast< void * >( pData ), rType.getTypeLibType(), cpp_acquire, cpp_release ); } //__________________________________________________________________________________________________ -inline void Any::setValue( const void * pData, typelib_TypeDescriptionReference * pType ) throw () +inline void Any::setValue( const void * pData, typelib_TypeDescriptionReference * pType ) SAL_THROW( () ) { ::uno_type_any_assign( this, const_cast< void * >( pData ), pType, cpp_acquire, cpp_release ); } //__________________________________________________________________________________________________ -inline void Any::setValue( const void * pData, typelib_TypeDescription * pTypeDescr ) throw () +inline void Any::setValue( const void * pData, typelib_TypeDescription * pTypeDescr ) SAL_THROW( () ) { ::uno_any_assign( this, const_cast< void * >( pData ), pTypeDescr, cpp_acquire, cpp_release ); } //__________________________________________________________________________________________________ -inline void Any::clear() throw () +inline void Any::clear() SAL_THROW( () ) { ::uno_any_assign( this, 0, 0, cpp_acquire, cpp_release ); } //__________________________________________________________________________________________________ -inline sal_Bool Any::operator == ( const Any & rAny ) const throw () +inline sal_Bool Any::operator == ( const Any & rAny ) const SAL_THROW( () ) { const Type & rType = ::getCppuType( this ); return ::uno_type_equalData( @@ -171,21 +171,21 @@ inline sal_Bool Any::operator == ( const Any & rAny ) const throw () //__________________________________________________________________________________________________ template< class C > -inline Any SAL_CALL makeAny( const C & value ) throw () +inline Any SAL_CALL makeAny( const C & value ) SAL_THROW( () ) { return Any( &value, ::getCppuType( &value ) ); } //__________________________________________________________________________________________________ template< class C > -inline void SAL_CALL operator <<= ( Any & rAny, const C & value ) throw () +inline void SAL_CALL operator <<= ( Any & rAny, const C & value ) SAL_THROW( () ) { rAny.setValue( &value, ::getCppuType( &value ) ); } //__________________________________________________________________________________________________ template< class C > -inline sal_Bool SAL_CALL operator >>= ( const Any & rAny, C & value ) throw () +inline sal_Bool SAL_CALL operator >>= ( const Any & rAny, C & value ) SAL_THROW( () ) { const Type & rType = ::getCppuType( &value ); return ::uno_type_assignData( @@ -196,7 +196,7 @@ inline sal_Bool SAL_CALL operator >>= ( const Any & rAny, C & value ) throw () // bool //__________________________________________________________________________________________________ -inline sal_Bool SAL_CALL operator >>= ( const ::com::sun::star::uno::Any & rAny, sal_Bool & value ) throw () +inline sal_Bool SAL_CALL operator >>= ( const ::com::sun::star::uno::Any & rAny, sal_Bool & value ) SAL_THROW( () ) { if (TypeClass_BOOLEAN == rAny.getValueTypeClass()) { @@ -206,14 +206,14 @@ inline sal_Bool SAL_CALL operator >>= ( const ::com::sun::star::uno::Any & rAny, return sal_False; } //__________________________________________________________________________________________________ -inline sal_Bool SAL_CALL operator == ( const Any & rAny, const sal_Bool & value ) throw () +inline sal_Bool SAL_CALL operator == ( const Any & rAny, const sal_Bool & value ) SAL_THROW( () ) { return (TypeClass_BOOLEAN == rAny.getValueTypeClass() && (value != sal_False) == (* reinterpret_cast< const sal_Bool * >( rAny.getValue() ) != sal_False)); } // byte //__________________________________________________________________________________________________ -inline sal_Bool SAL_CALL operator >>= ( const ::com::sun::star::uno::Any & rAny, sal_Int8 & value ) throw () +inline sal_Bool SAL_CALL operator >>= ( const ::com::sun::star::uno::Any & rAny, sal_Int8 & value ) SAL_THROW( () ) { if (TypeClass_BYTE == rAny.getValueTypeClass()) { @@ -224,7 +224,7 @@ inline sal_Bool SAL_CALL operator >>= ( const ::com::sun::star::uno::Any & rAny, } // short //__________________________________________________________________________________________________ -inline sal_Bool SAL_CALL operator >>= ( const Any & rAny, sal_Int16 & value ) throw () +inline sal_Bool SAL_CALL operator >>= ( const Any & rAny, sal_Int16 & value ) SAL_THROW( () ) { switch (rAny.getValueTypeClass()) { @@ -239,7 +239,7 @@ inline sal_Bool SAL_CALL operator >>= ( const Any & rAny, sal_Int16 & value ) th return sal_False; } //__________________________________________________________________________________________________ -inline sal_Bool SAL_CALL operator >>= ( const Any & rAny, sal_uInt16 & value ) throw () +inline sal_Bool SAL_CALL operator >>= ( const Any & rAny, sal_uInt16 & value ) SAL_THROW( () ) { switch (rAny.getValueTypeClass()) { @@ -255,7 +255,7 @@ inline sal_Bool SAL_CALL operator >>= ( const Any & rAny, sal_uInt16 & value ) t } // long //__________________________________________________________________________________________________ -inline sal_Bool SAL_CALL operator >>= ( const Any & rAny, sal_Int32 & value ) throw () +inline sal_Bool SAL_CALL operator >>= ( const Any & rAny, sal_Int32 & value ) SAL_THROW( () ) { switch (rAny.getValueTypeClass()) { @@ -276,7 +276,7 @@ inline sal_Bool SAL_CALL operator >>= ( const Any & rAny, sal_Int32 & value ) th return sal_False; } //__________________________________________________________________________________________________ -inline sal_Bool SAL_CALL operator >>= ( const Any & rAny, sal_uInt32 & value ) throw () +inline sal_Bool SAL_CALL operator >>= ( const Any & rAny, sal_uInt32 & value ) SAL_THROW( () ) { switch (rAny.getValueTypeClass()) { @@ -298,7 +298,7 @@ inline sal_Bool SAL_CALL operator >>= ( const Any & rAny, sal_uInt32 & value ) t } // hyper //__________________________________________________________________________________________________ -inline sal_Bool SAL_CALL operator >>= ( const Any & rAny, sal_Int64 & value ) throw () +inline sal_Bool SAL_CALL operator >>= ( const Any & rAny, sal_Int64 & value ) SAL_THROW( () ) { switch (rAny.getValueTypeClass()) { @@ -325,7 +325,7 @@ inline sal_Bool SAL_CALL operator >>= ( const Any & rAny, sal_Int64 & value ) th return sal_False; } //__________________________________________________________________________________________________ -inline sal_Bool SAL_CALL operator >>= ( const Any & rAny, sal_uInt64 & value ) throw () +inline sal_Bool SAL_CALL operator >>= ( const Any & rAny, sal_uInt64 & value ) SAL_THROW( () ) { switch (rAny.getValueTypeClass()) { @@ -353,7 +353,7 @@ inline sal_Bool SAL_CALL operator >>= ( const Any & rAny, sal_uInt64 & value ) t } // float //__________________________________________________________________________________________________ -inline sal_Bool SAL_CALL operator >>= ( const Any & rAny, float & value ) throw () +inline sal_Bool SAL_CALL operator >>= ( const Any & rAny, float & value ) SAL_THROW( () ) { switch (rAny.getValueTypeClass()) { @@ -374,7 +374,7 @@ inline sal_Bool SAL_CALL operator >>= ( const Any & rAny, float & value ) throw } // double //__________________________________________________________________________________________________ -inline sal_Bool SAL_CALL operator >>= ( const Any & rAny, double & value ) throw () +inline sal_Bool SAL_CALL operator >>= ( const Any & rAny, double & value ) SAL_THROW( () ) { switch (rAny.getValueTypeClass()) { @@ -404,7 +404,7 @@ inline sal_Bool SAL_CALL operator >>= ( const Any & rAny, double & value ) throw } // string //__________________________________________________________________________________________________ -inline sal_Bool SAL_CALL operator >>= ( const Any & rAny, ::rtl::OUString & value ) throw () +inline sal_Bool SAL_CALL operator >>= ( const Any & rAny, ::rtl::OUString & value ) SAL_THROW( () ) { if (TypeClass_STRING == rAny.getValueTypeClass()) { @@ -414,14 +414,14 @@ inline sal_Bool SAL_CALL operator >>= ( const Any & rAny, ::rtl::OUString & valu return sal_False; } //__________________________________________________________________________________________________ -inline sal_Bool SAL_CALL operator == ( const Any & rAny, const ::rtl::OUString & value ) throw () +inline sal_Bool SAL_CALL operator == ( const Any & rAny, const ::rtl::OUString & value ) SAL_THROW( () ) { return (TypeClass_STRING == rAny.getValueTypeClass() && value == * reinterpret_cast< const ::rtl::OUString * >( rAny.getValue() )); } // type //__________________________________________________________________________________________________ -inline sal_Bool SAL_CALL operator >>= ( const Any & rAny, Type & value ) throw () +inline sal_Bool SAL_CALL operator >>= ( const Any & rAny, Type & value ) SAL_THROW( () ) { if (TypeClass_TYPE == rAny.getValueTypeClass()) { @@ -431,21 +431,21 @@ inline sal_Bool SAL_CALL operator >>= ( const Any & rAny, Type & value ) throw ( return sal_False; } //__________________________________________________________________________________________________ -inline sal_Bool SAL_CALL operator == ( const Any & rAny, const Type & value ) throw () +inline sal_Bool SAL_CALL operator == ( const Any & rAny, const Type & value ) SAL_THROW( () ) { return (TypeClass_TYPE == rAny.getValueTypeClass() && value == * reinterpret_cast< const Type * >( rAny.getValue() )); } // any //__________________________________________________________________________________________________ -inline sal_Bool SAL_CALL operator >>= ( const Any & rAny, Any & value ) throw () +inline sal_Bool SAL_CALL operator >>= ( const Any & rAny, Any & value ) SAL_THROW( () ) { value = rAny; return sal_True; } // interface //__________________________________________________________________________________________________ -inline sal_Bool SAL_CALL operator == ( const Any & rAny, const BaseReference & value ) throw () +inline sal_Bool SAL_CALL operator == ( const Any & rAny, const BaseReference & value ) SAL_THROW( () ) { if (TypeClass_INTERFACE == rAny.getValueTypeClass()) { @@ -462,7 +462,7 @@ inline sal_Bool SAL_CALL operator == ( const Any & rAny, const BaseReference & v // operator to compare to an any. //__________________________________________________________________________________________________ template< class C > -inline sal_Bool SAL_CALL operator == ( const Any & rAny, const C & value ) throw () +inline sal_Bool SAL_CALL operator == ( const Any & rAny, const C & value ) SAL_THROW( () ) { const Type & rType = ::getCppuType( &value ); return ::uno_type_equalData( diff --git a/cppu/inc/com/sun/star/uno/Reference.h b/cppu/inc/com/sun/star/uno/Reference.h index 9ee0fde8ab02..c7775f07e4f3 100644 --- a/cppu/inc/com/sun/star/uno/Reference.h +++ b/cppu/inc/com/sun/star/uno/Reference.h @@ -2,9 +2,9 @@ * * $RCSfile: Reference.h,v $ * - * $Revision: 1.5 $ + * $Revision: 1.6 $ * - * last change: $Author: dbo $ $Date: 2001-02-16 16:38:07 $ + * last change: $Author: dbo $ $Date: 2001-03-09 12:10:55 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -91,7 +91,7 @@ enum __UnoReference_NoAcquire interface, i.e. transferring ownership to it. <br> */ - UNO_REF_NO_ACQUIRE = 0xfeedbeef + UNO_REF_NO_ACQUIRE }; /** Base reference class holding/ acquiring an interface.<br> @@ -111,73 +111,73 @@ protected: Sets null reference. <br> */ - inline BaseReference() throw (); + inline BaseReference() SAL_THROW( () ); /** Constructor: Sets given interface pointer. <br> @param pInterface an interface pointer */ - inline BaseReference( XInterface * pInterface ) throw (); + inline BaseReference( XInterface * pInterface ) SAL_THROW( () ); /** Constructor: Sets reference to given interface pointer without acquiring it. <br> @param pInterface interface pointer - @param dummy UNO_REF_NO_ACQUIRE to force obvious distinction to other constructors + @param dummy SAL_NO_ACQUIRE to force obvious distinction to other constructors */ - inline BaseReference( XInterface * pInterface, __UnoReference_NoAcquire ) throw (); + inline BaseReference( XInterface * pInterface, __sal_NoAcquire ) SAL_THROW( () ); /** Copy constructor: Copies interface reference. <br> @param rRef another reference */ - inline BaseReference( const BaseReference & rRef ) throw (); + inline BaseReference( const BaseReference & rRef ) SAL_THROW( () ); /** Destructor: Releases interface reference. <br> */ - inline ~BaseReference() throw (); + inline ~BaseReference() SAL_THROW( () ); /** Sets interface pointer. An interface already set will be released. <br> @param pInterface an interface pointer @return true, if non-null interface was set */ - inline sal_Bool SAL_CALL set( XInterface * pInterface ) throw (); + inline sal_Bool SAL_CALL set( XInterface * pInterface ) SAL_THROW( () ); /** Sets interface pointer without acquiring it. An interface already set will be released. <br> @param pInterface an interface pointer */ - inline sal_Bool SAL_CALL set( XInterface * pInterface, __UnoReference_NoAcquire ) throw (); + inline sal_Bool SAL_CALL set( XInterface * pInterface, __sal_NoAcquire ) SAL_THROW( () ); public: // these are here to force memory de/allocation to sal lib. - inline static void * SAL_CALL operator new( size_t nSize ) throw () + 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 ) throw () + 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 ) throw () + inline static void * SAL_CALL operator new( size_t, void * pMem ) SAL_THROW( () ) { return pMem; } - inline static void SAL_CALL operator delete( void *, void * ) throw () + inline static void SAL_CALL operator delete( void *, void * ) SAL_THROW( () ) {} /** Clears reference, i.e. releases interface. Reference is null after clear() call. <br> */ - inline void SAL_CALL clear() throw (); + inline void SAL_CALL clear() SAL_THROW( () ); /** Gets interface pointer. This call does <b>not</b> acquire the interface. <br> @return <b>un</b>acquired interface pointer */ - inline XInterface * SAL_CALL get() const throw () + inline XInterface * SAL_CALL get() const SAL_THROW( () ) { return _pInterface; } /** Checks if reference is null. <br> @return true if reference acquires an interface, i.e. is not null */ - inline sal_Bool SAL_CALL is() const throw () + inline sal_Bool SAL_CALL is() const SAL_THROW( () ) { return (_pInterface != 0); } /** Equality operator: compares two interfaces<br> Checks if both references are null or refer to the same object. @@ -185,22 +185,22 @@ public: @param rRef another reference @return true if both references are null or refer to the same object, false otherwise */ - inline sal_Bool SAL_CALL operator == ( const BaseReference & rRef ) const throw (); + inline sal_Bool SAL_CALL operator == ( const BaseReference & rRef ) const SAL_THROW( () ); /** Unequality operator: compares two interfaces<br> Checks if both references are null or refer to the same object. <br> @param rRef another reference @return false if both references are null or refer to the same object, true otherwise */ - inline sal_Bool SAL_CALL operator != ( const BaseReference & rRef ) const throw () + inline sal_Bool SAL_CALL operator != ( const BaseReference & rRef ) const SAL_THROW( () ) { return (! operator == ( rRef )); } // needed for stl container operations, though this makes no sense on pointers - inline sal_Bool SAL_CALL operator < ( const BaseReference & rRef ) const throw () + inline sal_Bool SAL_CALL operator < ( const BaseReference & rRef ) const SAL_THROW( () ) { return (_pInterface < rRef._pInterface); } }; -/** Enum defining UNO_QUERY and UNO_REF_NO_ACQUIRE for query interface constructor +/** Enum defining UNO_QUERY and UNO_REF_QUERY for query interface constructor of reference template. <br> */ @@ -209,11 +209,11 @@ enum __UnoReference_Query /** This enum value can be used for querying interface constructor of reference template. <br> */ - UNO_REF_QUERY = 0xdb0e121e, + UNO_QUERY, /** This enum value can be used for querying interface constructor of reference template. <br> */ - UNO_QUERY = 0xdb0 + UNO_REF_QUERY }; /** Template reference class for interface type derived from BaseReference. @@ -229,23 +229,23 @@ class Reference : public BaseReference @param pInterface interface pointer @return interface of demanded type (may be null) */ - inline static XInterface * SAL_CALL __query( XInterface * pInterface ) throw (RuntimeException); + inline static XInterface * SAL_CALL __query( XInterface * pInterface ) SAL_THROW( (RuntimeException) ); public: // these are here to force memory de/allocation to sal lib. - static void * SAL_CALL operator new( size_t nSize ) throw () + static void * SAL_CALL operator new( size_t nSize ) SAL_THROW( () ) { return ::rtl_allocateMemory( nSize ); } - static void SAL_CALL operator delete( void * pMem ) throw () + static void SAL_CALL operator delete( void * pMem ) SAL_THROW( () ) { ::rtl_freeMemory( pMem ); } - static void * SAL_CALL operator new( size_t, void * pMem ) throw () + static void * SAL_CALL operator new( size_t, void * pMem ) SAL_THROW( () ) { return pMem; } - static void SAL_CALL operator delete( void *, void * ) throw () + static void SAL_CALL operator delete( void *, void * ) SAL_THROW( () ) {} /** Default Constructor: Sets null reference. <br> */ - inline Reference() throw () + inline Reference() SAL_THROW( () ) : BaseReference() {} /** Copy constructor: @@ -253,7 +253,7 @@ public: <br> @param rRef another reference */ - inline Reference( const Reference< interface_type > & rRef ) throw () + inline Reference( const Reference< interface_type > & rRef ) SAL_THROW( () ) : BaseReference( rRef ) {} /** Constructor: @@ -261,7 +261,7 @@ public: <br> @param pInterface an interface pointer */ - inline Reference( interface_type * pInterface ) throw () + inline Reference( interface_type * pInterface ) SAL_THROW( () ) : BaseReference( pInterface ) {} @@ -271,8 +271,17 @@ public: @param pInterface another reference @param dummy UNO_REF_NO_ACQUIRE to force obvious distinction to other constructors */ - inline Reference( XInterface * pInterface, __UnoReference_NoAcquire ) throw () - : BaseReference( pInterface, UNO_REF_NO_ACQUIRE ) + inline Reference( XInterface * pInterface, __UnoReference_NoAcquire ) SAL_THROW( () ) + : BaseReference( pInterface, SAL_NO_ACQUIRE ) + {} + /** Constructor: + Sets given interface pointer without acquiring it. + <br> + @param pInterface another reference + @param dummy SAL_NO_ACQUIRE to force obvious distinction to other constructors + */ + inline Reference( XInterface * pInterface, __sal_NoAcquire ) SAL_THROW( () ) + : BaseReference( pInterface, SAL_NO_ACQUIRE ) {} /** Constructor: @@ -281,8 +290,8 @@ public: @param rRef another reference @param dummy UNO_QUERY or UNO_REF_QUERY to force obvious distinction to other constructors */ - inline Reference( const BaseReference & rRef, __UnoReference_Query ) throw (RuntimeException) - : BaseReference( __query( rRef.get() ), UNO_REF_NO_ACQUIRE ) + inline Reference( const BaseReference & rRef, __UnoReference_Query ) SAL_THROW( (RuntimeException) ) + : BaseReference( __query( rRef.get() ), SAL_NO_ACQUIRE ) {} /** Constructor: Queries given interface for reference interface type (<b>interface_type</b>). @@ -290,8 +299,8 @@ public: @param pInterface an interface pointer @param dummy UNO_QUERY to force obvious distinction to other constructors */ - inline Reference( XInterface * pInterface, __UnoReference_Query ) throw (RuntimeException) - : BaseReference( __query( pInterface ), UNO_REF_NO_ACQUIRE ) + inline Reference( XInterface * pInterface, __UnoReference_Query ) SAL_THROW( (RuntimeException) ) + : BaseReference( __query( pInterface ), SAL_NO_ACQUIRE ) {} /** Queries given interface for reference interface type (<b>interface_type</b>) @@ -301,8 +310,8 @@ public: @param pInterface an interface pointer @return true, if non-null interface was set */ - inline sal_Bool SAL_CALL set( XInterface * pInterface, __UnoReference_Query ) throw (RuntimeException) - { return BaseReference::set( __query( pInterface ), UNO_REF_NO_ACQUIRE ); } + inline sal_Bool SAL_CALL set( XInterface * pInterface, __UnoReference_Query ) SAL_THROW( (RuntimeException) ) + { return BaseReference::set( __query( pInterface ), SAL_NO_ACQUIRE ); } /** Queries given interface for reference interface type (<b>interface_type</b>) and sets it. An interface already set will be released. @@ -310,8 +319,8 @@ public: @param rRef another reference @return true, if non-null interface was set */ - inline sal_Bool SAL_CALL set( const BaseReference & rRef, __UnoReference_Query ) throw (RuntimeException) - { return BaseReference::set( __query( rRef.get() ), UNO_REF_NO_ACQUIRE ); } + inline sal_Bool SAL_CALL set( const BaseReference & rRef, __UnoReference_Query ) SAL_THROW( (RuntimeException) ) + { return BaseReference::set( __query( rRef.get() ), SAL_NO_ACQUIRE ); } /** Sets the given interface. An interface already set will be released. @@ -319,7 +328,7 @@ public: @param rRef another reference @return true, if non-null interface was set */ - inline sal_Bool SAL_CALL set( const Reference< interface_type > & rRef ) throw () + inline sal_Bool SAL_CALL set( const Reference< interface_type > & rRef ) SAL_THROW( () ) { return BaseReference::set( rRef.get() ); } /** Sets the given interface. An interface already set will be released. @@ -327,7 +336,7 @@ public: @param pInterface another interface @return true, if non-null interface was set */ - inline sal_Bool SAL_CALL set( interface_type * pInterface ) throw () + inline sal_Bool SAL_CALL set( interface_type * pInterface ) SAL_THROW( () ) { return BaseReference::set( pInterface ); } /** Assignment operator: @@ -337,7 +346,7 @@ public: @param pInterface an interface pointer @return this reference */ - inline Reference< interface_type > & SAL_CALL operator = ( interface_type * pInterface ) throw (); + inline Reference< interface_type > & SAL_CALL operator = ( interface_type * pInterface ) SAL_THROW( () ); /** Assignment operator: Acquires given interface reference and sets reference. An interface already set will be released. @@ -345,7 +354,7 @@ public: @param rRef an interface reference @return this reference */ - inline Reference< interface_type > & SAL_CALL operator = ( const Reference< interface_type > & rRef ) throw () + inline Reference< interface_type > & SAL_CALL operator = ( const Reference< interface_type > & rRef ) SAL_THROW( () ) { return operator = ( rRef.get() ); } /** Queries given interface for type <b>interface_type</b>. @@ -353,15 +362,15 @@ public: @param pInterface interface pointer @return interface reference of demanded type (may be null) */ - inline static Reference< interface_type > SAL_CALL query( XInterface * pInterface ) throw (RuntimeException) - { return Reference< interface_type >( __query( pInterface ), UNO_REF_NO_ACQUIRE ); } + inline static Reference< interface_type > SAL_CALL query( XInterface * pInterface ) SAL_THROW( (RuntimeException) ) + { return Reference< interface_type >( __query( pInterface ), SAL_NO_ACQUIRE ); } /** Queries given interface reference for type <b>interface_type</b>. <br> @param rRef interface reference @return interface reference of demanded type (may be null) */ - inline static Reference< interface_type > SAL_CALL query( const BaseReference & rRef ) throw (RuntimeException) - { return Reference< interface_type >( __query( rRef.get() ), UNO_REF_NO_ACQUIRE ); } + inline static Reference< interface_type > SAL_CALL query( const BaseReference & rRef ) SAL_THROW( (RuntimeException) ) + { return Reference< interface_type >( __query( rRef.get() ), SAL_NO_ACQUIRE ); } /** Cast operatory to Reference< XInterface >: Reference objects are binary compatible and any interface must be derived @@ -369,7 +378,7 @@ public: This a useful direct cast possibility. <br> */ - inline SAL_CALL operator const Reference< XInterface > & () const throw () + inline SAL_CALL operator const Reference< XInterface > & () const SAL_THROW( () ) { return * reinterpret_cast< const Reference< XInterface > * >( this ); } /** Dereference operator: @@ -377,7 +386,7 @@ public: <br> @return <b>un</b>acquired interface pointer */ - inline interface_type * SAL_CALL operator -> () const throw () + inline interface_type * SAL_CALL operator -> () const SAL_THROW( () ) { return static_cast< interface_type * >( BaseReference::get() ); } /** Gets interface pointer. @@ -385,7 +394,7 @@ public: <br> @return <b>un</b>acquired interface pointer */ - inline interface_type * SAL_CALL get() const throw () + inline interface_type * SAL_CALL get() const SAL_THROW( () ) { return static_cast< interface_type * >( BaseReference::get() ); } }; diff --git a/cppu/inc/com/sun/star/uno/Reference.hxx b/cppu/inc/com/sun/star/uno/Reference.hxx index c4cd49758eab..cdd9e6dc2fbb 100644 --- a/cppu/inc/com/sun/star/uno/Reference.hxx +++ b/cppu/inc/com/sun/star/uno/Reference.hxx @@ -2,9 +2,9 @@ * * $RCSfile: Reference.hxx,v $ * - * $Revision: 1.6 $ + * $Revision: 1.7 $ * - * last change: $Author: dbo $ $Date: 2001-02-28 15:34:05 $ + * last change: $Author: dbo $ $Date: 2001-03-09 12:10:55 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -85,37 +85,37 @@ namespace uno { //__________________________________________________________________________________________________ -inline BaseReference::BaseReference() throw () +inline BaseReference::BaseReference() SAL_THROW( () ) : _pInterface( 0 ) { } //__________________________________________________________________________________________________ -inline BaseReference::BaseReference( XInterface * pInterface ) throw () +inline BaseReference::BaseReference( XInterface * pInterface ) SAL_THROW( () ) : _pInterface( pInterface ) { if (_pInterface) _pInterface->acquire(); } //__________________________________________________________________________________________________ -inline BaseReference::BaseReference( XInterface * pInterface, __UnoReference_NoAcquire ) throw () +inline BaseReference::BaseReference( XInterface * pInterface, __sal_NoAcquire ) SAL_THROW( () ) : _pInterface( pInterface ) { } //__________________________________________________________________________________________________ -inline BaseReference::BaseReference( const BaseReference & rRef ) throw () +inline BaseReference::BaseReference( const BaseReference & rRef ) SAL_THROW( () ) : _pInterface( rRef._pInterface ) { if (_pInterface) _pInterface->acquire(); } //__________________________________________________________________________________________________ -inline BaseReference::~BaseReference() throw () +inline BaseReference::~BaseReference() SAL_THROW( () ) { if (_pInterface) _pInterface->release(); } //__________________________________________________________________________________________________ -inline sal_Bool BaseReference::operator == ( const BaseReference & rRef ) const throw () +inline sal_Bool BaseReference::operator == ( const BaseReference & rRef ) const SAL_THROW( () ) { if (_pInterface == rRef._pInterface) return sal_True; @@ -125,7 +125,7 @@ inline sal_Bool BaseReference::operator == ( const BaseReference & rRef ) const return (x1.get() == x2.get()); } //__________________________________________________________________________________________________ -inline sal_Bool BaseReference::set( XInterface * pInterface ) throw () +inline sal_Bool BaseReference::set( XInterface * pInterface ) SAL_THROW( () ) { if (pInterface != _pInterface) { @@ -138,7 +138,7 @@ inline sal_Bool BaseReference::set( XInterface * pInterface ) throw () return (pInterface != 0); } //__________________________________________________________________________________________________ -inline sal_Bool BaseReference::set( XInterface * pInterface, __UnoReference_NoAcquire ) throw () +inline sal_Bool BaseReference::set( XInterface * pInterface, __sal_NoAcquire ) SAL_THROW( () ) { if (_pInterface) _pInterface->release(); @@ -146,7 +146,7 @@ inline sal_Bool BaseReference::set( XInterface * pInterface, __UnoReference_NoAc return (pInterface != 0); } //__________________________________________________________________________________________________ -inline void BaseReference::clear() throw () +inline void BaseReference::clear() SAL_THROW( () ) { if (_pInterface) { @@ -158,7 +158,7 @@ inline void BaseReference::clear() throw () //__________________________________________________________________________________________________ template< class interface_type > inline Reference< interface_type > & Reference< interface_type >::operator = ( - interface_type * pInterface ) throw () + interface_type * pInterface ) SAL_THROW( () ) { BaseReference::set( pInterface ); return *this; @@ -166,7 +166,7 @@ inline Reference< interface_type > & Reference< interface_type >::operator = ( //__________________________________________________________________________________________________ template< class interface_type > inline XInterface * Reference< interface_type >::__query( - XInterface * pInterface ) throw (RuntimeException) + XInterface * pInterface ) SAL_THROW( (RuntimeException) ) { if (pInterface) { diff --git a/cppu/inc/com/sun/star/uno/Sequence.h b/cppu/inc/com/sun/star/uno/Sequence.h index d59824b755d8..c326ad444dde 100644 --- a/cppu/inc/com/sun/star/uno/Sequence.h +++ b/cppu/inc/com/sun/star/uno/Sequence.h @@ -2,9 +2,9 @@ * * $RCSfile: Sequence.h,v $ * - * $Revision: 1.7 $ + * $Revision: 1.8 $ * - * last change: $Author: dbo $ $Date: 2001-02-16 16:32:20 $ + * last change: $Author: dbo $ $Date: 2001-03-09 12:10:55 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -115,13 +115,13 @@ class Sequence public: // these are here to force memory de/allocation to sal lib. - inline static void * SAL_CALL operator new( size_t nSize ) throw () + 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 ) throw () + 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 ) throw () + inline static void * SAL_CALL operator new( size_t, void * pMem ) SAL_THROW( () ) { return pMem; } - inline static void SAL_CALL operator delete( void *, void * ) throw () + inline static void SAL_CALL operator delete( void *, void * ) SAL_THROW( () ) {} // static pointer to typelib type @@ -136,31 +136,38 @@ public: Creates an empty sequence. <br> */ - inline Sequence< E >() throw (); + inline Sequence< E >() SAL_THROW( () ); /** Copy constructor: Creates a copy of given sequence. <br> @param rSeq another sequence of same type */ - inline Sequence< E >( const Sequence< E > & rSeq ) throw (); + inline Sequence< E >( const Sequence< E > & rSeq ) SAL_THROW( () ); + /** Constructor: + Takes over ownership of given sequence. + <br> + @param pSequence a sequence + @param dummy SAL_NO_ACQUIRE to force obvious distinction to other constructors + */ + inline Sequence< E >( uno_Sequence * pSequence, __sal_NoAcquire ) SAL_THROW( () ); /** Constructor: Creates a copy of given elements. <br> @param pElement an array of elements @param len length of array */ - inline Sequence< E >( const E * pElements, sal_Int32 len ) throw (); + inline Sequence< E >( const E * pElements, sal_Int32 len ) SAL_THROW( () ); /** Constructor: Creates a default constructed sequence of given length. <br> @param len initial sequence length */ - inline Sequence< E >( sal_Int32 len ) throw (); + inline Sequence< E >( sal_Int32 len ) SAL_THROW( () ); /** Destructor: Releases sequence handle. Last handle will destruct elements and free memory. <br> */ - inline ~Sequence< E >() throw (); + inline ~Sequence< E >() SAL_THROW( () ); /** Assignment operator: Acquires given sequence handle and releases previously set handle. @@ -168,26 +175,26 @@ public: @param rSeq another sequence of same type @return this sequence */ - inline Sequence< E > & SAL_CALL operator = ( const Sequence< E > & rSeq ) throw (); + inline Sequence< E > & SAL_CALL operator = ( const Sequence< E > & rSeq ) SAL_THROW( () ); /** Gets type of elements. <br> @return type of element */ - inline const Type & getElementType() const throw () + inline const Type & getElementType() const SAL_THROW( () ) { return ::getCppuType( (const ElementType *)0 ); } /** Gets length of sequence. <br> @return length of sequence */ - inline sal_Int32 SAL_CALL getLength() const throw () + inline sal_Int32 SAL_CALL getLength() const SAL_THROW( () ) { return _pSequence->nElements; } /** Tests whether the sequence has elements, i.e. elements count is greater than zero. <br> @return true, if elements count is greater than zero */ - inline sal_Bool SAL_CALL hasElements() const throw () + inline sal_Bool SAL_CALL hasElements() const SAL_THROW( () ) { return (_pSequence->nElements > 0); } /** Gets a pointer to elements array for <b>reading</b>. @@ -195,7 +202,7 @@ public: <br> @return pointer to elements array */ - inline const E * SAL_CALL getConstArray() const throw () + inline const E * SAL_CALL getConstArray() const SAL_THROW( () ) { return reinterpret_cast< const E * >( _pSequence->elements ); } /** Gets a pointer to elements array for <b>reading and writing</b>.<br> In general if the sequence has a handle acquired by other sequences @@ -205,7 +212,7 @@ public: <br> @return pointer to elements array */ - inline E * SAL_CALL getArray() throw (); + inline E * SAL_CALL getArray() SAL_THROW( () ); /** Non-const index operator: Obtains a reference to element indexed at given position.<br> @@ -217,7 +224,7 @@ public: @param nIndex index @return non-const C++ reference to element */ - inline E & SAL_CALL operator [] ( sal_Int32 nIndex ) throw (); + inline E & SAL_CALL operator [] ( sal_Int32 nIndex ) SAL_THROW( () ); /** Const index operator: Obtains a reference to element indexed at given position.<br> The implementation does <b>not</b> check for array bounds!<br> @@ -225,7 +232,7 @@ public: @param nIndex index @return const C++ reference to element */ - inline const E & SAL_CALL operator [] ( sal_Int32 nIndex ) const throw (); + inline const E & SAL_CALL operator [] ( sal_Int32 nIndex ) const SAL_THROW( () ); /** Equality operator: Compares two sequences. @@ -233,14 +240,14 @@ public: @param rSeq another sequence of same type (right side) @return true if both sequences are equal, false otherwise */ - inline sal_Bool SAL_CALL operator == ( const Sequence< E > & rSeq ) const throw (); + inline sal_Bool SAL_CALL operator == ( const Sequence< E > & rSeq ) const SAL_THROW( () ); /** Unequality operator: Compares two sequences. <br> @param rSeq another sequence of same type (right side) @return false if both sequences are equal, true otherwise */ - inline sal_Bool SAL_CALL operator != ( const Sequence< E > & rSeq ) const throw () + inline sal_Bool SAL_CALL operator != ( const Sequence< E > & rSeq ) const SAL_THROW( () ) { return (! operator == ( rSeq )); } /** Reallocates sequence to new length. @@ -254,7 +261,7 @@ public: <br> @param nSize new size of sequence */ - inline void SAL_CALL realloc( sal_Int32 nSize ) throw (); + inline void SAL_CALL realloc( sal_Int32 nSize ) SAL_THROW( () ); }; /** Creates a UNO byte sequence from a SAL byte sequence. @@ -263,7 +270,7 @@ public: @return a UNO byte sequence */ inline ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL toUnoSequence( - const ::rtl::ByteSequence & rByteSequence ) throw (); + const ::rtl::ByteSequence & rByteSequence ) SAL_THROW( () ); } } @@ -277,7 +284,7 @@ inline ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL toUnoSequence( */ template< class S > inline const ::com::sun::star::uno::Type & -SAL_CALL getCppuType( const ::com::sun::star::uno::Sequence< S > * ) throw (); +SAL_CALL getCppuType( const ::com::sun::star::uno::Sequence< S > * ) SAL_THROW( () ); /** Gets the meta type of IDL <b>sequence< char ></b>. This function has been introduced due to ambiguities with unsigned short. @@ -286,6 +293,6 @@ SAL_CALL getCppuType( const ::com::sun::star::uno::Sequence< S > * ) throw (); @return type of IDL <b>sequence< char ></b> */ inline const ::com::sun::star::uno::Type & -SAL_CALL getCharSequenceCppuType() throw (); +SAL_CALL getCharSequenceCppuType() SAL_THROW( () ); #endif diff --git a/cppu/inc/com/sun/star/uno/Sequence.hxx b/cppu/inc/com/sun/star/uno/Sequence.hxx index 6f514dabae3b..fe0b37c7fff8 100644 --- a/cppu/inc/com/sun/star/uno/Sequence.hxx +++ b/cppu/inc/com/sun/star/uno/Sequence.hxx @@ -2,9 +2,9 @@ * * $RCSfile: Sequence.hxx,v $ * - * $Revision: 1.8 $ + * $Revision: 1.9 $ * - * last change: $Author: dbo $ $Date: 2000-12-21 14:35:22 $ + * last change: $Author: dbo $ $Date: 2001-03-09 12:10:55 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -103,43 +103,49 @@ typelib_TypeDescriptionReference * Sequence< E >::s_pType = 0; //__________________________________________________________________________________________________ template< class E > -inline Sequence< E >::Sequence() throw () +inline Sequence< E >::Sequence() SAL_THROW( () ) { const Type & rType = ::getCppuType( this ); ::uno_type_sequence_construct( &_pSequence, rType.getTypeLibType(), 0, 0, cpp_acquire ); } //__________________________________________________________________________________________________ template< class E > -inline Sequence< E >::Sequence( const Sequence< E > & rSeq ) throw () +inline Sequence< E >::Sequence( const Sequence< E > & rSeq ) SAL_THROW( () ) { ::osl_incrementInterlockedCount( &rSeq._pSequence->nRefCount ); _pSequence = rSeq._pSequence; } //__________________________________________________________________________________________________ template< class E > -inline Sequence< E >::Sequence( const E * pElements, sal_Int32 len ) throw () +inline Sequence< E >::Sequence( uno_Sequence * pSequence, __sal_NoAcquire ) SAL_THROW( () ) + : _pSequence( pSequence ) +{ +} +//__________________________________________________________________________________________________ +template< class E > +inline Sequence< E >::Sequence( const E * pElements, sal_Int32 len ) SAL_THROW( () ) { const Type & rType = ::getCppuType( this ); - ::uno_type_sequence_construct( &_pSequence, rType.getTypeLibType(), - const_cast< E * >( pElements ), len, cpp_acquire ); + ::uno_type_sequence_construct( + &_pSequence, rType.getTypeLibType(), const_cast< E * >( pElements ), len, cpp_acquire ); } //__________________________________________________________________________________________________ template< class E > -inline Sequence< E >::Sequence( sal_Int32 len ) throw () +inline Sequence< E >::Sequence( sal_Int32 len ) SAL_THROW( () ) { const Type & rType = ::getCppuType( this ); ::uno_type_sequence_construct( &_pSequence, rType.getTypeLibType(), 0, len, cpp_acquire ); } //__________________________________________________________________________________________________ template< class E > -inline Sequence< E >::~Sequence() throw () +inline Sequence< E >::~Sequence() SAL_THROW( () ) { const Type & rType = ::getCppuType( this ); ::uno_type_destructData( this, rType.getTypeLibType(), cpp_release ); } //__________________________________________________________________________________________________ template< class E > -inline Sequence< E > & Sequence< E >::operator = ( const Sequence< E > & rSeq ) throw () +inline Sequence< E > & Sequence< E >::operator = ( const Sequence< E > & rSeq ) SAL_THROW( () ) { const Type & rType = ::getCppuType( this ); ::uno_type_sequence_assign( @@ -148,7 +154,7 @@ inline Sequence< E > & Sequence< E >::operator = ( const Sequence< E > & rSeq ) } //__________________________________________________________________________________________________ template< class E > -inline sal_Bool Sequence< E >::operator == ( const Sequence< E > & rSeq ) const throw () +inline sal_Bool Sequence< E >::operator == ( const Sequence< E > & rSeq ) const SAL_THROW( () ) { if (_pSequence == rSeq._pSequence) return sal_True; @@ -160,7 +166,7 @@ inline sal_Bool Sequence< E >::operator == ( const Sequence< E > & rSeq ) const } //__________________________________________________________________________________________________ template< class E > -inline E * Sequence< E >::getArray() throw () +inline E * Sequence< E >::getArray() SAL_THROW( () ) { const Type & rType = ::getCppuType( this ); ::uno_type_sequence_reference2One( @@ -169,21 +175,21 @@ inline E * Sequence< E >::getArray() throw () } //__________________________________________________________________________________________________ template< class E > -inline E & Sequence< E >::operator [] ( sal_Int32 nIndex ) throw () +inline E & Sequence< E >::operator [] ( sal_Int32 nIndex ) SAL_THROW( () ) { OSL_ENSURE( nIndex >= 0 && nIndex < getLength(), "### illegal index of sequence!" ); return getArray()[ nIndex ]; } //__________________________________________________________________________________________________ template< class E > -inline const E & Sequence< E >::operator [] ( sal_Int32 nIndex ) const throw () +inline const E & Sequence< E >::operator [] ( sal_Int32 nIndex ) const SAL_THROW( () ) { OSL_ENSURE( nIndex >= 0 && nIndex < getLength(), "### illegal index of sequence!" ); return getConstArray()[ nIndex ]; } //__________________________________________________________________________________________________ template< class E > -inline void Sequence< E >::realloc( sal_Int32 nSize ) throw () +inline void Sequence< E >::realloc( sal_Int32 nSize ) SAL_THROW( () ) { const Type & rType = ::getCppuType( this ); ::uno_type_sequence_realloc( @@ -192,7 +198,7 @@ inline void Sequence< E >::realloc( sal_Int32 nSize ) throw () //-------------------------------------------------------------------------------------------------- inline ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL toUnoSequence( - const ::rtl::ByteSequence & rByteSequence ) throw () + const ::rtl::ByteSequence & rByteSequence ) SAL_THROW( () ) { return ::com::sun::star::uno::Sequence< sal_Int8 >( * reinterpret_cast< const ::com::sun::star::uno::Sequence< sal_Int8 > * >( &rByteSequence ) ); @@ -206,7 +212,7 @@ inline ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL toUnoSequence( // generic sequence template template< class S > inline const ::com::sun::star::uno::Type & -SAL_CALL getCppuType( const ::com::sun::star::uno::Sequence< S > * ) throw () +SAL_CALL getCppuType( const ::com::sun::star::uno::Sequence< S > * ) SAL_THROW( () ) { if (! ::com::sun::star::uno::Sequence< S >::s_pType) { @@ -226,7 +232,7 @@ static typelib_TypeDescriptionReference * s_pType_com_sun_star_uno_Sequence_Char // char sequence inline const ::com::sun::star::uno::Type & -SAL_CALL getCharSequenceCppuType() throw () +SAL_CALL getCharSequenceCppuType() SAL_THROW( () ) { #if !( (defined(__SUNPRO_CC) && (__SUNPRO_CC == 0x500)) || (defined(__GNUC__) && defined(__APPLE__)) ) static typelib_TypeDescriptionReference * s_pType_com_sun_star_uno_Sequence_Char = 0; diff --git a/cppu/inc/com/sun/star/uno/Type.h b/cppu/inc/com/sun/star/uno/Type.h index f487574c75ae..711472937b10 100644 --- a/cppu/inc/com/sun/star/uno/Type.h +++ b/cppu/inc/com/sun/star/uno/Type.h @@ -2,9 +2,9 @@ * * $RCSfile: Type.h,v $ * - * $Revision: 1.2 $ + * $Revision: 1.3 $ * - * last change: $Author: dbo $ $Date: 2000-12-21 14:35:22 $ + * last change: $Author: dbo $ $Date: 2001-03-09 12:10:55 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -101,7 +101,7 @@ enum __UnoType_NoAcquire type description reference, i.e. transferring ownership to it. <br> */ - UNO_TYPE_NO_ACQUIRE = 0xbebeef1e + UNO_TYPE_NO_ACQUIRE }; /** C++ class representing an IDL meta type. @@ -119,20 +119,20 @@ class Type public: // these are here to force memory de/allocation to sal lib. - inline static void * SAL_CALL operator new( size_t nSize ) throw () + 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 ) throw () + 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 ) throw () + inline static void * SAL_CALL operator new( size_t, void * pMem ) SAL_THROW( () ) { return pMem; } - inline static void SAL_CALL operator delete( void *, void * ) throw () + inline static void SAL_CALL operator delete( void *, void * ) SAL_THROW( () ) {} /** Default Constructor: Type is set to void. <br> */ - inline Type() throw (); + inline Type() SAL_THROW( () ); /** Constructor: Type is constructed by given name and type class. @@ -140,7 +140,7 @@ public: @param eTypeClass type class of type @param rTypeName name of type */ - inline Type( TypeClass eTypeClass, const ::rtl::OUString & rTypeName ) throw (); + inline Type( TypeClass eTypeClass, const ::rtl::OUString & rTypeName ) SAL_THROW( () ); /** Constructor: Type is constructed by given name and type class. @@ -148,14 +148,14 @@ public: @param eTypeClass type class of type @param pTypeName name of type */ - inline Type( TypeClass eTypeClass, const sal_Char * pTypeName ) throw (); + inline Type( TypeClass eTypeClass, const sal_Char * pTypeName ) SAL_THROW( () ); /** Constructor: Type is (copy) constructed by given C type description reference. <br> @param pType C type description reference */ - inline Type( typelib_TypeDescriptionReference * pType ) throw (); + inline Type( typelib_TypeDescriptionReference * pType ) SAL_THROW( () ); /** Constructor: Type is (copy) constructed by given C type description reference without acquiring it. @@ -163,20 +163,27 @@ 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 ) throw (); + inline Type( typelib_TypeDescriptionReference * pType, __UnoType_NoAcquire ) SAL_THROW( () ); + /** Constructor: + Type is (copy) constructed by given C type description reference without acquiring it. + <br> + @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 ) SAL_THROW( () ); /** Copy constructor: Type is copy constructed by given type. <br> @param rType another type */ - inline Type( const Type & rType ) throw (); + inline Type( const Type & rType ) SAL_THROW( () ); /** Destructor: Releases acquired C type description reference. <br> */ - inline ~Type() throw () + inline ~Type() SAL_THROW( () ) { ::typelib_typedescriptionreference_release( _pType ); } /** Assignment operator: @@ -185,27 +192,27 @@ public: @param rType another type (right side) @return this type */ - inline Type & SAL_CALL operator = ( const Type & rType ) throw (); + inline Type & SAL_CALL operator = ( const Type & rType ) SAL_THROW( () ); /** Gets the type class of set type. <br> @return type class of set type */ - inline TypeClass SAL_CALL getTypeClass() const throw () + inline TypeClass SAL_CALL getTypeClass() const SAL_THROW( () ) { return (TypeClass)_pType->eTypeClass; } /** Gets the name of the set type. <br> @return name of the set type */ - inline ::rtl::OUString SAL_CALL getTypeName() const throw () + inline ::rtl::OUString SAL_CALL getTypeName() const SAL_THROW( () ) { return ::rtl::OUString( _pType->pTypeName ); } /** Obtains a full type description of set type. <br> @param ppDescr [inout] type description */ - inline void SAL_CALL getDescription( typelib_TypeDescription ** ppDescr ) const throw () + inline void SAL_CALL getDescription( typelib_TypeDescription ** ppDescr ) const SAL_THROW( () ) { ::typelib_typedescriptionreference_getDescription( ppDescr, _pType ); } /** Gets the C typelib type description reference pointer. @@ -213,7 +220,7 @@ public: <br> @return <b>un</b>acquired type description reference */ - inline typelib_TypeDescriptionReference * SAL_CALL getTypeLibType() const throw () + inline typelib_TypeDescriptionReference * SAL_CALL getTypeLibType() const SAL_THROW( () ) { return _pType; } /** Compares two types. @@ -221,7 +228,7 @@ public: @param rType another type @return true if both types refer the same type, false otherwise */ - inline sal_Bool SAL_CALL equals( const Type & rType ) const throw () + inline sal_Bool SAL_CALL equals( const Type & rType ) const SAL_THROW( () ) { return ::typelib_typedescriptionreference_equals( _pType, rType._pType ); } /** Equality operator: Compares two types. @@ -229,7 +236,7 @@ public: @param rType another type @return true if both types refer the same type, false otherwise */ - inline sal_Bool SAL_CALL operator == ( const Type & rType ) const throw () + inline sal_Bool SAL_CALL operator == ( const Type & rType ) const SAL_THROW( () ) { return equals( rType ); } /** Unequality operator: Compares two types. @@ -237,7 +244,7 @@ public: @param rType another type @return false if both types refer the same type, true otherwise */ - inline sal_Bool SAL_CALL operator != ( const Type & rType ) const throw () + inline sal_Bool SAL_CALL operator != ( const Type & rType ) const SAL_THROW( () ) { return (! equals( rType )); } }; @@ -251,114 +258,114 @@ public: @param dummy typed pointer for function signature @return type of IDL type <b>type</b> */ -inline const ::com::sun::star::uno::Type & SAL_CALL getCppuType( const ::com::sun::star::uno::Type * ) throw (); +inline const ::com::sun::star::uno::Type & SAL_CALL getCppuType( const ::com::sun::star::uno::Type * ) SAL_THROW( () ); /** Gets the meta type of IDL type <b>void</b>. @return type of IDL type <b>void</b> */ -inline const ::com::sun::star::uno::Type & SAL_CALL getCppuVoidType() throw (); +inline const ::com::sun::star::uno::Type & SAL_CALL getCppuVoidType() SAL_THROW( () ); /** Gets the meta type of IDL type <b>void</b>. <br> @return type of IDL type <b>void</b> */ -inline const ::com::sun::star::uno::Type & SAL_CALL getVoidCppuType() throw (); +inline const ::com::sun::star::uno::Type & SAL_CALL getVoidCppuType() SAL_THROW( () ); /** Gets the meta type of IDL type <b>boolean</b>. <br> @return type of IDL type <b>boolean</b> */ -inline const ::com::sun::star::uno::Type & SAL_CALL getCppuBooleanType() throw (); +inline const ::com::sun::star::uno::Type & SAL_CALL getCppuBooleanType() SAL_THROW( () ); /** Gets the meta type of IDL type <b>boolean</b>. <br> @return type of IDL type <b>boolean</b> */ -inline const ::com::sun::star::uno::Type & SAL_CALL getBooleanCppuType() throw (); +inline const ::com::sun::star::uno::Type & SAL_CALL getBooleanCppuType() SAL_THROW( () ); /** Gets the meta type of IDL type <b>boolean</b>. <br> @param dummy typed pointer for function signature @return type of IDL type <b>boolean</b> */ -inline const ::com::sun::star::uno::Type & SAL_CALL getCppuType( const sal_Bool * ) throw (); +inline const ::com::sun::star::uno::Type & SAL_CALL getCppuType( const sal_Bool * ) SAL_THROW( () ); /** Gets the meta type of IDL type <b>char</b>. <br> @return type of IDL type <b>char</b> */ -inline const ::com::sun::star::uno::Type & SAL_CALL getCharCppuType() throw (); +inline const ::com::sun::star::uno::Type & SAL_CALL getCharCppuType() SAL_THROW( () ); /** Gets the meta type of IDL type <b>char</b>. <br> @return type of IDL type <b>char</b> */ -inline const ::com::sun::star::uno::Type & SAL_CALL getCppuCharType() throw (); +inline const ::com::sun::star::uno::Type & SAL_CALL getCppuCharType() SAL_THROW( () ); /** Gets the meta type of IDL type <b>byte</b>. <br> @param dummy typed pointer for function signature @return type of IDL type <b>byte</b> */ -inline const ::com::sun::star::uno::Type & SAL_CALL getCppuType( const sal_Int8 * ) throw (); +inline const ::com::sun::star::uno::Type & SAL_CALL getCppuType( const sal_Int8 * ) SAL_THROW( () ); /** Gets the meta type of IDL type <b>string</b>. <br> @param dummy typed pointer for function signature @return type of IDL type <b>string</b> */ -inline const ::com::sun::star::uno::Type & SAL_CALL getCppuType( const ::rtl::OUString * ) throw (); +inline const ::com::sun::star::uno::Type & SAL_CALL getCppuType( const ::rtl::OUString * ) SAL_THROW( () ); /** Gets the meta type of IDL type <b>short</b>. <br> @param dummy typed pointer for function signature @return type of IDL type <b>short</b> */ -inline const ::com::sun::star::uno::Type & SAL_CALL getCppuType( const sal_Int16 * ) throw (); +inline const ::com::sun::star::uno::Type & SAL_CALL getCppuType( const sal_Int16 * ) SAL_THROW( () ); /** Gets the meta type of IDL type <b>unsigned short</b>. <br> @param dummy typed pointer for function signature @return type of IDL type <b>unsigned short</b> */ -inline const ::com::sun::star::uno::Type & SAL_CALL getCppuType( const sal_uInt16 * ) throw (); +inline const ::com::sun::star::uno::Type & SAL_CALL getCppuType( const sal_uInt16 * ) SAL_THROW( () ); /** Gets the meta type of IDL type <b>long</b>. <br> @param dummy typed pointer for function signature @return type of IDL type <b>long</b> */ -inline const ::com::sun::star::uno::Type & SAL_CALL getCppuType( const sal_Int32 * ) throw (); +inline const ::com::sun::star::uno::Type & SAL_CALL getCppuType( const sal_Int32 * ) SAL_THROW( () ); /** Gets the meta type of IDL type <b>unsigned long</b>. <br> @param dummy typed pointer for function signature @return type of IDL type <b>unsigned long</b> */ -inline const ::com::sun::star::uno::Type & SAL_CALL getCppuType( const sal_uInt32 * ) throw (); +inline const ::com::sun::star::uno::Type & SAL_CALL getCppuType( const sal_uInt32 * ) SAL_THROW( () ); /** Gets the meta type of IDL type <b>hyper</b>. <br> @param dummy typed pointer for function signature @return type of IDL type <b>hyper</b> */ -inline const ::com::sun::star::uno::Type & SAL_CALL getCppuType( const sal_Int64 * ) throw (); +inline const ::com::sun::star::uno::Type & SAL_CALL getCppuType( const sal_Int64 * ) SAL_THROW( () ); /** Gets the meta type of IDL type <b>unsigned hyper</b>. <br> @param dummy typed pointer for function signature @return type of IDL type <b>unsigned hyper</b> */ -inline const ::com::sun::star::uno::Type & SAL_CALL getCppuType( const sal_uInt64 * ) throw (); +inline const ::com::sun::star::uno::Type & SAL_CALL getCppuType( const sal_uInt64 * ) SAL_THROW( () ); /** Gets the meta type of IDL type <b>float</b>. <br> @param dummy typed pointer for function signature @return type of IDL type <b>float</b> */ -inline const ::com::sun::star::uno::Type & SAL_CALL getCppuType( const float * ) throw (); +inline const ::com::sun::star::uno::Type & SAL_CALL getCppuType( const float * ) SAL_THROW( () ); /** Gets the meta type of IDL type <b>double</b>. <br> @param dummy typed pointer for function signature @return type of IDL type <b>double</b> */ -inline const ::com::sun::star::uno::Type & SAL_CALL getCppuType( const double * ) throw (); +inline const ::com::sun::star::uno::Type & SAL_CALL getCppuType( const double * ) SAL_THROW( () ); #endif diff --git a/cppu/inc/com/sun/star/uno/Type.hxx b/cppu/inc/com/sun/star/uno/Type.hxx index bdcaa408b3b4..30ac5da53bec 100644 --- a/cppu/inc/com/sun/star/uno/Type.hxx +++ b/cppu/inc/com/sun/star/uno/Type.hxx @@ -2,9 +2,9 @@ * * $RCSfile: Type.hxx,v $ * - * $Revision: 1.2 $ + * $Revision: 1.3 $ * - * last change: $Author: dbo $ $Date: 2000-12-21 14:35:22 $ + * last change: $Author: dbo $ $Date: 2001-03-09 12:10:55 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -84,43 +84,48 @@ namespace uno { //__________________________________________________________________________________________________ -inline Type::Type() throw () +inline Type::Type() SAL_THROW( () ) { _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 ) throw () +inline Type::Type( TypeClass eTypeClass, const ::rtl::OUString & rTypeName ) SAL_THROW( () ) : _pType( 0 ) { ::typelib_typedescriptionreference_new( &_pType, (typelib_TypeClass)eTypeClass, rTypeName.pData ); } //__________________________________________________________________________________________________ -inline Type::Type( TypeClass eTypeClass, const sal_Char * pTypeName ) throw () +inline Type::Type( TypeClass eTypeClass, const sal_Char * pTypeName ) SAL_THROW( () ) : _pType( 0 ) { ::typelib_typedescriptionreference_newByAsciiName( &_pType, (typelib_TypeClass)eTypeClass, pTypeName ); } //__________________________________________________________________________________________________ -inline Type::Type( typelib_TypeDescriptionReference * pType ) throw () +inline Type::Type( typelib_TypeDescriptionReference * pType ) SAL_THROW( () ) : _pType( pType ) { ::typelib_typedescriptionreference_acquire( _pType ); } //__________________________________________________________________________________________________ -inline Type::Type( typelib_TypeDescriptionReference * pType, __UnoType_NoAcquire ) throw () +inline Type::Type( typelib_TypeDescriptionReference * pType, __UnoType_NoAcquire ) SAL_THROW( () ) : _pType( pType ) { } //__________________________________________________________________________________________________ -inline Type::Type( const Type & rType ) throw () +inline Type::Type( typelib_TypeDescriptionReference * pType, __sal_NoAcquire ) SAL_THROW( () ) + : _pType( pType ) +{ +} +//__________________________________________________________________________________________________ +inline Type::Type( const Type & rType ) SAL_THROW( () ) : _pType( rType._pType ) { ::typelib_typedescriptionreference_acquire( _pType ); } //__________________________________________________________________________________________________ -inline Type & Type::operator = ( const Type & rType ) throw () +inline Type & Type::operator = ( const Type & rType ) SAL_THROW( () ) { ::typelib_typedescriptionreference_assign( &_pType, rType._pType ); return *this; @@ -131,105 +136,105 @@ inline Type & Type::operator = ( const Type & rType ) throw () } } -inline const ::com::sun::star::uno::Type & SAL_CALL getCppuType( const ::com::sun::star::uno::Type * ) throw () +inline const ::com::sun::star::uno::Type & SAL_CALL getCppuType( const ::com::sun::star::uno::Type * ) SAL_THROW( () ) { return * reinterpret_cast< const ::com::sun::star::uno::Type * >( ::typelib_static_type_getByTypeClass( typelib_TypeClass_TYPE ) ); } -inline const ::com::sun::star::uno::Type & SAL_CALL getCppuVoidType() throw () +inline const ::com::sun::star::uno::Type & SAL_CALL getCppuVoidType() SAL_THROW( () ) { return * reinterpret_cast< const ::com::sun::star::uno::Type * >( ::typelib_static_type_getByTypeClass( typelib_TypeClass_VOID ) ); } -inline const ::com::sun::star::uno::Type & SAL_CALL getVoidCppuType() throw () +inline const ::com::sun::star::uno::Type & SAL_CALL getVoidCppuType() SAL_THROW( () ) { return * reinterpret_cast< const ::com::sun::star::uno::Type * >( ::typelib_static_type_getByTypeClass( typelib_TypeClass_VOID ) ); } -inline const ::com::sun::star::uno::Type & SAL_CALL getCppuBooleanType() throw () +inline const ::com::sun::star::uno::Type & SAL_CALL getCppuBooleanType() SAL_THROW( () ) { return * reinterpret_cast< const ::com::sun::star::uno::Type * >( ::typelib_static_type_getByTypeClass( typelib_TypeClass_BOOLEAN ) ); } -inline const ::com::sun::star::uno::Type & SAL_CALL getBooleanCppuType() throw () +inline const ::com::sun::star::uno::Type & SAL_CALL getBooleanCppuType() SAL_THROW( () ) { return * reinterpret_cast< const ::com::sun::star::uno::Type * >( ::typelib_static_type_getByTypeClass( typelib_TypeClass_BOOLEAN ) ); } -inline const ::com::sun::star::uno::Type & SAL_CALL getCppuType( const sal_Bool * ) throw () +inline const ::com::sun::star::uno::Type & SAL_CALL getCppuType( const sal_Bool * ) SAL_THROW( () ) { return * reinterpret_cast< const ::com::sun::star::uno::Type * >( ::typelib_static_type_getByTypeClass( typelib_TypeClass_BOOLEAN ) ); } -inline const ::com::sun::star::uno::Type & SAL_CALL getCharCppuType() throw () +inline const ::com::sun::star::uno::Type & SAL_CALL getCharCppuType() SAL_THROW( () ) { return * reinterpret_cast< const ::com::sun::star::uno::Type * >( ::typelib_static_type_getByTypeClass( typelib_TypeClass_CHAR ) ); } -inline const ::com::sun::star::uno::Type & SAL_CALL getCppuCharType() throw () +inline const ::com::sun::star::uno::Type & SAL_CALL getCppuCharType() SAL_THROW( () ) { return * reinterpret_cast< const ::com::sun::star::uno::Type * >( ::typelib_static_type_getByTypeClass( typelib_TypeClass_CHAR ) ); } -inline const ::com::sun::star::uno::Type & SAL_CALL getCppuType( const sal_Int8 * ) throw () +inline const ::com::sun::star::uno::Type & SAL_CALL getCppuType( const sal_Int8 * ) SAL_THROW( () ) { return * reinterpret_cast< const ::com::sun::star::uno::Type * >( ::typelib_static_type_getByTypeClass( typelib_TypeClass_BYTE ) ); } -inline const ::com::sun::star::uno::Type & SAL_CALL getCppuType( const ::rtl::OUString * ) throw () +inline const ::com::sun::star::uno::Type & SAL_CALL getCppuType( const ::rtl::OUString * ) SAL_THROW( () ) { return * reinterpret_cast< const ::com::sun::star::uno::Type * >( ::typelib_static_type_getByTypeClass( typelib_TypeClass_STRING ) ); } -inline const ::com::sun::star::uno::Type & SAL_CALL getCppuType( const sal_Int16 * ) throw () +inline const ::com::sun::star::uno::Type & SAL_CALL getCppuType( const sal_Int16 * ) SAL_THROW( () ) { return * reinterpret_cast< const ::com::sun::star::uno::Type * >( ::typelib_static_type_getByTypeClass( typelib_TypeClass_SHORT ) ); } -inline const ::com::sun::star::uno::Type & SAL_CALL getCppuType( const sal_uInt16 * ) throw () +inline const ::com::sun::star::uno::Type & SAL_CALL getCppuType( const sal_uInt16 * ) SAL_THROW( () ) { return * reinterpret_cast< const ::com::sun::star::uno::Type * >( ::typelib_static_type_getByTypeClass( typelib_TypeClass_UNSIGNED_SHORT ) ); } -inline const ::com::sun::star::uno::Type & SAL_CALL getCppuType( const sal_Int32 * ) throw () +inline const ::com::sun::star::uno::Type & SAL_CALL getCppuType( const sal_Int32 * ) SAL_THROW( () ) { return * reinterpret_cast< const ::com::sun::star::uno::Type * >( ::typelib_static_type_getByTypeClass( typelib_TypeClass_LONG ) ); } -inline const ::com::sun::star::uno::Type & SAL_CALL getCppuType( const sal_uInt32 * ) throw () +inline const ::com::sun::star::uno::Type & SAL_CALL getCppuType( const sal_uInt32 * ) SAL_THROW( () ) { return * reinterpret_cast< const ::com::sun::star::uno::Type * >( ::typelib_static_type_getByTypeClass( typelib_TypeClass_UNSIGNED_LONG ) ); } -inline const ::com::sun::star::uno::Type & SAL_CALL getCppuType( const sal_Int64 * ) throw () +inline const ::com::sun::star::uno::Type & SAL_CALL getCppuType( const sal_Int64 * ) SAL_THROW( () ) { return * reinterpret_cast< const ::com::sun::star::uno::Type * >( ::typelib_static_type_getByTypeClass( typelib_TypeClass_HYPER ) ); } -inline const ::com::sun::star::uno::Type & SAL_CALL getCppuType( const sal_uInt64 * ) throw () +inline const ::com::sun::star::uno::Type & SAL_CALL getCppuType( const sal_uInt64 * ) SAL_THROW( () ) { return * reinterpret_cast< const ::com::sun::star::uno::Type * >( ::typelib_static_type_getByTypeClass( typelib_TypeClass_UNSIGNED_HYPER ) ); } -inline const ::com::sun::star::uno::Type & SAL_CALL getCppuType( const float * ) throw () +inline const ::com::sun::star::uno::Type & SAL_CALL getCppuType( const float * ) SAL_THROW( () ) { return * reinterpret_cast< const ::com::sun::star::uno::Type * >( ::typelib_static_type_getByTypeClass( typelib_TypeClass_FLOAT ) ); } -inline const ::com::sun::star::uno::Type & SAL_CALL getCppuType( const double * ) throw () +inline const ::com::sun::star::uno::Type & SAL_CALL getCppuType( const double * ) SAL_THROW( () ) { return * reinterpret_cast< const ::com::sun::star::uno::Type * >( ::typelib_static_type_getByTypeClass( typelib_TypeClass_DOUBLE ) ); diff --git a/cppu/inc/com/sun/star/uno/genfunc.h b/cppu/inc/com/sun/star/uno/genfunc.h index 268701c26437..fe4bf48612b3 100644 --- a/cppu/inc/com/sun/star/uno/genfunc.h +++ b/cppu/inc/com/sun/star/uno/genfunc.h @@ -2,9 +2,9 @@ * * $RCSfile: genfunc.h,v $ * - * $Revision: 1.5 $ + * $Revision: 1.6 $ * - * last change: $Author: dbo $ $Date: 2001-02-27 12:16:24 $ + * last change: $Author: dbo $ $Date: 2001-03-09 12:10:55 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -83,13 +83,13 @@ extern "C" @param pCppI C++ interface pointer */ inline void SAL_CALL cpp_acquire( void * pCppI ) - throw (); + SAL_THROW( () ); /** C function to release a C++ interface. <br> @param pCppI C++ interface pointer */ inline void SAL_CALL cpp_release( void * pCppI ) - throw (); + SAL_THROW( () ); /** C function to query for a C++ interface. <br> @param pCppI C++ interface pointer @@ -97,7 +97,7 @@ inline void SAL_CALL cpp_release( void * pCppI ) @return acquired C++ interface pointer or null */ inline void * SAL_CALL cpp_queryInterface( void * pCppI, typelib_TypeDescriptionReference * pType ) - throw (); + SAL_THROW( () ); } } diff --git a/cppu/inc/com/sun/star/uno/genfunc.hxx b/cppu/inc/com/sun/star/uno/genfunc.hxx index c0be5204a52e..13af9082c255 100644 --- a/cppu/inc/com/sun/star/uno/genfunc.hxx +++ b/cppu/inc/com/sun/star/uno/genfunc.hxx @@ -2,9 +2,9 @@ * * $RCSfile: genfunc.hxx,v $ * - * $Revision: 1.6 $ + * $Revision: 1.7 $ * - * last change: $Author: dbo $ $Date: 2001-02-28 15:34:05 $ + * last change: $Author: dbo $ $Date: 2001-03-09 12:10:55 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -86,19 +86,19 @@ extern "C" { //================================================================================================== inline void SAL_CALL cpp_acquire( void * pCppI ) - throw () + SAL_THROW( () ) { reinterpret_cast< XInterface * >( pCppI )->acquire(); } //================================================================================================== inline void SAL_CALL cpp_release( void * pCppI ) - throw () + SAL_THROW( () ) { reinterpret_cast< XInterface * >( pCppI )->release(); } //================================================================================================== inline void * SAL_CALL cpp_queryInterface( void * pCppI, typelib_TypeDescriptionReference * pType ) - throw () + SAL_THROW( () ) { if (pCppI) { diff --git a/cppu/inc/typelib/typedescription.h b/cppu/inc/typelib/typedescription.h index 13034c711491..3f548b28372d 100644 --- a/cppu/inc/typelib/typedescription.h +++ b/cppu/inc/typelib/typedescription.h @@ -2,9 +2,9 @@ * * $RCSfile: typedescription.h,v $ * - * $Revision: 1.3 $ + * $Revision: 1.4 $ * - * last change: $Author: dbo $ $Date: 2001-01-09 12:47:35 $ + * last change: $Author: dbo $ $Date: 2001-03-09 12:10:55 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -501,7 +501,8 @@ SAL_DLLEXPORT void SAL_CALL typelib_typedescription_newUnion( sal_Int64 nDefaultDiscriminant, typelib_TypeDescriptionReference * pDefaultTypeRef, sal_Int32 nMembers, - typelib_Union_Init * pMembers ) SAL_THROW (); + typelib_Union_Init * pMembers ) + SAL_THROW_EXTERN_C(); /** Creates an enum type description. <br> @@ -518,7 +519,8 @@ SAL_DLLEXPORT void SAL_CALL typelib_typedescription_newEnum( sal_Int32 nDefaultValue, sal_Int32 nEnumValues, rtl_uString ** ppEnumNames, - sal_Int32 * pEnumValues ) SAL_THROW (); + sal_Int32 * pEnumValues ) + SAL_THROW_EXTERN_C(); /** Creates a new type description. <br> @@ -536,7 +538,8 @@ SAL_DLLEXPORT void SAL_CALL typelib_typedescription_new( rtl_uString * pTypeName, typelib_TypeDescriptionReference * pType, sal_Int32 nMembers, - typelib_CompoundMember_Init * pMembers ) SAL_THROW (); + typelib_CompoundMember_Init * pMembers ) + SAL_THROW_EXTERN_C(); /** Creates an interface type description. <br> @@ -557,7 +560,8 @@ SAL_DLLEXPORT void SAL_CALL typelib_typedescription_newInterface( sal_uInt32 nUik1, sal_uInt16 nUik2, sal_uInt16 nUik3, sal_uInt32 nUik4, sal_uInt32 nUik5, typelib_TypeDescriptionReference * pBaseInterface, sal_Int32 nMembers, - typelib_TypeDescriptionReference ** ppMembers ) SAL_THROW (); + typelib_TypeDescriptionReference ** ppMembers ) + SAL_THROW_EXTERN_C(); /** Creates an interface method type description. <br> @@ -582,7 +586,8 @@ SAL_DLLEXPORT void SAL_CALL typelib_typedescription_newInterfaceMethod( sal_Int32 nParams, typelib_Parameter_Init * pParams, sal_Int32 nExceptions, - rtl_uString ** ppExceptionNames ) SAL_THROW (); + rtl_uString ** ppExceptionNames ) + SAL_THROW_EXTERN_C(); /** Creates an interface attribute type description. <br> @@ -598,14 +603,16 @@ SAL_DLLEXPORT void SAL_CALL typelib_typedescription_newInterfaceAttribute( rtl_uString * pAttributeName, typelib_TypeClass eAttributeTypeClass, rtl_uString * pAttributeTypeName, - sal_Bool bReadOnly ) SAL_THROW (); + sal_Bool bReadOnly ) + SAL_THROW_EXTERN_C(); /** Increments reference count of given type description. <br> @param pDesc type description */ SAL_DLLEXPORT void SAL_CALL typelib_typedescription_acquire( - typelib_TypeDescription * pDesc ) SAL_THROW (); + typelib_TypeDescription * pDesc ) + SAL_THROW_EXTERN_C(); /** Decrements reference count of given type.<br> If reference count reaches 0, the trype description is deleted. @@ -613,7 +620,8 @@ SAL_DLLEXPORT void SAL_CALL typelib_typedescription_acquire( @param pDesc type description */ SAL_DLLEXPORT void SAL_CALL typelib_typedescription_release( - typelib_TypeDescription * pDesc ) SAL_THROW (); + typelib_TypeDescription * pDesc ) + SAL_THROW_EXTERN_C(); /** Registers a type description and creates a type description reference.<br> Type descriptions will be registered automatically if they are provided @@ -621,7 +629,8 @@ SAL_DLLEXPORT void SAL_CALL typelib_typedescription_release( @param ppNewDescription inout description to be registered; */ SAL_DLLEXPORT void SAL_CALL typelib_typedescription_register( - typelib_TypeDescription ** ppNewDescription ) SAL_THROW (); + typelib_TypeDescription ** ppNewDescription ) + SAL_THROW_EXTERN_C(); /** Tests whether two types descriptions are equal, i.e. type class and names are equal. <br> @@ -630,7 +639,8 @@ SAL_DLLEXPORT void SAL_CALL typelib_typedescription_register( @return true, if type descriptions are equal */ SAL_DLLEXPORT sal_Bool SAL_CALL typelib_typedescription_equals( - const typelib_TypeDescription * p1, const typelib_TypeDescription * p2 ) SAL_THROW (); + const typelib_TypeDescription * p1, const typelib_TypeDescription * p2 ) + SAL_THROW_EXTERN_C(); /** Retrieves a type description via its fully qualified name. <br> @@ -638,14 +648,16 @@ SAL_DLLEXPORT sal_Bool SAL_CALL typelib_typedescription_equals( @param pName name demanded type description */ SAL_DLLEXPORT void SAL_CALL typelib_typedescription_getByName( - typelib_TypeDescription ** ppRet, rtl_uString * pName ) SAL_THROW (); + typelib_TypeDescription ** ppRet, rtl_uString * pName ) + SAL_THROW_EXTERN_C(); /** Sets size of type description cache. <br> @param nNewSize new size of cache */ SAL_DLLEXPORT void SAL_CALL typelib_setCacheSize( - sal_Int32 nNewSize ) SAL_THROW (); + sal_Int32 nNewSize ) + SAL_THROW_EXTERN_C(); /** Function pointer declaration of callback function get additional descriptions. Callbacks <b>must</b> provide <b>complete</b> type descriptions! @@ -663,7 +675,8 @@ typedef void (SAL_CALL * typelib_typedescription_Callback)( @param pCallback callback function */ SAL_DLLEXPORT void SAL_CALL typelib_typedescription_registerCallback( - void * pContext, typelib_typedescription_Callback pCallback ) SAL_THROW (); + void * pContext, typelib_typedescription_Callback pCallback ) + SAL_THROW_EXTERN_C(); /** Revokes a previously registered callback function. <br> @@ -671,7 +684,8 @@ SAL_DLLEXPORT void SAL_CALL typelib_typedescription_registerCallback( @param pCallback registered callback function */ SAL_DLLEXPORT void SAL_CALL typelib_typedescription_revokeCallback( - void * pContext, typelib_typedescription_Callback pCallback ) SAL_THROW (); + void * pContext, typelib_typedescription_Callback pCallback ) + SAL_THROW_EXTERN_C(); /*----------------------------------------------------------------------------*/ @@ -731,7 +745,8 @@ SAL_DLLEXPORT void SAL_CALL typelib_typedescription_revokeCallback( SAL_DLLEXPORT void SAL_CALL typelib_typedescriptionreference_new( typelib_TypeDescriptionReference ** ppTDR, typelib_TypeClass eTypeClass, - rtl_uString * pTypeName ) SAL_THROW (); + rtl_uString * pTypeName ) + SAL_THROW_EXTERN_C(); /** Creates a type description reference.<br> This is a weak reference <b>not</b> holding the description. @@ -744,14 +759,16 @@ SAL_DLLEXPORT void SAL_CALL typelib_typedescriptionreference_new( SAL_DLLEXPORT void SAL_CALL typelib_typedescriptionreference_newByAsciiName( typelib_TypeDescriptionReference ** ppTDR, typelib_TypeClass eTypeClass, - const sal_Char * pTypeName ) SAL_THROW (); + const sal_Char * pTypeName ) + SAL_THROW_EXTERN_C(); /** Increments reference count of type description reference. <br> @param pRef type description reference */ SAL_DLLEXPORT void SAL_CALL typelib_typedescriptionreference_acquire( - typelib_TypeDescriptionReference * pRef ) SAL_THROW (); + typelib_TypeDescriptionReference * pRef ) + SAL_THROW_EXTERN_C(); /** Increments reference count of type description reference. If the reference count reaches 0, the reference is deleted. @@ -759,7 +776,8 @@ SAL_DLLEXPORT void SAL_CALL typelib_typedescriptionreference_acquire( @param pRef type description reference */ SAL_DLLEXPORT void SAL_CALL typelib_typedescriptionreference_release( - typelib_TypeDescriptionReference * pRef ) SAL_THROW (); + typelib_TypeDescriptionReference * pRef ) + SAL_THROW_EXTERN_C(); /** Retrieves the type description for a given reference.<br> If it is not possible to resolve the reference, null is returned. @@ -767,7 +785,8 @@ SAL_DLLEXPORT void SAL_CALL typelib_typedescriptionreference_release( @param ppRet inout type description */ SAL_DLLEXPORT void SAL_CALL typelib_typedescriptionreference_getDescription( - typelib_TypeDescription ** ppRet, typelib_TypeDescriptionReference * pRef ) SAL_THROW (); + typelib_TypeDescription ** ppRet, typelib_TypeDescriptionReference * pRef ) + SAL_THROW_EXTERN_C(); /** Tests whether two types description references are equal, i.e. type class and names are equal. <br> @@ -776,7 +795,8 @@ SAL_DLLEXPORT void SAL_CALL typelib_typedescriptionreference_getDescription( @return true, if type description references are equal */ SAL_DLLEXPORT sal_Bool SAL_CALL typelib_typedescriptionreference_equals( - const typelib_TypeDescriptionReference * p1, const typelib_TypeDescriptionReference * p2 ) SAL_THROW (); + const typelib_TypeDescriptionReference * p1, const typelib_TypeDescriptionReference * p2 ) + SAL_THROW_EXTERN_C(); /** Assigns a type. <br> @@ -785,7 +805,8 @@ SAL_DLLEXPORT sal_Bool SAL_CALL typelib_typedescriptionreference_equals( */ SAL_DLLEXPORT void SAL_CALL typelib_typedescriptionreference_assign( typelib_TypeDescriptionReference ** ppDest, - typelib_TypeDescriptionReference * pSource ) SAL_THROW (); + typelib_TypeDescriptionReference * pSource ) + SAL_THROW_EXTERN_C(); /** Tests if values of type pAssignable can be assigned by values of type pFrom. This includes widening conversion (e.g., long assignable from short), as long @@ -796,7 +817,8 @@ SAL_DLLEXPORT void SAL_CALL typelib_typedescriptionreference_assign( */ SAL_DLLEXPORT sal_Bool SAL_CALL typelib_typedescription_isAssignableFrom( typelib_TypeDescription * pAssignable, - typelib_TypeDescription * pFrom ) SAL_THROW (); + typelib_TypeDescription * pFrom ) + SAL_THROW_EXTERN_C(); /** Tests if values of type pAssignable can be assigned by values of type pFrom. This includes widening conversion (e.g., long assignable from short), as long @@ -807,7 +829,8 @@ SAL_DLLEXPORT sal_Bool SAL_CALL typelib_typedescription_isAssignableFrom( */ SAL_DLLEXPORT sal_Bool SAL_CALL typelib_typedescriptionreference_isAssignableFrom( typelib_TypeDescriptionReference * pAssignable, - typelib_TypeDescriptionReference * pFrom ) SAL_THROW (); + typelib_TypeDescriptionReference * pFrom ) + SAL_THROW_EXTERN_C(); /** Gets static type reference of standard types by type class. ==OPTIMIZATION HACK==: @@ -820,7 +843,8 @@ SAL_DLLEXPORT sal_Bool SAL_CALL typelib_typedescriptionreference_isAssignableFro @return pointer to type reference pointer */ SAL_DLLEXPORT typelib_TypeDescriptionReference ** SAL_CALL typelib_static_type_getByTypeClass( - typelib_TypeClass eTypeClass ) SAL_THROW (); + typelib_TypeClass eTypeClass ) + SAL_THROW_EXTERN_C(); /** Inits static type reference. Thread synchronizes on typelib init mutex. @@ -831,7 +855,8 @@ SAL_DLLEXPORT typelib_TypeDescriptionReference ** SAL_CALL typelib_static_type_g */ SAL_DLLEXPORT void SAL_CALL typelib_static_type_init( typelib_TypeDescriptionReference ** ppRef, - typelib_TypeClass eTypeClass, const sal_Char * pTypeName ) SAL_THROW (); + typelib_TypeClass eTypeClass, const sal_Char * pTypeName ) + SAL_THROW_EXTERN_C(); /** Inits static sequence type reference. Thread synchronizes on typelib init mutex. @@ -841,7 +866,8 @@ SAL_DLLEXPORT void SAL_CALL typelib_static_type_init( */ SAL_DLLEXPORT void SAL_CALL typelib_static_sequence_type_init( typelib_TypeDescriptionReference ** ppRef, - typelib_TypeDescriptionReference * pElementType ) SAL_THROW (); + typelib_TypeDescriptionReference * pElementType ) + SAL_THROW_EXTERN_C(); /** Inits <b>in</b>complete static compound type reference. Thread synchronizes on typelib init mutex. @@ -857,7 +883,8 @@ SAL_DLLEXPORT void SAL_CALL typelib_static_compound_type_init( typelib_TypeDescriptionReference ** ppRef, typelib_TypeClass eTypeClass, const sal_Char * pTypeName, typelib_TypeDescriptionReference * pBaseType, - sal_Int32 nMembers, typelib_TypeDescriptionReference ** ppMembers ) SAL_THROW (); + sal_Int32 nMembers, typelib_TypeDescriptionReference ** ppMembers ) + SAL_THROW_EXTERN_C(); /** Inits <b>in</b>complete static interface type reference. Thread synchronizes on typelib init mutex. @@ -869,7 +896,8 @@ SAL_DLLEXPORT void SAL_CALL typelib_static_compound_type_init( SAL_DLLEXPORT void SAL_CALL typelib_static_interface_type_init( typelib_TypeDescriptionReference ** ppRef, const sal_Char * pTypeName, - typelib_TypeDescriptionReference * pBaseType ) SAL_THROW (); + typelib_TypeDescriptionReference * pBaseType ) + SAL_THROW_EXTERN_C(); /** Inits <b>in</b>complete static enum type reference. Thread synchronizes on typelib init mutex. @@ -881,7 +909,8 @@ SAL_DLLEXPORT void SAL_CALL typelib_static_interface_type_init( SAL_DLLEXPORT void SAL_CALL typelib_static_enum_type_init( typelib_TypeDescriptionReference ** ppRef, const sal_Char * pTypeName, - sal_Int32 nDefaultValue ) SAL_THROW (); + sal_Int32 nDefaultValue ) + SAL_THROW_EXTERN_C(); /** Inits <b>in</b>complete static compound type reference. Thread synchronizes on typelib init mutex. @@ -905,7 +934,8 @@ SAL_DLLEXPORT void SAL_CALL typelib_static_union_type_init( typelib_TypeDescriptionReference * pDefaultType, sal_Int32 nMembers, sal_Int64 * pDiscriminants, - typelib_TypeDescriptionReference ** pMemberTypes ) SAL_THROW (); + typelib_TypeDescriptionReference ** pMemberTypes ) + SAL_THROW_EXTERN_C(); /** Completes a typedescription to be used for, e.g., marshalling values. COMPOUND, UNION, INTERFACE and ENUM type descriptions may be partly @@ -916,7 +946,8 @@ SAL_DLLEXPORT void SAL_CALL typelib_static_union_type_init( @return true, if type description is complete */ SAL_DLLEXPORT sal_Bool SAL_CALL typelib_typedescription_complete( - typelib_TypeDescription ** ppTypeDescr ) SAL_THROW (); + typelib_TypeDescription ** ppTypeDescr ) + SAL_THROW_EXTERN_C(); #ifdef __cplusplus } diff --git a/cppu/inc/typelib/typedescription.hxx b/cppu/inc/typelib/typedescription.hxx index 2f7d75123178..c5dd572bc610 100644 --- a/cppu/inc/typelib/typedescription.hxx +++ b/cppu/inc/typelib/typedescription.hxx @@ -2,9 +2,9 @@ * * $RCSfile: typedescription.hxx,v $ * - * $Revision: 1.2 $ + * $Revision: 1.3 $ * - * last change: $Author: dbo $ $Date: 2000-12-21 14:35:25 $ + * last change: $Author: dbo $ $Date: 2001-03-09 12:10:55 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -100,37 +100,37 @@ public: <br> @param pTypeDescr a type description */ - inline TypeDescription( typelib_TypeDescription * pTypeDescr = 0 ) throw (); + inline TypeDescription( typelib_TypeDescription * pTypeDescr = 0 ) SAL_THROW( () ); /** Constructor: <br> @param pTypeDescrRef a type description reference */ - inline TypeDescription( typelib_TypeDescriptionReference * pTypeDescrRef ) throw (); + inline TypeDescription( typelib_TypeDescriptionReference * pTypeDescrRef ) SAL_THROW( () ); /** Constructor: <br> @param rType a type */ - inline TypeDescription( const ::com::sun::star::uno::Type & rType ) throw (); + inline TypeDescription( const ::com::sun::star::uno::Type & rType ) SAL_THROW( () ); /** Copy constructor: <br> @param rDescr another TypeDescription */ - inline TypeDescription( const TypeDescription & rDescr ) throw (); + inline TypeDescription( const TypeDescription & rDescr ) SAL_THROW( () ); /** Constructor: <br> @param pTypeName a type name */ - inline TypeDescription( rtl_uString * pTypeName ) throw (); + inline TypeDescription( rtl_uString * pTypeName ) SAL_THROW( () ); /** Constructor: <br> @param rTypeName a type name */ - inline TypeDescription( const ::rtl::OUString & rTypeName ) throw (); + inline TypeDescription( const ::rtl::OUString & rTypeName ) SAL_THROW( () ); /** Destructor: <br> releases type description */ - inline ~TypeDescription() throw (); + inline ~TypeDescription() SAL_THROW( () ); /** Assignment operator: acquires given type description and releases a set one. @@ -138,14 +138,14 @@ public: @param pTypeDescr another type description @return this TypeDescription */ - inline TypeDescription & operator = ( typelib_TypeDescription * pTypeDescr ) throw (); + inline TypeDescription & SAL_CALL operator = ( typelib_TypeDescription * pTypeDescr ) SAL_THROW( () ); /** Assignment operator: acquires given type description and releases a set one. <br> @param rTypeDescr another type description @return this TypeDescription */ - inline TypeDescription & operator =( const TypeDescription & rTypeDescr ) throw () + inline TypeDescription & SAL_CALL operator =( const TypeDescription & rTypeDescr ) SAL_THROW( () ) { return this->operator =( rTypeDescr.get() ); } /** Tests if two type descriptions are equal. @@ -153,81 +153,81 @@ public: @param pTypeDescr another type description @return true, if both type descriptions are equal, false otherwise */ - inline sal_Bool equals( const typelib_TypeDescription * pTypeDescr ) const throw (); + inline sal_Bool SAL_CALL equals( const typelib_TypeDescription * pTypeDescr ) const SAL_THROW( () ); /** Tests if two type descriptions are equal. <br> @param rTypeDescr another type description @return true, if both type descriptions are equal, false otherwise */ - inline sal_Bool equals( const TypeDescription & rTypeDescr ) const throw () + inline sal_Bool SAL_CALL equals( const TypeDescription & rTypeDescr ) const SAL_THROW( () ) { return equals( rTypeDescr._pTypeDescr ); } /** Makes stored type description complete. <br> */ - inline void makeComplete() const throw (); + inline void SAL_CALL makeComplete() const SAL_THROW( () ); /** Gets the <b>un</b>acquired type description pointer. <br> @return stored pointer of type description */ - inline typelib_TypeDescription * get() const throw () + inline typelib_TypeDescription * SAL_CALL get() const SAL_THROW( () ) { return _pTypeDescr; } /** Tests if a type description is set. <br> @return true, if a type description is set, false otherwise */ - inline sal_Bool is() const throw () + inline sal_Bool SAL_CALL is() const SAL_THROW( () ) { return (_pTypeDescr != 0); } }; //__________________________________________________________________________________________________ -inline TypeDescription::TypeDescription( typelib_TypeDescription * pTypeDescr ) throw () +inline TypeDescription::TypeDescription( typelib_TypeDescription * pTypeDescr ) SAL_THROW( () ) : _pTypeDescr( pTypeDescr ) { if (_pTypeDescr) typelib_typedescription_acquire( _pTypeDescr ); } //__________________________________________________________________________________________________ -inline TypeDescription::TypeDescription( typelib_TypeDescriptionReference * pTypeDescrRef ) throw () +inline TypeDescription::TypeDescription( typelib_TypeDescriptionReference * pTypeDescrRef ) SAL_THROW( () ) : _pTypeDescr( 0 ) { if (pTypeDescrRef) typelib_typedescriptionreference_getDescription( &_pTypeDescr, pTypeDescrRef ); } //__________________________________________________________________________________________________ -inline TypeDescription::TypeDescription( const ::com::sun::star::uno::Type & rType ) throw () +inline TypeDescription::TypeDescription( const ::com::sun::star::uno::Type & rType ) SAL_THROW( () ) : _pTypeDescr( 0 ) { if (rType.getTypeLibType()) typelib_typedescriptionreference_getDescription( &_pTypeDescr, rType.getTypeLibType() ); } //__________________________________________________________________________________________________ -inline TypeDescription::TypeDescription( const TypeDescription & rTypeDescr ) throw () +inline TypeDescription::TypeDescription( const TypeDescription & rTypeDescr ) SAL_THROW( () ) : _pTypeDescr( rTypeDescr._pTypeDescr ) { if (_pTypeDescr) typelib_typedescription_acquire( _pTypeDescr ); } //__________________________________________________________________________________________________ -inline TypeDescription::TypeDescription( rtl_uString * pTypeName ) throw () +inline TypeDescription::TypeDescription( rtl_uString * pTypeName ) SAL_THROW( () ) : _pTypeDescr( 0 ) { typelib_typedescription_getByName( &_pTypeDescr , pTypeName ); } //__________________________________________________________________________________________________ -inline TypeDescription::TypeDescription( const ::rtl::OUString & rTypeName ) throw () +inline TypeDescription::TypeDescription( const ::rtl::OUString & rTypeName ) SAL_THROW( () ) : _pTypeDescr( 0 ) { typelib_typedescription_getByName( &_pTypeDescr , rTypeName.pData ); } //__________________________________________________________________________________________________ -inline TypeDescription::~TypeDescription() throw () +inline TypeDescription::~TypeDescription() SAL_THROW( () ) { if (_pTypeDescr) typelib_typedescription_release( _pTypeDescr ); } //__________________________________________________________________________________________________ -inline TypeDescription & TypeDescription::operator = ( typelib_TypeDescription * pTypeDescr ) throw () +inline TypeDescription & TypeDescription::operator = ( typelib_TypeDescription * pTypeDescr ) SAL_THROW( () ) { if (_pTypeDescr) typelib_typedescription_release( _pTypeDescr ); @@ -236,13 +236,13 @@ inline TypeDescription & TypeDescription::operator = ( typelib_TypeDescription * return *this; } //__________________________________________________________________________________________________ -inline sal_Bool TypeDescription::equals( const typelib_TypeDescription * pTypeDescr ) const throw () +inline sal_Bool TypeDescription::equals( const typelib_TypeDescription * pTypeDescr ) const SAL_THROW( () ) { return (_pTypeDescr && pTypeDescr && typelib_typedescription_equals( _pTypeDescr, pTypeDescr )); } //__________________________________________________________________________________________________ -inline void TypeDescription::makeComplete() const throw () +inline void TypeDescription::makeComplete() const SAL_THROW( () ) { if (_pTypeDescr && !_pTypeDescr->bComplete) ::typelib_typedescription_complete( &_pTypeDescr ); diff --git a/cppu/inc/uno/any2.h b/cppu/inc/uno/any2.h index ec5dcdadc29b..e895eeeb0289 100644 --- a/cppu/inc/uno/any2.h +++ b/cppu/inc/uno/any2.h @@ -2,9 +2,9 @@ * * $RCSfile: any2.h,v $ * - * $Revision: 1.2 $ + * $Revision: 1.3 $ * - * last change: $Author: dbo $ $Date: 2000-12-21 14:35:27 $ + * last change: $Author: dbo $ $Date: 2001-03-09 12:10:56 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -113,7 +113,7 @@ SAL_DLLEXPORT void SAL_CALL uno_any_assign( uno_Any * pDest, void * pSource, typelib_TypeDescription * pTypeDescr, uno_AcquireFunc acquire, uno_ReleaseFunc release ) - SAL_THROW (); + SAL_THROW_EXTERN_C(); /** Assign an any with a given value. Interfaces are acquired or released by the given callback functions. <br> @@ -127,7 +127,7 @@ SAL_DLLEXPORT void SAL_CALL uno_type_any_assign( uno_Any * pDest, void * pSource, typelib_TypeDescriptionReference * pType, uno_AcquireFunc acquire, uno_ReleaseFunc release ) - SAL_THROW (); + SAL_THROW_EXTERN_C(); /** Constructs an any with a given value. Interfaces are acquired by the given callback function. @@ -141,7 +141,7 @@ SAL_DLLEXPORT void SAL_CALL uno_any_construct( uno_Any * pDest, void * pSource, typelib_TypeDescription * pTypeDescr, uno_AcquireFunc acquire ) - SAL_THROW (); + SAL_THROW_EXTERN_C(); /** Constructs an any with a given value. Interfaces are acquired by the given callback function. <br> @@ -154,7 +154,7 @@ SAL_DLLEXPORT void SAL_CALL uno_type_any_construct( uno_Any * pDest, void * pSource, typelib_TypeDescriptionReference * pType, uno_AcquireFunc acquire ) - SAL_THROW (); + SAL_THROW_EXTERN_C(); /** Constructs an any with a given value and converts/ maps interfaces. <br> @@ -167,7 +167,7 @@ SAL_DLLEXPORT void SAL_CALL uno_any_constructAndConvert( uno_Any * pDest, void * pSource, typelib_TypeDescription * pTypeDescr, uno_Mapping * mapping ) - SAL_THROW (); + SAL_THROW_EXTERN_C(); /** Constructs an any with a given value and converts/ maps interfaces. <br> @param pDest pointer memory of destination any @@ -179,7 +179,7 @@ SAL_DLLEXPORT void SAL_CALL uno_type_any_constructAndConvert( uno_Any * pDest, void * pSource, typelib_TypeDescriptionReference * pType, uno_Mapping * mapping ) - SAL_THROW (); + SAL_THROW_EXTERN_C(); /** Destructs an any. <br> @@ -188,7 +188,7 @@ SAL_DLLEXPORT void SAL_CALL uno_type_any_constructAndConvert( */ SAL_DLLEXPORT void SAL_CALL uno_any_destruct( uno_Any * pValue, uno_ReleaseFunc release ) - SAL_THROW (); + SAL_THROW_EXTERN_C(); #ifdef __cplusplus } diff --git a/cppu/inc/uno/current_context.h b/cppu/inc/uno/current_context.h index 5f2e03ff4f6a..653e59a4a090 100644 --- a/cppu/inc/uno/current_context.h +++ b/cppu/inc/uno/current_context.h @@ -2,9 +2,9 @@ * * $RCSfile: current_context.h,v $ * - * $Revision: 1.1 $ + * $Revision: 1.2 $ * - * last change: $Author: dbo $ $Date: 2000-12-21 14:33:43 $ + * last change: $Author: dbo $ $Date: 2001-03-09 12:10:56 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -79,7 +79,7 @@ extern "C" SAL_DLLEXPORT void SAL_CALL uno_getCurrentContext( void ** ppCurrentContext, rtl_uString * pEnvTypeName, void * pEnvContext ) - SAL_THROW (); + SAL_THROW_EXTERN_C(); #ifdef __cplusplus } diff --git a/cppu/inc/uno/current_context.hxx b/cppu/inc/uno/current_context.hxx index 35f401c7bfd7..0859c2ca4b1f 100644 --- a/cppu/inc/uno/current_context.hxx +++ b/cppu/inc/uno/current_context.hxx @@ -2,9 +2,9 @@ * * $RCSfile: current_context.hxx,v $ * - * $Revision: 1.1 $ + * $Revision: 1.2 $ * - * last change: $Author: dbo $ $Date: 2000-12-21 14:33:52 $ + * last change: $Author: dbo $ $Date: 2001-03-09 12:10:56 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -84,7 +84,7 @@ namespace uno /** Current context. */ -inline Reference< XCurrentContext > SAL_CALL getCurrentContext() throw () +inline Reference< XCurrentContext > SAL_CALL getCurrentContext() SAL_THROW( () ) { ::rtl::OUString aEnvTypeName( RTL_CONSTASCII_USTRINGPARAM(CPPU_CURRENT_LANGUAGE_BINDING_NAME) ); @@ -98,7 +98,7 @@ inline Reference< XCurrentContext > SAL_CALL getCurrentContext() throw () */ inline void SAL_CALL checkPermission( const ::com::sun::star::security::Permission & rPerm ) - throw (::com::sun::star::security::AccessControlException) + SAL_THROW( (::com::sun::star::security::AccessControlException) ) { Reference< XCurrentContext > xContext( getCurrentContext() ); OSL_ENSURE( xContext.is(), "### cannot get current thread's uno context!" ); diff --git a/cppu/inc/uno/data.h b/cppu/inc/uno/data.h index 0cc94b1ed962..838a7b59b1c3 100644 --- a/cppu/inc/uno/data.h +++ b/cppu/inc/uno/data.h @@ -2,9 +2,9 @@ * * $RCSfile: data.h,v $ * - * $Revision: 1.2 $ + * $Revision: 1.3 $ * - * last change: $Author: dbo $ $Date: 2000-12-21 14:35:28 $ + * last change: $Author: dbo $ $Date: 2001-03-09 12:10:56 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -111,7 +111,7 @@ SAL_DLLEXPORT sal_Bool SAL_CALL uno_equalData( void * pVal1, typelib_TypeDescription * pVal1TypeDescr, void * pVal2, typelib_TypeDescription * pVal2TypeDescr, uno_QueryInterfaceFunc queryInterface, uno_ReleaseFunc release ) - SAL_THROW (); + SAL_THROW_EXTERN_C(); /** Tests if two values are equal. May compare different types (e.g., short to long). <br> @param pVal1 pointer to a value @@ -127,7 +127,7 @@ SAL_DLLEXPORT sal_Bool SAL_CALL uno_type_equalData( void * pVal1, typelib_TypeDescriptionReference * pVal1Type, void * pVal2, typelib_TypeDescriptionReference * pVal2Type, uno_QueryInterfaceFunc queryInterface, uno_ReleaseFunc release ) - SAL_THROW (); + SAL_THROW_EXTERN_C(); /** Copy construct memory with given value. The size of the destination value must be larger or equal to the size of the source value. @@ -140,7 +140,7 @@ SAL_DLLEXPORT sal_Bool SAL_CALL uno_type_equalData( SAL_DLLEXPORT void SAL_CALL uno_copyData( void * pDest, void * pSource, typelib_TypeDescription * pTypeDescr, uno_AcquireFunc acquire ) - SAL_THROW (); + SAL_THROW_EXTERN_C(); /** Copy construct memory with given value. The size of the destination value must be larger or equal to the size of the source value. <br> @@ -152,7 +152,7 @@ SAL_DLLEXPORT void SAL_CALL uno_copyData( SAL_DLLEXPORT void SAL_CALL uno_type_copyData( void * pDest, void * pSource, typelib_TypeDescriptionReference * pType, uno_AcquireFunc acquire ) - SAL_THROW (); + SAL_THROW_EXTERN_C(); /** Copy construct memory with given value. The size of the destination value must be larger or equal to the size of the source value.<br> @@ -166,7 +166,7 @@ SAL_DLLEXPORT void SAL_CALL uno_type_copyData( SAL_DLLEXPORT void SAL_CALL uno_copyAndConvertData( void * pDest, void * pSource, typelib_TypeDescription * pTypeDescr, uno_Mapping * mapping ) - SAL_THROW (); + SAL_THROW_EXTERN_C(); /** Copy construct memory with given value. The size of the destination value must be larger or equal to the size of the source value.<br> Interfaces are converted/ mapped by mapping parameter. @@ -179,7 +179,7 @@ SAL_DLLEXPORT void SAL_CALL uno_copyAndConvertData( SAL_DLLEXPORT void SAL_CALL uno_type_copyAndConvertData( void * pDest, void * pSource, typelib_TypeDescriptionReference * pType, uno_Mapping * mapping ) - SAL_THROW (); + SAL_THROW_EXTERN_C(); /** Destructs a given value; does <b>not</b> free its memory! <br> @@ -189,7 +189,7 @@ SAL_DLLEXPORT void SAL_CALL uno_type_copyAndConvertData( */ SAL_DLLEXPORT void SAL_CALL uno_destructData( void * pValue, typelib_TypeDescription * pTypeDescr, uno_ReleaseFunc release ) - SAL_THROW (); + SAL_THROW_EXTERN_C(); /** Destructs a given value; does <b>not</b> free its memory! <br> @param pValue value to be destructed @@ -198,7 +198,7 @@ SAL_DLLEXPORT void SAL_CALL uno_destructData( */ SAL_DLLEXPORT void SAL_CALL uno_type_destructData( void * pValue, typelib_TypeDescriptionReference * pType, uno_ReleaseFunc release ) - SAL_THROW (); + SAL_THROW_EXTERN_C(); /** Default constructs a value. All simple types are set to 0, enums are set to their default value. @@ -208,7 +208,7 @@ SAL_DLLEXPORT void SAL_CALL uno_type_destructData( */ SAL_DLLEXPORT void SAL_CALL uno_constructData( void * pMem, typelib_TypeDescription * pTypeDescr ) - SAL_THROW (); + SAL_THROW_EXTERN_C(); /** Default constructs a value. All simple types are set to 0, enums are set to their default value. <br> @@ -217,7 +217,7 @@ SAL_DLLEXPORT void SAL_CALL uno_constructData( */ SAL_DLLEXPORT void SAL_CALL uno_type_constructData( void * pMem, typelib_TypeDescriptionReference * pType ) - SAL_THROW (); + SAL_THROW_EXTERN_C(); /** Assigns a destination value with a source value. Widening conversion <b>without</b> data loss is allowed (e.g., assigning a long with a short). @@ -236,7 +236,7 @@ SAL_DLLEXPORT sal_Bool SAL_CALL uno_assignData( void * pDest, typelib_TypeDescription * pDestTypeDescr, void * pSource, typelib_TypeDescription * pSourceTypeDescr, uno_QueryInterfaceFunc queryInterface, uno_AcquireFunc acquire, uno_ReleaseFunc release ) - SAL_THROW (); + SAL_THROW_EXTERN_C(); /** Assigns a destination value with a source value. Widening conversion <b>without</b> data loss is allowed (e.g., assigning a long with a short). Assignment from any value to a value of type Any and vice versa is allowed. @@ -254,7 +254,7 @@ SAL_DLLEXPORT sal_Bool SAL_CALL uno_type_assignData( void * pDest, typelib_TypeDescriptionReference * pDestType, void * pSource, typelib_TypeDescriptionReference * pSourceType, uno_QueryInterfaceFunc queryInterface, uno_AcquireFunc acquire, uno_ReleaseFunc release ) - SAL_THROW (); + SAL_THROW_EXTERN_C(); #ifdef __cplusplus } diff --git a/cppu/inc/uno/environment.h b/cppu/inc/uno/environment.h index 0e62e217d59f..36d156895c67 100644 --- a/cppu/inc/uno/environment.h +++ b/cppu/inc/uno/environment.h @@ -2,9 +2,9 @@ * * $RCSfile: environment.h,v $ * - * $Revision: 1.2 $ + * $Revision: 1.3 $ * - * last change: $Author: dbo $ $Date: 2000-12-21 14:35:28 $ + * last change: $Author: dbo $ $Date: 2001-03-09 12:10:56 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -262,14 +262,19 @@ typedef struct _uno_ExtEnvironment @param pEnv corresponding environment @param pInterface an interface */ - void (SAL_CALL * acquireInterface)( uno_ExtEnvironment * pEnv, void * pInterface ); + void (SAL_CALL * acquireInterface)( + uno_ExtEnvironment * pEnv, + void * pInterface ); /** Function to release an interface. <br> @param pEnv corresponding environment @param pInterface an interface */ - void (SAL_CALL * releaseInterface)( uno_ExtEnvironment * pEnv, void * pInterface ); + void (SAL_CALL * releaseInterface)( + uno_ExtEnvironment * pEnv, + void * pInterface ); + } uno_ExtEnvironment; #ifdef SAL_W32 @@ -296,7 +301,7 @@ typedef void (SAL_CALL * uno_initEnvironmentFunc)( uno_Environment * pEnv ); */ SAL_DLLEXPORT void SAL_CALL uno_getEnvironment( uno_Environment ** ppEnv, rtl_uString * pEnvTypeName, void * pContext ) - SAL_THROW (); + SAL_THROW_EXTERN_C(); /** Gets all specified environments. Caller has to release returned environments and free allocated memory. @@ -309,7 +314,7 @@ SAL_DLLEXPORT void SAL_CALL uno_getEnvironment( SAL_DLLEXPORT void SAL_CALL uno_getRegisteredEnvironments( uno_Environment *** pppEnvs, sal_Int32 * pnLen, uno_memAlloc memAlloc, rtl_uString * pEnvTypeName ) - SAL_THROW (); + SAL_THROW_EXTERN_C(); /** Creates an environment. The new environment is anonymous (<b>NOT</b> publicly registered/ accessible). @@ -320,7 +325,7 @@ SAL_DLLEXPORT void SAL_CALL uno_getRegisteredEnvironments( */ SAL_DLLEXPORT void SAL_CALL uno_createEnvironment( uno_Environment ** ppEnv, rtl_uString * pEnvTypeName, void * pContext ) - SAL_THROW (); + SAL_THROW_EXTERN_C(); /** Dumps out environment information, i.e. registered interfaces. <br> @@ -330,7 +335,7 @@ SAL_DLLEXPORT void SAL_CALL uno_createEnvironment( */ SAL_DLLEXPORT void SAL_CALL uno_dumpEnvironment( void * stream, uno_Environment * pEnv, const sal_Char * pFilter ) - SAL_THROW (); + SAL_THROW_EXTERN_C(); /** Dumps out environment information, i.e. registered interfaces. <br> @param stream output stream (FILE *) @@ -339,7 +344,7 @@ SAL_DLLEXPORT void SAL_CALL uno_dumpEnvironment( */ SAL_DLLEXPORT void SAL_CALL uno_dumpEnvironmentByName( void * stream, rtl_uString * pEnvTypeName, const sal_Char * pFilter ) - SAL_THROW (); + SAL_THROW_EXTERN_C(); #ifdef __cplusplus } diff --git a/cppu/inc/uno/environment.hxx b/cppu/inc/uno/environment.hxx index cdd00dcb9c94..7dbd7811e8bf 100644 --- a/cppu/inc/uno/environment.hxx +++ b/cppu/inc/uno/environment.hxx @@ -2,9 +2,9 @@ * * $RCSfile: environment.hxx,v $ * - * $Revision: 1.2 $ + * $Revision: 1.3 $ * - * last change: $Author: dbo $ $Date: 2000-12-21 14:35:28 $ + * last change: $Author: dbo $ $Date: 2001-03-09 12:10:56 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -96,89 +96,89 @@ public: <br> @param pEnv environment */ - inline Environment( uno_Environment * pEnv = 0 ) throw (); + inline Environment( uno_Environment * pEnv = 0 ) SAL_THROW( () ); /** Copy constructor: acquires given environment <br> @param rEnv another environment */ - inline Environment( const Environment & rEnv ) throw (); + inline Environment( const Environment & rEnv ) SAL_THROW( () ); /** Destructor: <br> Releases a set environment. */ - inline ~Environment() throw (); + inline ~Environment() SAL_THROW( () ); /** Sets a given environment, i.e. acquires given one and releases a set one. <br> @param pEnv another environment @return this environment */ - inline Environment & SAL_CALL operator = ( uno_Environment * pEnv ) throw (); + inline Environment & SAL_CALL operator = ( uno_Environment * pEnv ) SAL_THROW( () ); /** Sets a given environment, i.e. acquires given one and releases a set one. <br> @param rEnv another environment @return this environment */ - inline Environment & SAL_CALL operator = ( const Environment & rEnv ) throw () + inline Environment & SAL_CALL operator = ( const Environment & rEnv ) SAL_THROW( () ) { return operator = ( rEnv._pEnv ); } /** Provides <b>un</b>acquired pointer to the set C environment. <br> @return <b>un</b>acquired pointer to the C environment struct */ - inline uno_Environment * SAL_CALL get() const throw () + inline uno_Environment * SAL_CALL get() const SAL_THROW( () ) { return _pEnv; } /** Gets type name of set environment. <br> @return type name of set environment */ - inline ::rtl::OUString SAL_CALL getTypeName() const throw () + inline ::rtl::OUString SAL_CALL getTypeName() const SAL_THROW( () ) { return _pEnv->pTypeName; } /** Gets free context pointer of set environment. <br> @return free context pointer of set environment */ - inline void * SAL_CALL getContext() const throw () + inline void * SAL_CALL getContext() const SAL_THROW( () ) { return _pEnv->pContext; } /** Tests if a environment is set. <br> @return true, if a environment is set, false otherwise */ - inline sal_Bool SAL_CALL is() const throw () + inline sal_Bool SAL_CALL is() const SAL_THROW( () ) { return (_pEnv != 0); } /** Releases a set environment. <br> */ - inline void SAL_CALL clear() throw (); + inline void SAL_CALL clear() SAL_THROW( () ); }; //__________________________________________________________________________________________________ -inline Environment::Environment( uno_Environment * pEnv ) throw () +inline Environment::Environment( uno_Environment * pEnv ) SAL_THROW( () ) : _pEnv( pEnv ) { if (_pEnv) (*_pEnv->acquire)( _pEnv ); } //__________________________________________________________________________________________________ -inline Environment::Environment( const Environment & rEnv ) throw () +inline Environment::Environment( const Environment & rEnv ) SAL_THROW( () ) : _pEnv( rEnv._pEnv ) { if (_pEnv) (*_pEnv->acquire)( _pEnv ); } //__________________________________________________________________________________________________ -inline Environment::~Environment() throw () +inline Environment::~Environment() SAL_THROW( () ) { if (_pEnv) (*_pEnv->release)( _pEnv ); } //__________________________________________________________________________________________________ -inline void Environment::clear() throw () +inline void Environment::clear() SAL_THROW( () ) { if (_pEnv) { @@ -187,13 +187,16 @@ inline void Environment::clear() throw () } } //__________________________________________________________________________________________________ -inline Environment & Environment::operator = ( uno_Environment * pEnv ) throw () +inline Environment & Environment::operator = ( uno_Environment * pEnv ) SAL_THROW( () ) { - if (pEnv) - (*pEnv->acquire)( pEnv ); - if (_pEnv) - (*_pEnv->release)( _pEnv ); - _pEnv = pEnv; + if (pEnv != _pEnv) + { + if (pEnv) + (*pEnv->acquire)( pEnv ); + if (_pEnv) + (*_pEnv->release)( _pEnv ); + _pEnv = pEnv; + } return *this; } diff --git a/cppu/inc/uno/mapping.h b/cppu/inc/uno/mapping.h index 0f10c5fbfb21..9220980a881f 100644 --- a/cppu/inc/uno/mapping.h +++ b/cppu/inc/uno/mapping.h @@ -2,9 +2,9 @@ * * $RCSfile: mapping.h,v $ * - * $Revision: 1.2 $ + * $Revision: 1.3 $ * - * last change: $Author: dbo $ $Date: 2000-12-21 14:35:28 $ + * last change: $Author: dbo $ $Date: 2001-03-09 12:10:56 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -139,7 +139,7 @@ SAL_DLLEXPORT void SAL_CALL uno_getMapping( uno_Environment * pFrom, uno_Environment * pTo, rtl_uString * pAddPurpose ) - SAL_THROW (); + SAL_THROW_EXTERN_C(); /** Callback function pointer declaration to get a mapping. <br> @@ -160,7 +160,7 @@ typedef void (SAL_CALL * uno_getMappingFunc)( */ SAL_DLLEXPORT void SAL_CALL uno_registerMappingCallback( uno_getMappingFunc pCallback ) - SAL_THROW (); + SAL_THROW_EXTERN_C(); /** Revokes a mapping callback registration. <br> @@ -168,7 +168,7 @@ SAL_DLLEXPORT void SAL_CALL uno_registerMappingCallback( */ SAL_DLLEXPORT void SAL_CALL uno_revokeMappingCallback( uno_getMappingFunc pCallback ) - SAL_THROW (); + SAL_THROW_EXTERN_C(); /** Function pointer declaration to free a mapping. <br> @@ -190,7 +190,7 @@ typedef void (SAL_CALL * uno_freeMappingFunc)( uno_Mapping * pMapping ); SAL_DLLEXPORT void SAL_CALL uno_registerMapping( uno_Mapping ** ppMapping, uno_freeMappingFunc freeMapping, uno_Environment * pFrom, uno_Environment * pTo, rtl_uString * pAddPurpose ) - SAL_THROW (); + SAL_THROW_EXTERN_C(); /** Revokes a mapping.<br> A mapping registers itself on first acquire and revokes itself on last release. @@ -199,7 +199,7 @@ SAL_DLLEXPORT void SAL_CALL uno_registerMapping( */ SAL_DLLEXPORT void SAL_CALL uno_revokeMapping( uno_Mapping * pMapping ) - SAL_THROW (); + SAL_THROW_EXTERN_C(); /** Gets an interface mapping from one language environment to another by corresponding environment type names. @@ -216,7 +216,7 @@ SAL_DLLEXPORT void SAL_CALL uno_getMappingByName( rtl_uString * pFrom, rtl_uString * pTo, rtl_uString * pAddPurpose ) - SAL_THROW (); + SAL_THROW_EXTERN_C(); /* symbol exported by each language binding library */ #define UNO_EXT_GETMAPPING "uno_ext_getMapping" diff --git a/cppu/inc/uno/mapping.hxx b/cppu/inc/uno/mapping.hxx index 88a17f3c3748..f161cd9d975f 100644 --- a/cppu/inc/uno/mapping.hxx +++ b/cppu/inc/uno/mapping.hxx @@ -2,9 +2,9 @@ * * $RCSfile: mapping.hxx,v $ * - * $Revision: 1.2 $ + * $Revision: 1.3 $ * - * last change: $Author: dbo $ $Date: 2000-12-21 14:35:28 $ + * last change: $Author: dbo $ $Date: 2001-03-09 12:10:56 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -110,7 +110,7 @@ public: @param rAddPurpose additional purpose */ inline Mapping( const ::rtl::OUString & rFrom, const ::rtl::OUString & rTo, - const ::rtl::OUString & rAddPurpose = ::rtl::OUString() ) throw (); + const ::rtl::OUString & rAddPurpose = ::rtl::OUString() ) SAL_THROW( () ); /** Holds a mapping from the specified source to the specified destination. <br> @@ -119,57 +119,57 @@ public: @param rAddPurpose additional purpose */ inline Mapping( uno_Environment * pFrom, uno_Environment * pTo, - const ::rtl::OUString & rAddPurpose = ::rtl::OUString() ) throw (); + const ::rtl::OUString & rAddPurpose = ::rtl::OUString() ) SAL_THROW( () ); /** Constructor. <br> @param pMapping another mapping */ - inline Mapping( uno_Mapping * pMapping = 0 ) throw (); + inline Mapping( uno_Mapping * pMapping = 0 ) SAL_THROW( () ); /** Copy constructor. <br> @param rMapping another mapping */ - inline Mapping( const Mapping & rMapping ) throw (); + inline Mapping( const Mapping & rMapping ) SAL_THROW( () ); /** Destructor. <br> */ - inline ~Mapping() throw (); + inline ~Mapping() SAL_THROW( () ); /** Sets a given mapping. <br> @param pMapping another mapping @return this mapping */ - inline Mapping & SAL_CALL operator = ( uno_Mapping * pMapping ) throw (); + inline Mapping & SAL_CALL operator = ( uno_Mapping * pMapping ) SAL_THROW( () ); /** Sets a given mapping. <br> @param rMapping another mapping @return this mapping */ - inline Mapping & SAL_CALL operator = ( const Mapping & rMapping ) throw () + inline Mapping & SAL_CALL operator = ( const Mapping & rMapping ) SAL_THROW( () ) { return operator = ( rMapping._pMapping ); } /** Provides a pointer to the C mapping. The returned mapping is <b>not</b> acquired! <br> @return <b>un</b>acquired C mapping */ - inline uno_Mapping * SAL_CALL get() const throw () + inline uno_Mapping * SAL_CALL get() const SAL_THROW( () ) { return _pMapping; } /** Tests if a mapping is set. <br> @return true if a mapping is set */ - inline sal_Bool SAL_CALL is() const throw () + inline sal_Bool SAL_CALL is() const SAL_THROW( () ) { return (_pMapping != 0); } /** Releases a set mapping. <br> */ - inline void SAL_CALL clear() throw (); + inline void SAL_CALL clear() SAL_THROW( () ); /** Maps an interface from one environment to another. <br> @@ -177,14 +177,14 @@ public: @param pTypeDescr type description of interface @return mapped interface */ - inline void * SAL_CALL mapInterface( void * pInterface, typelib_InterfaceTypeDescription * pTypeDescr ) const throw (); + inline void * SAL_CALL mapInterface( void * pInterface, typelib_InterfaceTypeDescription * pTypeDescr ) const SAL_THROW( () ); /** Maps an interface from one environment to another. <br> @param pInterface source interface @param pTypeDescr type description of interface @return mapped interface */ - inline void * SAL_CALL mapInterface( void * pInterface, typelib_TypeDescription * pTypeDescr ) const throw () + inline void * SAL_CALL mapInterface( void * pInterface, typelib_TypeDescription * pTypeDescr ) const SAL_THROW( () ) { return mapInterface( pInterface, (typelib_InterfaceTypeDescription *)pTypeDescr ); } /** Maps an interface from one environment to another. @@ -194,7 +194,7 @@ public: @return mapped interface */ inline void * SAL_CALL mapInterface( - void * pInterface, const ::com::sun::star::uno::Type & rType ) const throw (); + void * pInterface, const ::com::sun::star::uno::Type & rType ) const SAL_THROW( () ); /** Maps an interface from one environment to another. <br> @@ -202,7 +202,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 throw () + inline void SAL_CALL mapInterface( void ** ppOut, void * pInterface, typelib_InterfaceTypeDescription * pTypeDescr ) const SAL_THROW( () ) { (*_pMapping->mapInterface)( _pMapping, ppOut, pInterface, pTypeDescr ); } /** Maps an interface from one environment to another. <br> @@ -210,7 +210,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 throw () + inline void SAL_CALL mapInterface( void ** ppOut, void * pInterface, typelib_TypeDescription * pTypeDescr ) const SAL_THROW( () ) { (*_pMapping->mapInterface)( _pMapping, ppOut, pInterface, (typelib_InterfaceTypeDescription *)pTypeDescr ); } /** Maps an interface from one environment to another. @@ -219,44 +219,46 @@ 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 throw (); + inline void SAL_CALL mapInterface( void ** ppOut, void * pInterface, const ::com::sun::star::uno::Type & rType ) const SAL_THROW( () ); }; //__________________________________________________________________________________________________ -inline Mapping::Mapping( const ::rtl::OUString & rFrom, const ::rtl::OUString & rTo, - const ::rtl::OUString & rAddPurpose ) throw () +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 ); } //__________________________________________________________________________________________________ -inline Mapping::Mapping( uno_Environment * pFrom, uno_Environment * pTo, - const ::rtl::OUString & rAddPurpose ) throw () +inline Mapping::Mapping( + uno_Environment * pFrom, uno_Environment * pTo, const ::rtl::OUString & rAddPurpose ) + SAL_THROW( () ) : _pMapping( 0 ) { uno_getMapping( &_pMapping, pFrom, pTo, rAddPurpose.pData ); } //__________________________________________________________________________________________________ -inline Mapping::Mapping( uno_Mapping * pMapping ) throw () +inline Mapping::Mapping( uno_Mapping * pMapping ) SAL_THROW( () ) : _pMapping( pMapping ) { if (_pMapping) (*_pMapping->acquire)( _pMapping ); } //__________________________________________________________________________________________________ -inline Mapping::Mapping( const Mapping & rMapping ) throw () +inline Mapping::Mapping( const Mapping & rMapping ) SAL_THROW( () ) : _pMapping( rMapping._pMapping ) { if (_pMapping) (*_pMapping->acquire)( _pMapping ); } //__________________________________________________________________________________________________ -inline Mapping::~Mapping() throw () +inline Mapping::~Mapping() SAL_THROW( () ) { if (_pMapping) (*_pMapping->release)( _pMapping ); } //__________________________________________________________________________________________________ -inline void Mapping::clear() throw () +inline void Mapping::clear() SAL_THROW( () ) { if (_pMapping) { @@ -265,7 +267,7 @@ inline void Mapping::clear() throw () } } //__________________________________________________________________________________________________ -inline Mapping & Mapping::operator = ( uno_Mapping * pMapping ) throw () +inline Mapping & Mapping::operator = ( uno_Mapping * pMapping ) SAL_THROW( () ) { if (pMapping) (*pMapping->acquire)( pMapping ); @@ -275,8 +277,9 @@ inline Mapping & Mapping::operator = ( uno_Mapping * pMapping ) throw () return *this; } //__________________________________________________________________________________________________ -inline void Mapping::mapInterface( void ** ppOut, void * pInterface, - const ::com::sun::star::uno::Type & rType ) const 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() ); @@ -287,16 +290,18 @@ inline void Mapping::mapInterface( void ** ppOut, void * pInterface, } } //__________________________________________________________________________________________________ -inline void * Mapping::mapInterface( void * pInterface, - typelib_InterfaceTypeDescription * pTypeDescr ) const throw () +inline void * Mapping::mapInterface( + void * pInterface, typelib_InterfaceTypeDescription * pTypeDescr ) const + SAL_THROW( () ) { void * pOut = 0; (*_pMapping->mapInterface)( _pMapping, &pOut, pInterface, pTypeDescr ); return pOut; } //__________________________________________________________________________________________________ -inline void * Mapping::mapInterface( void * pInterface, - const ::com::sun::star::uno::Type & rType ) const throw () +inline void * Mapping::mapInterface( + void * pInterface, const ::com::sun::star::uno::Type & rType ) const + SAL_THROW( () ) { void * pOut = 0; mapInterface( &pOut, pInterface, rType ); @@ -305,7 +310,7 @@ inline void * Mapping::mapInterface( void * pInterface, //-------------------------------------------------------------------------------------------------- template< class C > -inline sal_Bool mapToCpp( Reference< C > * ppRet, uno_Interface * pUnoI ) throw () +inline sal_Bool mapToCpp( Reference< C > * ppRet, uno_Interface * pUnoI ) SAL_THROW( () ) { Mapping aMapping( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM(UNO_LB_UNO) ), @@ -316,7 +321,7 @@ inline sal_Bool mapToCpp( Reference< C > * ppRet, uno_Interface * pUnoI ) throw } //-------------------------------------------------------------------------------------------------- template< class C > -inline sal_Bool mapToUno( uno_Interface ** ppRet, const Reference< C > & x ) throw () +inline sal_Bool mapToUno( uno_Interface ** ppRet, const Reference< C > & x ) SAL_THROW( () ) { Mapping aMapping( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM(CPPU_CURRENT_LANGUAGE_BINDING_NAME) ), diff --git a/cppu/inc/uno/sequence2.h b/cppu/inc/uno/sequence2.h index eeec2cca7037..81788d8cec1c 100644 --- a/cppu/inc/uno/sequence2.h +++ b/cppu/inc/uno/sequence2.h @@ -2,9 +2,9 @@ * * $RCSfile: sequence2.h,v $ * - * $Revision: 1.2 $ + * $Revision: 1.3 $ * - * last change: $Author: dbo $ $Date: 2000-12-21 14:35:28 $ + * last change: $Author: dbo $ $Date: 2001-03-09 12:10:56 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -87,7 +87,7 @@ SAL_DLLEXPORT void SAL_CALL uno_sequence_assign( uno_Sequence * pSource, typelib_TypeDescription * pTypeDescr, uno_ReleaseFunc release ) - SAL_THROW (); + SAL_THROW_EXTERN_C(); /** Assign a sequence. <br> @param ppDest destinstaion sequence @@ -100,7 +100,7 @@ SAL_DLLEXPORT void SAL_CALL uno_type_sequence_assign( uno_Sequence * pSource, typelib_TypeDescriptionReference * pType, uno_ReleaseFunc release ) - SAL_THROW (); + SAL_THROW_EXTERN_C(); /** Constructs a new sequence with given elements. <br> @@ -115,7 +115,7 @@ SAL_DLLEXPORT void SAL_CALL uno_sequence_construct( typelib_TypeDescription * pTypeDescr, void * pElements, sal_Int32 len, uno_AcquireFunc acquire ) - SAL_THROW (); + SAL_THROW_EXTERN_C(); /** Constructs a new sequence with given elements. <br> @param ppSequence <b>out</b> parameter sequence @@ -129,7 +129,7 @@ SAL_DLLEXPORT void SAL_CALL uno_type_sequence_construct( typelib_TypeDescriptionReference * pType, void * pElements, sal_Int32 len, uno_AcquireFunc acquire ) - SAL_THROW (); + SAL_THROW_EXTERN_C(); /** Assures that the reference count of the given sequence is one. Otherwise a new copy of the sequence is created with a reference count of one. @@ -144,7 +144,7 @@ SAL_DLLEXPORT void SAL_CALL uno_sequence_reference2One( typelib_TypeDescription * pTypeDescr, uno_AcquireFunc acquire, uno_ReleaseFunc release ) - SAL_THROW (); + SAL_THROW_EXTERN_C(); /** Assures that the reference count of the given sequence is one. Otherwise a new copy of the sequence is created with a reference count of one. <br> @@ -158,7 +158,7 @@ SAL_DLLEXPORT void SAL_CALL uno_type_sequence_reference2One( typelib_TypeDescriptionReference * pType, uno_AcquireFunc acquire, uno_ReleaseFunc release ) - SAL_THROW (); + SAL_THROW_EXTERN_C(); /** Reallocates length of a sequence. This truncates a sequence or enlarges it default constructing appended elements. @@ -175,7 +175,7 @@ SAL_DLLEXPORT void SAL_CALL uno_sequence_realloc( sal_Int32 nSize, uno_AcquireFunc acquire, uno_ReleaseFunc release ) - SAL_THROW (); + SAL_THROW_EXTERN_C(); /** Reallocates length of a sequence. This truncates a sequence or enlarges it default constructing appended elements. <br> @@ -191,7 +191,7 @@ SAL_DLLEXPORT void SAL_CALL uno_type_sequence_realloc( sal_Int32 nSize, uno_AcquireFunc acquire, uno_ReleaseFunc release ) - SAL_THROW (); + SAL_THROW_EXTERN_C(); #ifdef __cplusplus } diff --git a/cppu/inc/uno/threadpool.h b/cppu/inc/uno/threadpool.h index 853d8ba9367a..3558ddb289e4 100644 --- a/cppu/inc/uno/threadpool.h +++ b/cppu/inc/uno/threadpool.h @@ -2,9 +2,9 @@ * * $RCSfile: threadpool.h,v $ * - * $Revision: 1.2 $ + * $Revision: 1.3 $ * - * last change: $Author: dbo $ $Date: 2000-12-21 14:35:28 $ + * last change: $Author: dbo $ $Date: 2001-03-09 12:10:56 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -82,7 +82,7 @@ extern "C" { * altered. ( This is in general a bug ). <br> **/ SAL_DLLEXPORT sal_Bool SAL_CALL uno_bindIdToCurrentThread( sal_Sequence *pThreadId ) - SAL_THROW (); + SAL_THROW_EXTERN_C(); /** @@ -95,7 +95,7 @@ SAL_DLLEXPORT sal_Bool SAL_CALL uno_bindIdToCurrentThread( sal_Sequence *pThread * @param ppThreadId [out] Contains the (acquired) ThreadId. **/ SAL_DLLEXPORT void SAL_CALL uno_getIdOfCurrentThread( sal_Sequence **ppThreadId ) - SAL_THROW (); + SAL_THROW_EXTERN_C(); /** @@ -103,7 +103,7 @@ SAL_DLLEXPORT void SAL_CALL uno_getIdOfCurrentThread( sal_Sequence **ppThreadId * thread is broken. **/ SAL_DLLEXPORT void SAL_CALL uno_releaseIdFromCurrentThread() - SAL_THROW (); + SAL_THROW_EXTERN_C(); /** @@ -121,7 +121,7 @@ struct uno_threadpool_Handle; * @see uno_threadpool_disposeThreads ***/ SAL_DLLEXPORT struct uno_threadpool_Handle * SAL_CALL -uno_threadpool_createHandle( sal_Int64 nDisposeId ) SAL_THROW (); +uno_threadpool_createHandle( sal_Int64 nDisposeId ) SAL_THROW_EXTERN_C(); /** * This method is called to wait for a reply of a previously sent request. This is a @@ -134,7 +134,7 @@ uno_threadpool_createHandle( sal_Int64 nDisposeId ) SAL_THROW (); **/ SAL_DLLEXPORT void SAL_CALL uno_threadpool_enter( struct uno_threadpool_Handle * pHandle , void **ppThreadSpecificData ) - SAL_THROW (); + SAL_THROW_EXTERN_C(); /** @@ -163,7 +163,7 @@ SAL_DLLEXPORT void SAL_CALL uno_threadpool_putRequest( sal_Sequence *pThreadId, void *pThreadSpecificData, void ( SAL_CALL * doRequest ) ( void *pThreadSpecificData ), - sal_Bool bIsOneway ) SAL_THROW (); + sal_Bool bIsOneway ) SAL_THROW_EXTERN_C(); /** @@ -173,7 +173,7 @@ uno_threadpool_putRequest( sal_Sequence *pThreadId, * @param pThreadSpecificData The pointer, that is returned by uno_threadpool_enter. **/ SAL_DLLEXPORT void SAL_CALL -uno_threadpool_putReply( sal_Sequence *pThreadId, void *pThreadSpecificData ) SAL_THROW (); +uno_threadpool_putReply( sal_Sequence *pThreadId, void *pThreadSpecificData ) SAL_THROW_EXTERN_C(); /** @@ -191,7 +191,7 @@ uno_threadpool_putReply( sal_Sequence *pThreadId, void *pThreadSpecificData ) SA * uno_threadpool_stopDisposeThreads. **/ SAL_DLLEXPORT void SAL_CALL -uno_threadpool_disposeThreads( sal_Int64 nDisposeId ) SAL_THROW (); +uno_threadpool_disposeThreads( sal_Int64 nDisposeId ) SAL_THROW_EXTERN_C(); /** @@ -204,7 +204,7 @@ uno_threadpool_disposeThreads( sal_Int64 nDisposeId ) SAL_THROW (); * @see uno_threadpool_disposeThreads **/ SAL_DLLEXPORT void SAL_CALL -uno_threadpool_stopDisposeThreads( sal_Int64 nDisposeId ) SAL_THROW (); +uno_threadpool_stopDisposeThreads( sal_Int64 nDisposeId ) SAL_THROW_EXTERN_C(); #ifdef __cplusplus } |