diff options
29 files changed, 629 insertions, 502 deletions
diff --git a/cppuhelper/inc/cppuhelper/compbase.hxx b/cppuhelper/inc/cppuhelper/compbase.hxx index 502fc21d7..d4720a9b6 100644 --- a/cppuhelper/inc/cppuhelper/compbase.hxx +++ b/cppuhelper/inc/cppuhelper/compbase.hxx @@ -2,9 +2,9 @@ * * $RCSfile: compbase.hxx,v $ * - * $Revision: 1.2 $ + * $Revision: 1.3 $ * - * last change: $Author: jbu $ $Date: 2000-10-06 16:00:30 $ + * last change: $Author: dbo $ $Date: 2001-03-09 12:15:26 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -90,7 +90,7 @@ protected: \ virtual void SAL_CALL disposing() \ {} \ public: \ - WeakComponentImplHelper##N( ::osl::Mutex & rMutex ) \ + WeakComponentImplHelper##N( ::osl::Mutex & rMutex ) SAL_THROW( () ) \ : rBHelper( rMutex ) \ {} \ virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException) \ @@ -154,7 +154,7 @@ protected: \ virtual void SAL_CALL disposing() \ {} \ public: \ - WeakAggComponentImplHelper##N( ::osl::Mutex & rMutex ) \ + WeakAggComponentImplHelper##N( ::osl::Mutex & rMutex ) SAL_THROW( () ) \ : rBHelper( rMutex ) \ {} \ virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException) \ diff --git a/cppuhelper/inc/cppuhelper/component.hxx b/cppuhelper/inc/cppuhelper/component.hxx index b4689afc4..1021f9cb2 100644 --- a/cppuhelper/inc/cppuhelper/component.hxx +++ b/cppuhelper/inc/cppuhelper/component.hxx @@ -2,9 +2,9 @@ * * $RCSfile: component.hxx,v $ * - * $Revision: 1.1.1.1 $ + * $Revision: 1.2 $ * - * last change: $Author: hr $ $Date: 2000-09-18 15:26:09 $ + * last change: $Author: dbo $ $Date: 2001-03-09 12:15:26 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -100,13 +100,13 @@ public: * The lifetime must be longer than the lifetime * of this object. */ - OComponentHelper( ::osl::Mutex & rMutex ); + OComponentHelper( ::osl::Mutex & rMutex ) SAL_THROW( () ); /** * If dispose is not previous called, first acquire is called to protect against * double delete and than call dispose.<BR> Note in this situation no destructor * of derived classes are called. */ - ~OComponentHelper(); + ~OComponentHelper() SAL_THROW( (::com::sun::star::uno::RuntimeException) ); // XInterface virtual void SAL_CALL release() throw(); @@ -115,7 +115,8 @@ public: virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw(::com::sun::star::uno::RuntimeException) = 0; // XComponent - virtual void SAL_CALL dispose() throw(::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL dispose() + throw(::com::sun::star::uno::RuntimeException); virtual void SAL_CALL addEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener >& aListener ) throw(::com::sun::star::uno::RuntimeException); @@ -137,8 +138,8 @@ protected: */ OBroadcastHelper rBHelper; private: - OComponentHelper( const OComponentHelper & ); - OComponentHelper & operator = ( const OComponentHelper & ); + OComponentHelper( const OComponentHelper & ) SAL_THROW( () ); + OComponentHelper & operator = ( const OComponentHelper & ) SAL_THROW( () ); }; } diff --git a/cppuhelper/inc/cppuhelper/exc_hlp.hxx b/cppuhelper/inc/cppuhelper/exc_hlp.hxx index 63b9759cc..4262ea500 100644 --- a/cppuhelper/inc/cppuhelper/exc_hlp.hxx +++ b/cppuhelper/inc/cppuhelper/exc_hlp.hxx @@ -2,9 +2,9 @@ * * $RCSfile: exc_hlp.hxx,v $ * - * $Revision: 1.1.1.1 $ + * $Revision: 1.2 $ * - * last change: $Author: hr $ $Date: 2000-09-18 15:26:09 $ + * last change: $Author: dbo $ $Date: 2001-03-09 12:15:26 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -76,7 +76,7 @@ namespace cppu * @param rExc exception to be thrown. */ void SAL_CALL throwException( const ::com::sun::star::uno::Any & rExc ) - throw (::com::sun::star::uno::Exception); + SAL_THROW( (::com::sun::star::uno::Exception) ); } diff --git a/cppuhelper/inc/cppuhelper/factory.hxx b/cppuhelper/inc/cppuhelper/factory.hxx index ecf819f66..b9153b8cd 100644 --- a/cppuhelper/inc/cppuhelper/factory.hxx +++ b/cppuhelper/inc/cppuhelper/factory.hxx @@ -2,9 +2,9 @@ * * $RCSfile: factory.hxx,v $ * - * $Revision: 1.1.1.1 $ + * $Revision: 1.2 $ * - * last change: $Author: hr $ $Date: 2000-09-18 15:26:09 $ + * last change: $Author: dbo $ $Date: 2001-03-09 12:15:26 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -134,20 +134,6 @@ typedef void * (SAL_CALL * component_getFactoryFunc)( //################################################################################################## -#define WRITE_COMPONENT_INFO_FUNCTION "writeComponentInfo" -#define CREATE_COMPONENT_FACTORY_FUNCTION "createComponentFactory" - -/** This function pointer describes a function to write needed administrativ information - * about a component into the registry. - */ -typedef sal_Bool (SAL_CALL * WriteComponentInfoFunc)( uno_Interface * pXKey ); - -/** This function pointer describes a function to create a factory for one or more components. - */ -typedef uno_Interface* (SAL_CALL * CreateComponentFactoryFunc)( - const sal_Unicode *, uno_Interface * pXSMgr, uno_Interface * pXKey ); - - /** */ //for docpp namespace cppu { @@ -157,10 +143,8 @@ namespace cppu * @see createSingleFactory * @see createOneInstanceFactory */ -typedef ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >(SAL_CALL * ComponentInstantiation) -( - const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > & rServiceManager -); +typedef ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >(SAL_CALL * ComponentInstantiation)( + const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > & rServiceManager ); /** * Create a single service factory.<BR> @@ -175,13 +159,13 @@ typedef ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >(SA * * @see createOneInstanceFactory */ -::com::sun::star::uno::Reference< ::com::sun::star::lang::XSingleServiceFactory > SAL_CALL createSingleFactory -( +::com::sun::star::uno::Reference< ::com::sun::star::lang::XSingleServiceFactory > SAL_CALL +createSingleFactory( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > & rServiceManager, const ::rtl::OUString & rImplementationName, ComponentInstantiation pCreateFunction, - const ::com::sun::star::uno::Sequence< ::rtl::OUString > & rServiceNames -); + const ::com::sun::star::uno::Sequence< ::rtl::OUString > & rServiceNames ) + SAL_THROW( () ); /** * Create a factory, that wrappes another one.<BR> @@ -197,11 +181,11 @@ typedef ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >(SA * * @see createSingleFactory */ -::com::sun::star::uno::Reference< ::com::sun::star::lang::XSingleServiceFactory > SAL_CALL createFactoryProxy -( +::com::sun::star::uno::Reference< ::com::sun::star::lang::XSingleServiceFactory > SAL_CALL +createFactoryProxy( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > & rServiceManager, - const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XSingleServiceFactory > & rFactory -); + const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XSingleServiceFactory > & rFactory ) + SAL_THROW( () ); /** * Create a single service factory which hold the instance created. If the @@ -218,13 +202,13 @@ typedef ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >(SA * * @see createSingleFactory */ -::com::sun::star::uno::Reference< ::com::sun::star::lang::XSingleServiceFactory > SAL_CALL createOneInstanceFactory -( +::com::sun::star::uno::Reference< ::com::sun::star::lang::XSingleServiceFactory > SAL_CALL +createOneInstanceFactory( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > & rServiceManager, const ::rtl::OUString & rComponentName, ComponentInstantiation pCreateFunction, - const ::com::sun::star::uno::Sequence< ::rtl::OUString > & rServiceNames -); + const ::com::sun::star::uno::Sequence< ::rtl::OUString > & rServiceNames ) + SAL_THROW( () ); /** * Create a single service factory.<BR> @@ -237,12 +221,11 @@ typedef ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >(SA * @return a factory that support the interfaces XServiceProvider, XServiceInfo * XSingleServiceFactory and XComponent. */ -SAL_DLLEXPORT ::com::sun::star::uno::Reference< ::com::sun::star::lang::XSingleServiceFactory > SAL_CALL createSingleRegistryFactory -( +::com::sun::star::uno::Reference< ::com::sun::star::lang::XSingleServiceFactory > SAL_CALL createSingleRegistryFactory( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > & rServiceManager, const ::rtl::OUString & rImplementationName, - const ::com::sun::star::uno::Reference< ::com::sun::star::registry::XRegistryKey > & rImplementationKey -); + const ::com::sun::star::uno::Reference< ::com::sun::star::registry::XRegistryKey > & rImplementationKey ) + SAL_THROW( () ); /** * Create a single service factory which hold the instance created. If the @@ -259,12 +242,11 @@ SAL_DLLEXPORT ::com::sun::star::uno::Reference< ::com::sun::star::lang::XSingleS * * @see createSingleRegistryFactory */ -::com::sun::star::uno::Reference< ::com::sun::star::lang::XSingleServiceFactory > SAL_CALL createOneInstanceRegistryFactory -( +::com::sun::star::uno::Reference< ::com::sun::star::lang::XSingleServiceFactory > SAL_CALL createOneInstanceRegistryFactory( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > & rServiceManager, const ::rtl::OUString & rComponentName, - const ::com::sun::star::uno::Reference< ::com::sun::star::registry::XRegistryKey > & rImplementationKey -); + const ::com::sun::star::uno::Reference< ::com::sun::star::registry::XRegistryKey > & rImplementationKey ) + SAL_THROW( () ); } diff --git a/cppuhelper/inc/cppuhelper/implbase.hxx b/cppuhelper/inc/cppuhelper/implbase.hxx index 5293437e8..9c0289ecc 100644 --- a/cppuhelper/inc/cppuhelper/implbase.hxx +++ b/cppuhelper/inc/cppuhelper/implbase.hxx @@ -2,9 +2,9 @@ * * $RCSfile: implbase.hxx,v $ * - * $Revision: 1.2 $ + * $Revision: 1.3 $ * - * last change: $Author: dbo $ $Date: 2000-10-06 15:15:09 $ + * last change: $Author: dbo $ $Date: 2001-03-09 12:15:26 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -92,25 +92,29 @@ struct ClassDataBase ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > * pTypes; ::com::sun::star::uno::Sequence< sal_Int8 > * pId; - ClassDataBase(); - ClassDataBase( sal_Int32 nClassCode ); - ~ClassDataBase(); + ClassDataBase() SAL_THROW( () ); + ClassDataBase( sal_Int32 nClassCode ) SAL_THROW( () ); + ~ClassDataBase() SAL_THROW( () ); }; struct ClassData : public ClassDataBase { Type_Offset arType2Offset[1]; - void SAL_CALL initTypeProvider(); - void SAL_CALL writeTypeOffset( const ::com::sun::star::uno::Type & rType, sal_Int32 nOffset ); + void SAL_CALL initTypeProvider() SAL_THROW( () ); + void SAL_CALL writeTypeOffset( const ::com::sun::star::uno::Type & rType, sal_Int32 nOffset ) + SAL_THROW( () ); ::com::sun::star::uno::Any SAL_CALL query( - const ::com::sun::star::uno::Type & rType, ::com::sun::star::lang::XTypeProvider * pBase ); - ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes(); - ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId(); + const ::com::sun::star::uno::Type & rType, ::com::sun::star::lang::XTypeProvider * pBase ) + SAL_THROW( () ); + ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes() + SAL_THROW( () ); + ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() + SAL_THROW( () ); }; //================================================================================================== -::osl::Mutex & SAL_CALL getImplHelperInitMutex(void); +::osl::Mutex & SAL_CALL getImplHelperInitMutex(void) SAL_THROW( () ); } // @@ -124,7 +128,7 @@ namespace cppu \ struct ClassData##N : public ClassDataBase \ { \ Type_Offset arType2Offset[ N ]; \ - ClassData##N( sal_Int32 nClassCode ) \ + ClassData##N( sal_Int32 nClassCode ) SAL_THROW( () ) \ : ClassDataBase( nClassCode ) \ {} \ }; \ @@ -133,7 +137,7 @@ class ImplHelperBase##N \ : public ::com::sun::star::lang::XTypeProvider, __PUBLIC_IFC##N \ { \ protected: \ - ClassData & SAL_CALL getClassData( ClassDataBase & s_aCD ) \ + ClassData & SAL_CALL getClassData( ClassDataBase & s_aCD ) SAL_THROW( () ) \ { \ ClassData & rCD = * static_cast< ClassData * >( &s_aCD ); \ if (! rCD.bOffsetsInit) \ diff --git a/cppuhelper/inc/cppuhelper/interfacecontainer.h b/cppuhelper/inc/cppuhelper/interfacecontainer.h index 1910f3b14..c4f20612f 100644 --- a/cppuhelper/inc/cppuhelper/interfacecontainer.h +++ b/cppuhelper/inc/cppuhelper/interfacecontainer.h @@ -2,9 +2,9 @@ * * $RCSfile: interfacecontainer.h,v $ * - * $Revision: 1.6 $ + * $Revision: 1.7 $ * - * last change: $Author: jbu $ $Date: 2001-02-05 13:16:33 $ + * last change: $Author: dbo $ $Date: 2001-03-09 12:15:26 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -102,7 +102,7 @@ class OInterfaceContainerHelper; class OInterfaceIteratorHelper { public: - OInterfaceIteratorHelper(); + OInterfaceIteratorHelper() SAL_THROW( () ); /** Create an iterator over the elements of the container. The iterator copies the elements of the conatainer. A change to the container does not @@ -112,19 +112,20 @@ public: @param rCont the container of the elements. */ - OInterfaceIteratorHelper( OInterfaceContainerHelper & rCont ); + OInterfaceIteratorHelper( OInterfaceContainerHelper & rCont ) SAL_THROW( () ); /** Release the connection to the container. */ - ~OInterfaceIteratorHelper(); + ~OInterfaceIteratorHelper() SAL_THROW( () ); /** Return true, if there are more elements in the iterator. */ - sal_Bool SAL_CALL hasMoreElements() const { return nRemain != 0; } + sal_Bool SAL_CALL hasMoreElements() const SAL_THROW( () ) + { return nRemain != 0; } /** Return the next element of the iterator. Calling this method if hasMoreElements return false, is an error. */ - ::com::sun::star::uno::XInterface * SAL_CALL next(); + ::com::sun::star::uno::XInterface * SAL_CALL next() SAL_THROW( () ); /** Removes the current element (the last one returned by next()) from the underlying container. Calling this method before @@ -132,7 +133,7 @@ public: inbetween is an error. @since udk211 (has been added in udk210) */ - void SAL_CALL remove(); + void SAL_CALL remove() SAL_THROW( () ); private: OInterfaceContainerHelper & rCont; @@ -140,8 +141,8 @@ private: void * pData; sal_Int32 nRemain; - OInterfaceIteratorHelper( const OInterfaceIteratorHelper & ); - OInterfaceIteratorHelper & operator = ( const OInterfaceIteratorHelper & ); + OInterfaceIteratorHelper( const OInterfaceIteratorHelper & ) SAL_THROW( () ); + OInterfaceIteratorHelper & operator = ( const OInterfaceIteratorHelper & ) SAL_THROW( () ); }; //=================================================================== @@ -159,10 +160,14 @@ class OInterfaceContainerHelper { public: // these are here to force memory de/allocation to sal lib. - 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 ); } - 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 ) SAL_THROW( () ) + { return pMem; } + inline static void SAL_CALL operator delete( void *, void * ) SAL_THROW( () ) + {} /** Create an interface container. The internal representation @@ -173,22 +178,22 @@ public: The lifetime must be longer than the lifetime of this object. */ - OInterfaceContainerHelper( ::osl::Mutex & rMutex ); + OInterfaceContainerHelper( ::osl::Mutex & rMutex ) SAL_THROW( () ); /** Release all interfaces. All iterators must be destroyed before the container. */ - ~OInterfaceContainerHelper(); + ~OInterfaceContainerHelper() SAL_THROW( () ); /** Return the number of Elements in the container. Only usefull if you are acquire the mutex. */ - sal_Int32 SAL_CALL getLength() const; + sal_Int32 SAL_CALL getLength() const SAL_THROW( () ); /** Return all interfaces added to this container. **/ - ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > > SAL_CALL getElements() const; + ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > > SAL_CALL getElements() const SAL_THROW( () ); /** Insert an element in the container. The position is not specified. @@ -196,23 +201,23 @@ public: the same pointer more than once. @return the new count of elements in the container. */ - sal_Int32 SAL_CALL addInterface( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > & rxIFace ); + sal_Int32 SAL_CALL addInterface( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > & rxIFace ) SAL_THROW( () ); /** Remove an element from the container. It uses the equal definition of uno objects to remove the interfaces. @param rxIFace the removed interface. @return the new count of elements in the container. */ - sal_Int32 SAL_CALL removeInterface( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > & rxIFace ); + sal_Int32 SAL_CALL removeInterface( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > & rxIFace ) SAL_THROW( () ); /** Call disposing on all object in the container that support XEventListener. Than clear the container. */ - void SAL_CALL disposeAndClear( const ::com::sun::star::lang::EventObject & rEvt ); + void SAL_CALL disposeAndClear( const ::com::sun::star::lang::EventObject & rEvt ) SAL_THROW( () ); /** Remove all elements. */ - void SAL_CALL clear(); + void SAL_CALL clear() SAL_THROW( () ); private: friend class OInterfaceIteratorHelper; @@ -227,14 +232,14 @@ friend class OInterfaceIteratorHelper; /** TRUE -> pData is of type Sequence< XInterfaceSequence >. */ sal_Bool bIsList; - OInterfaceContainerHelper( const OInterfaceContainerHelper & ); - OInterfaceContainerHelper & operator = ( const OInterfaceContainerHelper & ); + OInterfaceContainerHelper( const OInterfaceContainerHelper & ) SAL_THROW( () ); + OInterfaceContainerHelper & operator = ( const OInterfaceContainerHelper & ) SAL_THROW( () ); /** Dulicate content of the conaitner and release the old one without destroing. The mutex must be locked and the memberbInUse must be true. */ - void copyAndResetInUse(); + void copyAndResetInUse() SAL_THROW( () ); public: }; @@ -264,23 +269,23 @@ public: The lifetime must be longer than the lifetime of this object. */ - inline OMultiTypeInterfaceContainerHelperVar( ::osl::Mutex & ); + inline OMultiTypeInterfaceContainerHelperVar( ::osl::Mutex & ) SAL_THROW( () ); /** Delete all containers. */ - inline ~OMultiTypeInterfaceContainerHelperVar(); + inline ~OMultiTypeInterfaceContainerHelperVar() SAL_THROW( () ); /** Return all id's under which at least one interface is added. */ - inline ::com::sun::star::uno::Sequence< key > SAL_CALL getContainedTypes() const; + inline ::com::sun::star::uno::Sequence< key > SAL_CALL getContainedTypes() const SAL_THROW( () ); /** Return the container created under this key. @return the container created under this key. If the container was not created, null was returned. */ - inline OInterfaceContainerHelper * SAL_CALL getContainer( const key & ) const; + inline OInterfaceContainerHelper * SAL_CALL getContainer( const key & ) const SAL_THROW( () ); /** Insert an element in the container specified with the key. The position is not specified. @@ -290,7 +295,9 @@ public: @return the new count of elements in the container. */ inline sal_Int32 SAL_CALL addInterface( - const key & rKey, const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > & r ); + const key & rKey, + const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > & r ) + SAL_THROW( () ); /** Remove an element from the container specified with the key. @@ -300,25 +307,27 @@ public: @return the new count of elements in the container. */ inline sal_Int32 SAL_CALL removeInterface( - const key & rKey, const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > & rxIFace ); + const key & rKey, + const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > & rxIFace ) + SAL_THROW( () ); /** Call disposing on all object in the container that support XEventListener. Than clear the container. */ - inline void SAL_CALL disposeAndClear( const ::com::sun::star::lang::EventObject & rEvt ); + inline void SAL_CALL disposeAndClear( const ::com::sun::star::lang::EventObject & rEvt ) SAL_THROW( () ); /** Remove all elements of all containers. Does not delete the container. */ - inline void SAL_CALL clear(); + inline void SAL_CALL clear() SAL_THROW( () ); typedef key keyType; private: ::std::hash_map< key , void* , hashImpl , equalImpl > *m_pMap; ::osl::Mutex & rMutex; - inline OMultiTypeInterfaceContainerHelperVar( const OMultiTypeInterfaceContainerHelperVar & ); - inline OMultiTypeInterfaceContainerHelperVar & operator = ( const OMultiTypeInterfaceContainerHelperVar & ); + inline OMultiTypeInterfaceContainerHelperVar( const OMultiTypeInterfaceContainerHelperVar & ) SAL_THROW( () ); + inline OMultiTypeInterfaceContainerHelperVar & operator = ( const OMultiTypeInterfaceContainerHelperVar & ) SAL_THROW( () ); }; @@ -349,7 +358,7 @@ struct OBroadcastHelperVar Initialize the structur. bDispose and bInDispose are set to false. @param rMutex the mutex reference. */ - OBroadcastHelperVar( ::osl::Mutex & rMutex_ ) + OBroadcastHelperVar( ::osl::Mutex & rMutex_ ) SAL_THROW( () ) : rMutex( rMutex_ ) , aLC( rMutex_ ) , bDisposed( sal_False ) @@ -359,7 +368,10 @@ struct OBroadcastHelperVar /** adds a listener threadsafe. **/ - inline void addListener( const keyType &key , const ::com::sun::star::uno::Reference < ::com::sun::star::uno::XInterface > &r ) + inline void addListener( + const keyType &key, + const ::com::sun::star::uno::Reference < ::com::sun::star::uno::XInterface > &r ) + SAL_THROW( () ) { ::osl::MutexGuard guard( rMutex ); OSL_ENSHURE( !bInDispose, "do not add listeners in the dispose call" ); @@ -371,7 +383,10 @@ struct OBroadcastHelperVar /** removes a listener threadsafe **/ - inline void removeListener( const keyType &key , const ::com::sun::star::uno::Reference < ::com::sun::star::uno::XInterface > & r ) + inline void removeListener( + const keyType &key, + const ::com::sun::star::uno::Reference < ::com::sun::star::uno::XInterface > & r ) + SAL_THROW( () ) { ::osl::MutexGuard guard( rMutex ); OSL_ENSHURE( !bDisposed, "object is disposed" ); @@ -385,10 +400,8 @@ struct OBroadcastHelperVar was not created, null was returned. This can be used to optimize performance ( construction of an event object can be avoided ). ***/ - inline OInterfaceContainerHelper * SAL_CALL getContainer( const keyType &key ) const - { - return aLC.getContainer( key ); - } + inline OInterfaceContainerHelper * SAL_CALL getContainer( const keyType &key ) const SAL_THROW( () ) + { return aLC.getContainer( key ); } }; /*------------------------------------------ @@ -401,7 +414,7 @@ struct OBroadcastHelperVar // helper function call class struct hashType_Impl { - size_t operator()(const ::com::sun::star::uno::Type & s) const + size_t operator()(const ::com::sun::star::uno::Type & s) const SAL_THROW( () ) { return s.getTypeName().hashCode(); } }; diff --git a/cppuhelper/inc/cppuhelper/interfacecontainer.hxx b/cppuhelper/inc/cppuhelper/interfacecontainer.hxx index 66ac5b1ae..4434b823d 100644 --- a/cppuhelper/inc/cppuhelper/interfacecontainer.hxx +++ b/cppuhelper/inc/cppuhelper/interfacecontainer.hxx @@ -2,9 +2,9 @@ * * $RCSfile: interfacecontainer.hxx,v $ * - * $Revision: 1.1.1.1 $ + * $Revision: 1.2 $ * - * last change: $Author: hr $ $Date: 2000-09-18 15:26:09 $ + * last change: $Author: dbo $ $Date: 2001-03-09 12:15:26 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -71,6 +71,7 @@ namespace cppu template< class key , class hashImpl , class equalImpl > inline OMultiTypeInterfaceContainerHelperVar< key , hashImpl , equalImpl >::OMultiTypeInterfaceContainerHelperVar( ::osl::Mutex & rMutex_ ) + SAL_THROW( () ) : rMutex( rMutex_ ) { m_pMap = new CONT_HASHMAP; @@ -79,9 +80,10 @@ inline OMultiTypeInterfaceContainerHelperVar< key , hashImpl , equalImpl >::OMul //=================================================================== template< class key , class hashImpl , class equalImpl > inline OMultiTypeInterfaceContainerHelperVar< key , hashImpl , equalImpl >::~OMultiTypeInterfaceContainerHelperVar() + SAL_THROW( () ) { - CONT_HASHMAP::iterator iter = m_pMap->begin(); - CONT_HASHMAP::iterator end = m_pMap->end(); + CONT_HASHMAP::iterator iter = m_pMap->begin(); + CONT_HASHMAP::iterator end = m_pMap->end(); while( iter != end ) { @@ -95,6 +97,7 @@ inline OMultiTypeInterfaceContainerHelperVar< key , hashImpl , equalImpl >::~OMu //=================================================================== template< class key , class hashImpl , class equalImpl > inline ::com::sun::star::uno::Sequence< key > OMultiTypeInterfaceContainerHelperVar< key , hashImpl , equalImpl >::getContainedTypes() const + SAL_THROW( () ) { CONT_HASHMAP::size_type nSize; @@ -127,10 +130,8 @@ inline ::com::sun::star::uno::Sequence< key > OMultiTypeInterfaceContainerHelper //=================================================================== template< class key , class hashImpl , class equalImpl > -OInterfaceContainerHelper * OMultiTypeInterfaceContainerHelperVar< key , hashImpl , equalImpl >::getContainer -( - const key & rKey -) const +OInterfaceContainerHelper * OMultiTypeInterfaceContainerHelperVar< key , hashImpl , equalImpl >::getContainer( + const key & rKey ) const SAL_THROW( () ) { ::osl::MutexGuard aGuard( rMutex ); @@ -142,11 +143,10 @@ OInterfaceContainerHelper * OMultiTypeInterfaceContainerHelperVar< key , hashImp //=================================================================== template< class key , class hashImpl , class equalImpl > -sal_Int32 OMultiTypeInterfaceContainerHelperVar< key , hashImpl , equalImpl >::addInterface -( - const key & rKey, - const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > & rListener -) +sal_Int32 OMultiTypeInterfaceContainerHelperVar< key , hashImpl , equalImpl >::addInterface( + const key & rKey, + const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > & rListener ) + SAL_THROW( () ) { ::osl::MutexGuard aGuard( rMutex ); CONT_HASHMAP::iterator @@ -163,11 +163,10 @@ sal_Int32 OMultiTypeInterfaceContainerHelperVar< key , hashImpl , equalImpl >::a //=================================================================== template< class key , class hashImpl , class equalImpl > -inline sal_Int32 OMultiTypeInterfaceContainerHelperVar< key , hashImpl , equalImpl >::removeInterface -( +inline sal_Int32 OMultiTypeInterfaceContainerHelperVar< key , hashImpl , equalImpl >::removeInterface( const key & rKey, - const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > & rListener -) + const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > & rListener ) + SAL_THROW( () ) { ::osl::MutexGuard aGuard( rMutex ); @@ -183,7 +182,9 @@ inline sal_Int32 OMultiTypeInterfaceContainerHelperVar< key , hashImpl , equalIm //=================================================================== template< class key , class hashImpl , class equalImpl > -void OMultiTypeInterfaceContainerHelperVar< key , hashImpl , equalImpl >::disposeAndClear( const ::com::sun::star::lang::EventObject & rEvt ) +void OMultiTypeInterfaceContainerHelperVar< key , hashImpl , equalImpl >::disposeAndClear( + const ::com::sun::star::lang::EventObject & rEvt ) + SAL_THROW( () ) { CONT_HASHMAP::size_type nSize = 0; OInterfaceContainerHelper ** ppListenerContainers = NULL; @@ -220,7 +221,7 @@ void OMultiTypeInterfaceContainerHelperVar< key , hashImpl , equalImpl >::dispos //=================================================================== template< class key , class hashImpl , class equalImpl > -void OMultiTypeInterfaceContainerHelperVar< key , hashImpl , equalImpl >::clear() +void OMultiTypeInterfaceContainerHelperVar< key , hashImpl , equalImpl >::clear() SAL_THROW( () ) { ::osl::MutexGuard aGuard( rMutex ); CONT_HASHMAP::iterator iter = m_pMap->begin(); diff --git a/cppuhelper/inc/cppuhelper/propshlp.hxx b/cppuhelper/inc/cppuhelper/propshlp.hxx index 54bf85b1a..7aba15641 100644 --- a/cppuhelper/inc/cppuhelper/propshlp.hxx +++ b/cppuhelper/inc/cppuhelper/propshlp.hxx @@ -2,9 +2,9 @@ * * $RCSfile: propshlp.hxx,v $ * - * $Revision: 1.2 $ + * $Revision: 1.3 $ * - * last change: $Author: mh $ $Date: 2001-01-31 09:40:45 $ + * last change: $Author: dbo $ $Date: 2001-03-09 12:15:26 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -87,10 +87,14 @@ class IPropertyArrayHelper { public: // these are here to force memory de/allocation to sal lib. - 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 ); } - 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 ) SAL_THROW( () ) + { return pMem; } + inline static void SAL_CALL operator delete( void *, void * ) SAL_THROW( () ) + {} /** * Folowing the rule, the first virtual method impies the virtual destructor. @@ -157,9 +161,11 @@ public: * @param nElements is the number of properties in the pProps structure. * @param bSorted indicates that the elements are sorted. *********/ - OPropertyArrayHelper( ::com::sun::star::beans::Property *pProps, - sal_Int32 nElements , - sal_Bool bSorted = sal_True ); + OPropertyArrayHelper( + ::com::sun::star::beans::Property *pProps, + sal_Int32 nElements , + sal_Bool bSorted = sal_True ) + SAL_THROW( () ); /********* * Create an object which supports the common property interfaces. @@ -167,12 +173,15 @@ public: * The sequence aProps should be sorted. * @param bSorted indicates that the elements are sorted. *********/ - OPropertyArrayHelper( const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::Property > & aProps, - sal_Bool bSorted = sal_True ); + OPropertyArrayHelper( + const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::Property > & aProps, + sal_Bool bSorted = sal_True ) + SAL_THROW( () ); + /** * Return the number of properties. */ - sal_Int32 SAL_CALL getCount() const; + sal_Int32 SAL_CALL getCount() const SAL_THROW( () ); /** * Return the property members Name and Attribute from the handle nHandle. * @param nHandle the handle of a property. If the values of the handles @@ -190,37 +199,38 @@ public: /** * Return the sequence of properties. The sequence is sorted by name. */ - ::com::sun::star::uno::Sequence< ::com::sun::star::beans::Property > SAL_CALL getProperties(void); + virtual ::com::sun::star::uno::Sequence< ::com::sun::star::beans::Property > SAL_CALL getProperties(void); /** * Return the property with the name rPropertyName. * @param rPropertyName the name of the property. * @exception UnknownPropertyException thrown if the property name is unknown. */ - ::com::sun::star::beans::Property SAL_CALL getPropertyByName(const ::rtl::OUString& rPropertyName) + virtual ::com::sun::star::beans::Property SAL_CALL getPropertyByName( + const ::rtl::OUString& rPropertyName ) throw (::com::sun::star::beans::UnknownPropertyException); /** * Return true if the property with the name rPropertyName exist, otherwise false. * @param rPropertyName the name of the property. */ - sal_Bool SAL_CALL hasPropertyByName(const ::rtl::OUString& rPropertyName); + virtual sal_Bool SAL_CALL hasPropertyByName(const ::rtl::OUString& rPropertyName); /** * Return the handle of the property with the name rPropertyName. * If the property does not exist -1 is returned. * @param rPropertyName the name of the property. */ - sal_Int32 SAL_CALL getHandleByName( const ::rtl::OUString & rPropertyName ); + virtual sal_Int32 SAL_CALL getHandleByName( const ::rtl::OUString & rPropertyName ); /** * Fill the array with the handles of the properties. * @return the handles of the names from the pHandles array. -1 * indicates an unknown property name. */ - sal_Int32 SAL_CALL fillHandles( + virtual sal_Int32 SAL_CALL fillHandles( /*out*/sal_Int32 * pHandles, const ::com::sun::star::uno::Sequence< ::rtl::OUString > & rPropNames ); private: - void init( sal_Bool bSorted ); + void init( sal_Bool bSorted ) SAL_THROW( () ); /** The sequence generstet from the pProperties array. */ - ::com::sun::star::uno::Sequence< ::com::sun::star::beans::Property > aInfos; + ::com::sun::star::uno::Sequence< ::com::sun::star::beans::Property > aInfos; /** * True, If the values of the handles are sorted in the same way as the names * and the highest handle value is getCount() -1, otherwise false. @@ -255,14 +265,14 @@ private: struct equalInt32_Impl { - bool operator()(const sal_Int32 & i1 , const sal_Int32 & i2) const + bool operator()(const sal_Int32 & i1 , const sal_Int32 & i2) const SAL_THROW( () ) { return i1 == i2; } }; struct hashInt32_Impl { - size_t operator()(const sal_Int32 & i) const + size_t operator()(const sal_Int32 & i) const SAL_THROW( () ) { return i; } }; typedef OMultiTypeInterfaceContainerHelperVar< sal_Int32, hashInt32_Impl, equalInt32_Impl > @@ -282,18 +292,19 @@ public: * The lifetime must be longer as the lifetime * of this object. Stored in the variable rBHelper. */ - OPropertySetHelper( OBroadcastHelper & rBHelper ); + OPropertySetHelper( OBroadcastHelper & rBHelper ) SAL_THROW( () ); /** * You must call disposing before destruction. */ - ~OPropertySetHelper(); + ~OPropertySetHelper() SAL_THROW( () ); /** * Only return a reference to XMultiPropertySet, XFastPropertySet, XPropertySet and * XEventListener. * <B>Do not return a reference to XInterface.</B> */ - ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type & rType ); + ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type & rType ) + throw (::com::sun::star::uno::RuntimeException); /** * Send a disposing notification to the listeners in the conatiners aBoundLC @@ -301,7 +312,7 @@ public: * * @see OComponentHelper */ - void SAL_CALL disposing(); + void SAL_CALL disposing() SAL_THROW( () ); // XPropertySet //XPropertySetInfoRef getPropertySetInfo() const; @@ -310,32 +321,34 @@ public: * rPropertyName does not exist or is readonly. Otherwise rPropertyName is changed to its handle * value and setFastPropertyValue is called. */ - void SAL_CALL setPropertyValue(const ::rtl::OUString& rPropertyName, const ::com::sun::star::uno::Any& aValue); + virtual void SAL_CALL setPropertyValue( const ::rtl::OUString& rPropertyName, const ::com::sun::star::uno::Any& aValue ) + throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); /** * Throw UnknownPropertyException if the property with the name * rPropertyName does not exist. */ - ::com::sun::star::uno::Any SAL_CALL getPropertyValue(const ::rtl::OUString& aPropertyName); + virtual ::com::sun::star::uno::Any SAL_CALL getPropertyValue(const ::rtl::OUString& aPropertyName) + throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); /** Ignored if the property is not bound. */ - void SAL_CALL addPropertyChangeListener( + virtual void SAL_CALL addPropertyChangeListener( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener >& aListener) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); /** Ignored if the property is not bound. */ - void SAL_CALL removePropertyChangeListener( + virtual void SAL_CALL removePropertyChangeListener( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Reference < ::com::sun::star::beans::XPropertyChangeListener >& aListener) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); /** Ignored if the property is not constrained. */ - void SAL_CALL addVetoableChangeListener( + virtual void SAL_CALL addVetoableChangeListener( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XVetoableChangeListener >& aListener) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); /** Ignored if the property is not constrained. */ - void SAL_CALL removeVetoableChangeListener( + virtual void SAL_CALL removeVetoableChangeListener( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XVetoableChangeListener > & aListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); @@ -348,38 +361,44 @@ public: * is changed with the setFastPropertyValue_NoBroadcast method and the bound listeners are * notified. */ - void SAL_CALL setFastPropertyValue( sal_Int32 nHandle, const ::com::sun::star::uno::Any& rValue ) + virtual void SAL_CALL setFastPropertyValue( sal_Int32 nHandle, const ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); /** * Throw UnknownPropertyException if the property with the handle * nHandle does not exist. */ - ::com::sun::star::uno::Any SAL_CALL getFastPropertyValue( sal_Int32 nHandle ) + virtual ::com::sun::star::uno::Any SAL_CALL getFastPropertyValue( sal_Int32 nHandle ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); // XMultiPropertySet - void SAL_CALL setPropertyValues( + virtual void SAL_CALL setPropertyValues( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& PropertyNames, - const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& Values ); + const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& Values ) + throw(::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); - ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any > SAL_CALL getPropertyValues( - const ::com::sun::star::uno::Sequence< ::rtl::OUString >& PropertyNames ); + virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any > SAL_CALL getPropertyValues( + const ::com::sun::star::uno::Sequence< ::rtl::OUString >& PropertyNames ) + throw(::com::sun::star::uno::RuntimeException); - void SAL_CALL addPropertiesChangeListener( + virtual void SAL_CALL addPropertiesChangeListener( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& PropertyNames, - const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertiesChangeListener >& Listener ); + const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertiesChangeListener >& Listener ) + throw(::com::sun::star::uno::RuntimeException); + + virtual void SAL_CALL removePropertiesChangeListener( + const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertiesChangeListener >& Listener ) + throw(::com::sun::star::uno::RuntimeException); - void SAL_CALL removePropertiesChangeListener( - const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertiesChangeListener >& Listener ); - void SAL_CALL firePropertiesChangeEvent( + virtual void SAL_CALL firePropertiesChangeEvent( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& PropertyNames, - const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertiesChangeListener > & Listener ); + const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertiesChangeListener > & Listener ) + throw(::com::sun::star::uno::RuntimeException); /** * The property sequence is create in the call. The interface isn't used after the call. */ - static ::com::sun::star::uno::Reference < ::com::sun::star::beans::XPropertySetInfo > - SAL_CALL createPropertySetInfo( IPropertyArrayHelper & rProperties ); + static ::com::sun::star::uno::Reference < ::com::sun::star::beans::XPropertySetInfo > SAL_CALL + createPropertySetInfo( IPropertyArrayHelper & rProperties ) SAL_THROW( () ); protected: /** * This method fire events to all registered property listeners. @@ -390,11 +409,12 @@ protected: * @param bVetoable true means fire to VetoableChangeListener, false means fire to * XPropertyChangedListener and XMultiPropertyChangedListener. */ - void SAL_CALL fire( sal_Int32 * pnHandles, - const ::com::sun::star::uno::Any * pNewValues, - const ::com::sun::star::uno::Any * pOldValues, - sal_Int32 nCount, - sal_Bool bVetoable ); + void SAL_CALL fire( + sal_Int32 * pnHandles, + const ::com::sun::star::uno::Any * pNewValues, + const ::com::sun::star::uno::Any * pOldValues, + sal_Int32 nCount, + sal_Bool bVetoable ); /** * Set multible properties with the handles. @@ -405,11 +425,12 @@ protected: * @param pValues the values of the properties. * @param nHitCount the number of valid entries in the handle array. */ - void SAL_CALL setFastPropertyValues( sal_Int32 nSeqLen, - sal_Int32 * pHandles, - const ::com::sun::star::uno::Any * pValues, - sal_Int32 nHitCount ) - throw (::com::sun::star::uno::Exception); + void SAL_CALL setFastPropertyValues( + sal_Int32 nSeqLen, + sal_Int32 * pHandles, + const ::com::sun::star::uno::Any * pValues, + sal_Int32 nHitCount ) + SAL_THROW( (::com::sun::star::uno::Exception) ); /** * This abstract method must return the name to index table. This table contains all property @@ -468,8 +489,8 @@ protected: */ OMultiTypeInterfaceContainerHelperInt32 aVetoableLC; private: - OPropertySetHelper( const OPropertySetHelper & ); - OPropertySetHelper & operator = ( const OPropertySetHelper & ); + OPropertySetHelper( const OPropertySetHelper & ) SAL_THROW( () ); + OPropertySetHelper & operator = ( const OPropertySetHelper & ) SAL_THROW( () ); }; } // end namespace cppuhelper diff --git a/cppuhelper/inc/cppuhelper/proptypehlp.h b/cppuhelper/inc/cppuhelper/proptypehlp.h index fe641d7a6..52da2adbb 100644 --- a/cppuhelper/inc/cppuhelper/proptypehlp.h +++ b/cppuhelper/inc/cppuhelper/proptypehlp.h @@ -2,9 +2,9 @@ * * $RCSfile: proptypehlp.h,v $ * - * $Revision: 1.1.1.1 $ + * $Revision: 1.2 $ * - * last change: $Author: hr $ $Date: 2000-09-18 15:26:09 $ + * last change: $Author: dbo $ $Date: 2001-03-09 12:15:26 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -77,12 +77,14 @@ namespace cppu { template < class target > inline void SAL_CALL convertPropertyValue( target &value , const ::com::sun::star::uno::Any & a); -// throw (::com::sun::star::lang::IllegalArgumentException); +// SAL_THROW( (::com::sun::star::lang::IllegalArgumentException) ) + ; // This template is needed at least for msci4 compiler template < class target > inline void SAL_CALL convertPropertyValue( target &value , ::com::sun::star::uno::Any & a); -// throw (::com::sun::star::lang::IllegalArgumentException); +// SAL_THROW( (::com::sun::star::lang::IllegalArgumentException) ) + ; /**** * @@ -90,25 +92,25 @@ inline void SAL_CALL convertPropertyValue( target &value , ::com::sun::star::un * *****/ inline void SAL_CALL convertPropertyValue( sal_Int64 & target , const ::com::sun::star::uno::Any & source ) - throw (::com::sun::star::lang::IllegalArgumentException); + SAL_THROW( (::com::sun::star::lang::IllegalArgumentException) ); inline void SAL_CALL convertPropertyValue( sal_uInt64 & target, const ::com::sun::star::uno::Any & source ) - throw (::com::sun::star::lang::IllegalArgumentException); + SAL_THROW( (::com::sun::star::lang::IllegalArgumentException) ); inline void SAL_CALL convertPropertyValue( sal_Int32 & target , const ::com::sun::star::uno::Any & source ) - throw (::com::sun::star::lang::IllegalArgumentException); + SAL_THROW( (::com::sun::star::lang::IllegalArgumentException) ); inline void SAL_CALL convertPropertyValue( sal_uInt32 & target, const ::com::sun::star::uno::Any & source ) - throw (::com::sun::star::lang::IllegalArgumentException); + SAL_THROW( (::com::sun::star::lang::IllegalArgumentException) ); inline void SAL_CALL convertPropertyValue( sal_Int16 & target , const ::com::sun::star::uno::Any & source ) - throw( ::com::sun::star::lang::IllegalArgumentException); + SAL_THROW( (::com::sun::star::lang::IllegalArgumentException) ); inline void SAL_CALL convertPropertyValue( sal_uInt16 & target, const ::com::sun::star::uno::Any & source ) - throw( ::com::sun::star::lang::IllegalArgumentException); + SAL_THROW( (::com::sun::star::lang::IllegalArgumentException) ); inline void SAL_CALL convertPropertyValue( sal_Int8 & target , const ::com::sun::star::uno::Any & source ) - throw( ::com::sun::star::lang::IllegalArgumentException); + SAL_THROW( (::com::sun::star::lang::IllegalArgumentException) ); inline void SAL_CALL convertPropertyValue( float & target , const ::com::sun::star::uno::Any & source ) - throw( ::com::sun::star::lang::IllegalArgumentException); + SAL_THROW( (::com::sun::star::lang::IllegalArgumentException) ); inline void SAL_CALL convertPropertyValue( double &target , const ::com::sun::star::uno::Any &source ) - throw( ::com::sun::star::lang::IllegalArgumentException); + SAL_THROW( (::com::sun::star::lang::IllegalArgumentException) ); inline void SAL_CALL convertPropertyValue( ::rtl::OUString &target , const ::com::sun::star::uno::Any &source ) - throw( ::com::sun::star::lang::IllegalArgumentException); + SAL_THROW( (::com::sun::star::lang::IllegalArgumentException) ); } // end namespace cppu diff --git a/cppuhelper/inc/cppuhelper/proptypehlp.hxx b/cppuhelper/inc/cppuhelper/proptypehlp.hxx index cbd6b16b9..7ccc72285 100644 --- a/cppuhelper/inc/cppuhelper/proptypehlp.hxx +++ b/cppuhelper/inc/cppuhelper/proptypehlp.hxx @@ -2,9 +2,9 @@ * * $RCSfile: proptypehlp.hxx,v $ * - * $Revision: 1.1.1.1 $ + * $Revision: 1.2 $ * - * last change: $Author: hr $ $Date: 2000-09-18 15:26:08 $ + * last change: $Author: dbo $ $Date: 2001-03-09 12:15:26 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -68,6 +68,7 @@ namespace cppu template < class target > inline void SAL_CALL convertPropertyValue( target &value , const ::com::sun::star::uno::Any & a) +// SAL_THROW( (::com::sun::star::lang::IllegalArgumentException) ) { // any sense ? // const ::com::sun::star::uno::Type &t = ::getCppuType( &value ); @@ -81,12 +82,14 @@ inline void SAL_CALL convertPropertyValue( target &value , const ::com::sun::st // This template is needed at least for msci4 compiler template < class target > -inline void SAL_CALL convertPropertyValue( target &value , ::com::sun::star::uno::Any & a) +inline void SAL_CALL convertPropertyValue( target &value , ::com::sun::star::uno::Any & a) +// SAL_THROW( (::com::sun::star::lang::IllegalArgumentException) ) { convertPropertyValue( value , (const ::com::sun::star::uno::Any & ) a ); } inline void SAL_CALL convertPropertyValue( sal_Bool & b , const ::com::sun::star::uno::Any & a ) + SAL_THROW( (::com::sun::star::lang::IllegalArgumentException) ) { const enum ::com::sun::star::uno::TypeClass tc = a.getValueType().getTypeClass(); @@ -128,7 +131,7 @@ inline void SAL_CALL convertPropertyValue( sal_Bool & b , const ::com::sun::st } inline void SAL_CALL convertPropertyValue( sal_Int64 & i , const ::com::sun::star::uno::Any & a ) - throw (::com::sun::star::lang::IllegalArgumentException) + SAL_THROW( (::com::sun::star::lang::IllegalArgumentException) ) { const enum ::com::sun::star::uno::TypeClass tc = a.getValueType().getTypeClass(); @@ -182,7 +185,7 @@ inline void SAL_CALL convertPropertyValue( sal_Int64 & i , const ::com::sun::st inline void SAL_CALL convertPropertyValue( sal_uInt64 & i , const ::com::sun::star::uno::Any & a ) - throw (::com::sun::star::lang::IllegalArgumentException) + SAL_THROW( (::com::sun::star::lang::IllegalArgumentException) ) { const enum ::com::sun::star::uno::TypeClass tc = a.getValueType().getTypeClass(); @@ -237,7 +240,7 @@ inline void SAL_CALL convertPropertyValue( sal_uInt64 & i , const ::com::sun::s // the basic types // sal_Int32 inline void SAL_CALL convertPropertyValue( sal_Int32 & i , const ::com::sun::star::uno::Any & a ) - throw (::com::sun::star::lang::IllegalArgumentException) + SAL_THROW( (::com::sun::star::lang::IllegalArgumentException) ) { const enum ::com::sun::star::uno::TypeClass tc = a.getValueType().getTypeClass(); @@ -280,7 +283,7 @@ inline void SAL_CALL convertPropertyValue( sal_Int32 & i , const ::com::sun::st } inline void SAL_CALL convertPropertyValue( sal_uInt32 & i , const ::com::sun::star::uno::Any & a ) - throw (::com::sun::star::lang::IllegalArgumentException) + SAL_THROW( (::com::sun::star::lang::IllegalArgumentException) ) { const enum ::com::sun::star::uno::TypeClass tc = a.getValueType().getTypeClass(); @@ -324,7 +327,7 @@ inline void SAL_CALL convertPropertyValue( sal_uInt32 & i , const ::com::sun::s inline void SAL_CALL convertPropertyValue( sal_Int16 & i , const ::com::sun::star::uno::Any & a ) - throw( ::com::sun::star::lang::IllegalArgumentException) + SAL_THROW( (::com::sun::star::lang::IllegalArgumentException) ) { const enum ::com::sun::star::uno::TypeClass tc = a.getValueType().getTypeClass(); @@ -357,7 +360,7 @@ inline void SAL_CALL convertPropertyValue( sal_Int16 & i , const ::com::sun::st } inline void SAL_CALL convertPropertyValue( sal_uInt16 & i , const ::com::sun::star::uno::Any & a ) - throw( ::com::sun::star::lang::IllegalArgumentException) + SAL_THROW( (::com::sun::star::lang::IllegalArgumentException) ) { const enum ::com::sun::star::uno::TypeClass tc = a.getValueType().getTypeClass(); @@ -390,7 +393,7 @@ inline void SAL_CALL convertPropertyValue( sal_uInt16 & i , const ::com::sun::s } inline void SAL_CALL convertPropertyValue( sal_Int8 & i , const ::com::sun::star::uno::Any & a ) - throw (::com::sun::star::lang::IllegalArgumentException) + SAL_THROW( (::com::sun::star::lang::IllegalArgumentException) ) { const enum ::com::sun::star::uno::TypeClass tc = a.getValueType().getTypeClass(); @@ -408,7 +411,7 @@ inline void SAL_CALL convertPropertyValue( sal_Int8 & i , const ::com::sun::sta } inline void SAL_CALL convertPropertyValue( float &f , const ::com::sun::star::uno::Any &a ) - throw (::com::sun::star::lang::IllegalArgumentException) + SAL_THROW( (::com::sun::star::lang::IllegalArgumentException) ) { const enum ::com::sun::star::uno::TypeClass tc = a.getValueType().getTypeClass(); @@ -473,7 +476,7 @@ inline void SAL_CALL convertPropertyValue( float &f , const ::com::sun::star::un inline void SAL_CALL convertPropertyValue( double &d , const ::com::sun::star::uno::Any &a ) - throw (::com::sun::star::lang::IllegalArgumentException) + SAL_THROW( (::com::sun::star::lang::IllegalArgumentException) ) { const enum ::com::sun::star::uno::TypeClass tc = a.getValueType().getTypeClass(); @@ -539,7 +542,7 @@ inline void SAL_CALL convertPropertyValue( double &d , const ::com::sun::star::u } inline void SAL_CALL convertPropertyValue( ::rtl::OUString &ow , const ::com::sun::star::uno::Any &a ) - throw (::com::sun::star::lang::IllegalArgumentException) + SAL_THROW( (::com::sun::star::lang::IllegalArgumentException) ) { if( ::com::sun::star::uno::TypeClass_STRING == a.getValueType().getTypeClass() ) { a >>= ow; diff --git a/cppuhelper/inc/cppuhelper/queryinterface.hxx b/cppuhelper/inc/cppuhelper/queryinterface.hxx index 7bfde875c..a21a63f63 100644 --- a/cppuhelper/inc/cppuhelper/queryinterface.hxx +++ b/cppuhelper/inc/cppuhelper/queryinterface.hxx @@ -2,9 +2,9 @@ * * $RCSfile: queryinterface.hxx,v $ * - * $Revision: 1.1.1.1 $ + * $Revision: 1.2 $ * - * last change: $Author: hr $ $Date: 2000-09-18 15:26:09 $ + * last change: $Author: dbo $ $Date: 2001-03-09 12:15:26 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -82,6 +82,7 @@ template< class Interface1 > inline ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type & rType, Interface1 * p1 ) + SAL_THROW( () ) { if (rType == ::getCppuType( (::com::sun::star::uno::Reference< Interface1 > *)0 )) return ::com::sun::star::uno::Any( &p1, rType ); @@ -99,6 +100,7 @@ template< class Interface1, class Interface2 > inline ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type & rType, Interface1 * p1, Interface2 * p2 ) + SAL_THROW( () ) { if (rType == ::getCppuType( (::com::sun::star::uno::Reference< Interface1 > *)0 )) return ::com::sun::star::uno::Any( &p1, rType ); @@ -119,6 +121,7 @@ template< class Interface1, class Interface2, class Interface3 > inline ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type & rType, Interface1 * p1, Interface2 * p2, Interface3 * p3 ) + SAL_THROW( () ) { if (rType == ::getCppuType( (::com::sun::star::uno::Reference< Interface1 > *)0 )) return ::com::sun::star::uno::Any( &p1, rType ); @@ -142,6 +145,7 @@ template< class Interface1, class Interface2, class Interface3, class Interface4 inline ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type & rType, Interface1 * p1, Interface2 * p2, Interface3 * p3, Interface4 * p4 ) + SAL_THROW( () ) { if (rType == ::getCppuType( (::com::sun::star::uno::Reference< Interface1 > *)0 )) return ::com::sun::star::uno::Any( &p1, rType ); @@ -168,6 +172,7 @@ template< class Interface1, class Interface2, class Interface3, class Interface4 inline ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type & rType, Interface1 * p1, Interface2 * p2, Interface3 * p3, Interface4 * p4, Interface5 * p5 ) + SAL_THROW( () ) { if (rType == ::getCppuType( (::com::sun::star::uno::Reference< Interface1 > *)0 )) return ::com::sun::star::uno::Any( &p1, rType ); @@ -199,6 +204,7 @@ inline ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type & rType, Interface1 * p1, Interface2 * p2, Interface3 * p3, Interface4 * p4, Interface5 * p5, Interface6 * p6 ) + SAL_THROW( () ) { if (rType == ::getCppuType( (::com::sun::star::uno::Reference< Interface1 > *)0 )) return ::com::sun::star::uno::Any( &p1, rType ); @@ -233,6 +239,7 @@ inline ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type & rType, Interface1 * p1, Interface2 * p2, Interface3 * p3, Interface4 * p4, Interface5 * p5, Interface6 * p6, Interface7 * p7 ) + SAL_THROW( () ) { if (rType == ::getCppuType( (::com::sun::star::uno::Reference< Interface1 > *)0 )) return ::com::sun::star::uno::Any( &p1, rType ); @@ -270,6 +277,7 @@ inline ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type & rType, Interface1 * p1, Interface2 * p2, Interface3 * p3, Interface4 * p4, Interface5 * p5, Interface6 * p6, Interface7 * p7, Interface8 * p8 ) + SAL_THROW( () ) { if (rType == ::getCppuType( (::com::sun::star::uno::Reference< Interface1 > *)0 )) return ::com::sun::star::uno::Any( &p1, rType ); @@ -310,6 +318,7 @@ inline ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type & rType, Interface1 * p1, Interface2 * p2, Interface3 * p3, Interface4 * p4, Interface5 * p5, Interface6 * p6, Interface7 * p7, Interface8 * p8, Interface9 * p9 ) + SAL_THROW( () ) { if (rType == ::getCppuType( (::com::sun::star::uno::Reference< Interface1 > *)0 )) return ::com::sun::star::uno::Any( &p1, rType ); @@ -353,6 +362,7 @@ inline ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type & rType, Interface1 * p1, Interface2 * p2, Interface3 * p3, Interface4 * p4, Interface5 * p5, Interface6 * p6, Interface7 * p7, Interface8 * p8, Interface9 * p9, Interface10 * p10 ) + SAL_THROW( () ) { if (rType == ::getCppuType( (::com::sun::star::uno::Reference< Interface1 > *)0 )) return ::com::sun::star::uno::Any( &p1, rType ); @@ -401,6 +411,7 @@ inline ::com::sun::star::uno::Any SAL_CALL queryInterface( Interface1 * p1, Interface2 * p2, Interface3 * p3, Interface4 * p4, Interface5 * p5, Interface6 * p6, Interface7 * p7, Interface8 * p8, Interface9 * p9, Interface10 * p10, Interface11 * p11 ) + SAL_THROW( () ) { if (rType == ::getCppuType( (::com::sun::star::uno::Reference< Interface1 > *)0 )) return ::com::sun::star::uno::Any( &p1, rType ); @@ -452,6 +463,7 @@ inline ::com::sun::star::uno::Any SAL_CALL queryInterface( Interface1 * p1, Interface2 * p2, Interface3 * p3, Interface4 * p4, Interface5 * p5, Interface6 * p6, Interface7 * p7, Interface8 * p8, Interface9 * p9, Interface10 * p10, Interface11 * p11, Interface12 * p12 ) + SAL_THROW( () ) { if (rType == ::getCppuType( (::com::sun::star::uno::Reference< Interface1 > *)0 )) return ::com::sun::star::uno::Any( &p1, rType ); diff --git a/cppuhelper/inc/cppuhelper/servicefactory.hxx b/cppuhelper/inc/cppuhelper/servicefactory.hxx index 4211a849d..374d39cf5 100644 --- a/cppuhelper/inc/cppuhelper/servicefactory.hxx +++ b/cppuhelper/inc/cppuhelper/servicefactory.hxx @@ -2,9 +2,9 @@ * * $RCSfile: servicefactory.hxx,v $ * - * $Revision: 1.2 $ + * $Revision: 1.3 $ * - * last change: $Author: dbo $ $Date: 2000-12-21 13:21:08 $ + * last change: $Author: dbo $ $Date: 2001-03-09 12:15:26 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -100,11 +100,12 @@ namespace cppu * path. */ ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > SAL_CALL - createRegistryServiceFactory( const ::rtl::OUString & rWriteRegistryFile, - const ::rtl::OUString & rReadRegistryFile, - sal_Bool bReadOnly = sal_False, - const ::rtl::OUString & rBootstrapPath = ::rtl::OUString() ) - throw( ::com::sun::star::uno::Exception ); +createRegistryServiceFactory( + const ::rtl::OUString & rWriteRegistryFile, + const ::rtl::OUString & rReadRegistryFile, + sal_Bool bReadOnly = sal_False, + const ::rtl::OUString & rBootstrapPath = ::rtl::OUString() ) + SAL_THROW( (::com::sun::star::uno::Exception) ); /** @@ -117,10 +118,11 @@ namespace cppu * will not be created if not exist. */ inline ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > SAL_CALL - createRegistryServiceFactory( const ::rtl::OUString & rRegistryFile, - sal_Bool bReadOnly = sal_False, - const ::rtl::OUString & rBootstrapPath = ::rtl::OUString() ) - throw( ::com::sun::star::uno::Exception ) +createRegistryServiceFactory( + const ::rtl::OUString & rRegistryFile, + sal_Bool bReadOnly = sal_False, + const ::rtl::OUString & rBootstrapPath = ::rtl::OUString() ) + SAL_THROW( (::com::sun::star::uno::Exception) ) { return ::cppu::createRegistryServiceFactory( rRegistryFile, ::rtl::OUString(), bReadOnly, rBootstrapPath ); } @@ -130,8 +132,9 @@ inline ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFa * This bootstraps a service factory without initialize a registry. */ inline ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > SAL_CALL - createServiceFactory(const ::rtl::OUString & rBootstrapPath = ::rtl::OUString()) - throw( ::com::sun::star::uno::Exception ) +createServiceFactory( + const ::rtl::OUString & rBootstrapPath = ::rtl::OUString() ) + SAL_THROW( (::com::sun::star::uno::Exception) ) { return ::cppu::createRegistryServiceFactory( ::rtl::OUString(), ::rtl::OUString(), sal_False, rBootstrapPath ); } diff --git a/cppuhelper/inc/cppuhelper/shlib.hxx b/cppuhelper/inc/cppuhelper/shlib.hxx index ff2d53299..610ae4634 100644 --- a/cppuhelper/inc/cppuhelper/shlib.hxx +++ b/cppuhelper/inc/cppuhelper/shlib.hxx @@ -2,9 +2,9 @@ * * $RCSfile: shlib.hxx,v $ * - * $Revision: 1.1 $ + * $Revision: 1.2 $ * - * last change: $Author: dbo $ $Date: 2000-12-19 14:59:20 $ + * last change: $Author: dbo $ $Date: 2001-03-09 12:15:26 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -97,7 +97,7 @@ SAL_CALL loadSharedLibComponentFactory( ::rtl::OUString const & rImplName, ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > const & xMgr, ::com::sun::star::uno::Reference< ::com::sun::star::registry::XRegistryKey > const & xKey ) - throw (::com::sun::star::loader::CannotActivateFactoryException); + SAL_THROW( (::com::sun::star::loader::CannotActivateFactoryException) ); /** Invokes component_writeInfo() function of specified component library. You can give either a fully qualified libname or single lib name. @@ -122,7 +122,7 @@ SAL_CALL writeSharedLibComponentInfo( ::rtl::OUString const & rLibName, ::rtl::OUString const & rPath, ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > const & xMgr, ::com::sun::star::uno::Reference< ::com::sun::star::registry::XRegistryKey > const & xKey ) - throw (::com::sun::star::registry::CannotRegisterImplementationException); + SAL_THROW( (::com::sun::star::registry::CannotRegisterImplementationException) ); } // end namespace cppu diff --git a/cppuhelper/inc/cppuhelper/stdidlclass.hxx b/cppuhelper/inc/cppuhelper/stdidlclass.hxx index 883b993a9..ea96bc2a6 100644 --- a/cppuhelper/inc/cppuhelper/stdidlclass.hxx +++ b/cppuhelper/inc/cppuhelper/stdidlclass.hxx @@ -2,9 +2,9 @@ * * $RCSfile: stdidlclass.hxx,v $ * - * $Revision: 1.1.1.1 $ + * $Revision: 1.2 $ * - * last change: $Author: hr $ $Date: 2000-09-18 15:26:09 $ + * last change: $Author: dbo $ $Date: 2001-03-09 12:15:26 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -80,7 +80,8 @@ namespace cppu { const ::com::sun::star::uno::Reference < ::com::sun::star::lang::XMultiServiceFactory > &rSMgr , const ::rtl::OUString & sImplementationName , const ::com::sun::star::uno::Reference < ::com::sun::star::reflection::XIdlClass > & rSuperClass, - const ::com::sun::star::uno::Sequence < ::rtl::OUString > &seq ); + const ::com::sun::star::uno::Sequence < ::rtl::OUString > &seq ) + SAL_THROW( () ); @@ -130,6 +131,7 @@ createStandardClass( const ::com::sun::star::uno::Reference < ::com::sun::star:: const ::com::sun::star::uno::Reference < ::com::sun::star::reflection::XIdlClass > &rSuperClass , const Interface1 *p1 ) + SAL_THROW( () ) { ::com::sun::star::uno::Sequence < ::rtl::OUString > seqInterface(1); seqInterface.getArray()[0] = @@ -154,6 +156,7 @@ createStandardClass( const ::com::sun::star::uno::Reference < ::com::sun::star:: const Interface1 *p1 , const Interface2 *p2 ) + SAL_THROW( () ) { ::com::sun::star::uno::Sequence < ::rtl::OUString > seqInterface(2); seqInterface.getArray()[0] = @@ -184,6 +187,7 @@ createStandardClass( const ::com::sun::star::uno::Reference < ::com::sun::star:: const Interface2 *p2 , const Interface3 *p3 ) + SAL_THROW( () ) { ::com::sun::star::uno::Sequence < ::rtl::OUString > seqInterface(3); seqInterface.getArray()[0] = @@ -218,6 +222,7 @@ createStandardClass( const ::com::sun::star::uno::Reference < ::com::sun::star:: const Interface3 *p3 , const Interface4 *p4 ) + SAL_THROW( () ) { ::com::sun::star::uno::Sequence < ::rtl::OUString > seqInterface(4); seqInterface.getArray()[0] = @@ -258,6 +263,7 @@ createStandardClass( const ::com::sun::star::uno::Reference < ::com::sun::star:: const Interface4 *p4 , const Interface5 *p5 ) + SAL_THROW( () ) { ::com::sun::star::uno::Sequence < ::rtl::OUString > seqInterface(5); seqInterface.getArray()[0] = @@ -300,6 +306,7 @@ createStandardClass( const ::com::sun::star::uno::Reference < ::com::sun::star:: const Interface5 *p5 , const Interface6 *p6 ) + SAL_THROW( () ) { ::com::sun::star::uno::Sequence < ::rtl::OUString > seqInterface(6); seqInterface.getArray()[0] = @@ -347,6 +354,7 @@ createStandardClass( const ::com::sun::star::uno::Reference < ::com::sun::star:: const Interface6 *p6 , const Interface7 *p7 ) + SAL_THROW( () ) { ::com::sun::star::uno::Sequence < ::rtl::OUString > seqInterface(7); seqInterface.getArray()[0] = @@ -399,6 +407,7 @@ createStandardClass( const ::com::sun::star::uno::Reference < ::com::sun::star:: const Interface7 *p7 , const Interface8 *p8 ) + SAL_THROW( () ) { ::com::sun::star::uno::Sequence < ::rtl::OUString > seqInterface(8); seqInterface.getArray()[0] = @@ -453,6 +462,7 @@ createStandardClass( const ::com::sun::star::uno::Reference < ::com::sun::star:: const Interface8 *p8 , const Interface9 *p9 ) + SAL_THROW( () ) { ::com::sun::star::uno::Sequence < ::rtl::OUString > seqInterface(9); seqInterface.getArray()[0] = @@ -509,6 +519,7 @@ createStandardClass( const ::com::sun::star::uno::Reference < ::com::sun::star:: const Interface9 *p9 , const Interface10 *p10 ) + SAL_THROW( () ) { ::com::sun::star::uno::Sequence < ::rtl::OUString > seqInterface(10); seqInterface.getArray()[0] = diff --git a/cppuhelper/inc/cppuhelper/typeprovider.hxx b/cppuhelper/inc/cppuhelper/typeprovider.hxx index c6d066700..3b14585c5 100644 --- a/cppuhelper/inc/cppuhelper/typeprovider.hxx +++ b/cppuhelper/inc/cppuhelper/typeprovider.hxx @@ -2,9 +2,9 @@ * * $RCSfile: typeprovider.hxx,v $ * - * $Revision: 1.1.1.1 $ + * $Revision: 1.2 $ * - * last change: $Author: hr $ $Date: 2000-09-18 15:26:09 $ + * last change: $Author: dbo $ $Date: 2001-03-09 12:15:26 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -82,35 +82,51 @@ class OTypeCollection ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > _aTypes; public: + // these are here to force memory de/allocation to sal lib. + inline static void * SAL_CALL operator new( size_t nSize ) SAL_THROW( () ) + { return ::rtl_allocateMemory( nSize ); } + inline static void SAL_CALL operator delete( void * pMem ) SAL_THROW( () ) + { ::rtl_freeMemory( pMem ); } + inline static void * SAL_CALL operator new( size_t, void * pMem ) SAL_THROW( () ) + { return pMem; } + inline static void SAL_CALL operator delete( void *, void * ) SAL_THROW( () ) + {} + OTypeCollection( const OTypeCollection & rCollection ) + SAL_THROW( () ) : _aTypes( rCollection._aTypes ) {} OTypeCollection( const ::com::sun::star::uno::Type & rType1, - const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > & rAddTypes = ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type >() ); + const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > & rAddTypes = ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type >() ) + SAL_THROW( () ); OTypeCollection( const ::com::sun::star::uno::Type & rType1, const ::com::sun::star::uno::Type & rType2, - const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > & rAddTypes = ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type >() ); + const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > & rAddTypes = ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type >() ) + SAL_THROW( () ); OTypeCollection( const ::com::sun::star::uno::Type & rType1, const ::com::sun::star::uno::Type & rType2, const ::com::sun::star::uno::Type & rType3, - const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > & rAddTypes = ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type >() ); + const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > & rAddTypes = ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type >() ) + SAL_THROW( () ); OTypeCollection( const ::com::sun::star::uno::Type & rType1, const ::com::sun::star::uno::Type & rType2, const ::com::sun::star::uno::Type & rType3, const ::com::sun::star::uno::Type & rType4, - const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > & rAddTypes = ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type >() ); + const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > & rAddTypes = ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type >() ) + SAL_THROW( () ); OTypeCollection( const ::com::sun::star::uno::Type & rType1, const ::com::sun::star::uno::Type & rType2, const ::com::sun::star::uno::Type & rType3, const ::com::sun::star::uno::Type & rType4, const ::com::sun::star::uno::Type & rType5, - const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > & rAddTypes = ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type >() ); + const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > & rAddTypes = ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type >() ) + SAL_THROW( () ); OTypeCollection( const ::com::sun::star::uno::Type & rType1, const ::com::sun::star::uno::Type & rType2, @@ -118,7 +134,8 @@ public: const ::com::sun::star::uno::Type & rType4, const ::com::sun::star::uno::Type & rType5, const ::com::sun::star::uno::Type & rType6, - const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > & rAddTypes = ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type >() ); + const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > & rAddTypes = ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type >() ) + SAL_THROW( () ); OTypeCollection( const ::com::sun::star::uno::Type & rType1, const ::com::sun::star::uno::Type & rType2, @@ -127,7 +144,8 @@ public: const ::com::sun::star::uno::Type & rType5, const ::com::sun::star::uno::Type & rType6, const ::com::sun::star::uno::Type & rType7, - const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > & rAddTypes = ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type >() ); + const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > & rAddTypes = ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type >() ) + SAL_THROW( () ); OTypeCollection( const ::com::sun::star::uno::Type & rType1, const ::com::sun::star::uno::Type & rType2, @@ -137,7 +155,8 @@ public: const ::com::sun::star::uno::Type & rType6, const ::com::sun::star::uno::Type & rType7, const ::com::sun::star::uno::Type & rType8, - const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > & rAddTypes = ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type >() ); + const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > & rAddTypes = ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type >() ) + SAL_THROW( () ); OTypeCollection( const ::com::sun::star::uno::Type & rType1, const ::com::sun::star::uno::Type & rType2, @@ -148,7 +167,8 @@ public: const ::com::sun::star::uno::Type & rType7, const ::com::sun::star::uno::Type & rType8, const ::com::sun::star::uno::Type & rType9, - const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > & rAddTypes = ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type >() ); + const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > & rAddTypes = ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type >() ) + SAL_THROW( () ); OTypeCollection( const ::com::sun::star::uno::Type & rType1, const ::com::sun::star::uno::Type & rType2, @@ -160,7 +180,8 @@ public: const ::com::sun::star::uno::Type & rType8, const ::com::sun::star::uno::Type & rType9, const ::com::sun::star::uno::Type & rType10, - const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > & rAddTypes = ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type >() ); + const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > & rAddTypes = ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type >() ) + SAL_THROW( () ); OTypeCollection( const ::com::sun::star::uno::Type & rType1, const ::com::sun::star::uno::Type & rType2, @@ -173,7 +194,8 @@ public: const ::com::sun::star::uno::Type & rType9, const ::com::sun::star::uno::Type & rType10, const ::com::sun::star::uno::Type & rType11, - const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > & rAddTypes = ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type >() ); + const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > & rAddTypes = ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type >() ) + SAL_THROW( () ); OTypeCollection( const ::com::sun::star::uno::Type & rType1, const ::com::sun::star::uno::Type & rType2, @@ -187,9 +209,10 @@ public: const ::com::sun::star::uno::Type & rType10, const ::com::sun::star::uno::Type & rType11, const ::com::sun::star::uno::Type & rType12, - const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > & rAddTypes = ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type >() ); + const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > & rAddTypes = ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type >() ) + SAL_THROW( () ); - ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes() + ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes() SAL_THROW( () ) { return _aTypes; } }; @@ -201,24 +224,28 @@ class OImplementationId public: // these are here to force memory de/allocation to sal lib. - 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 ); } - 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 ) SAL_THROW( () ) + { return pMem; } + inline static void SAL_CALL operator delete( void *, void * ) SAL_THROW( () ) + {} - ~OImplementationId(); - OImplementationId( sal_Bool bUseEthernetAddress = sal_True ) + ~OImplementationId() SAL_THROW( () ); + OImplementationId( sal_Bool bUseEthernetAddress = sal_True ) SAL_THROW( () ) : _pSeq( 0 ) , _bUseEthernetAddress( bUseEthernetAddress ) {} - OImplementationId( const ::com::sun::star::uno::Sequence< sal_Int8 > & rSeq ) + OImplementationId( const ::com::sun::star::uno::Sequence< sal_Int8 > & rSeq ) SAL_THROW( () ) : _pSeq( new ::com::sun::star::uno::Sequence< sal_Int8 >( rSeq ) ) {} - OImplementationId( const OImplementationId & rId ) + OImplementationId( const OImplementationId & rId ) SAL_THROW( () ) : _pSeq( new ::com::sun::star::uno::Sequence< sal_Int8 >( rId.getImplementationId() ) ) {} - ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() const; + ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() const SAL_THROW( () ); }; } diff --git a/cppuhelper/inc/cppuhelper/weak.hxx b/cppuhelper/inc/cppuhelper/weak.hxx index fb75c4994..9c4c307ad 100644 --- a/cppuhelper/inc/cppuhelper/weak.hxx +++ b/cppuhelper/inc/cppuhelper/weak.hxx @@ -2,9 +2,9 @@ * * $RCSfile: weak.hxx,v $ * - * $Revision: 1.2 $ + * $Revision: 1.3 $ * - * last change: $Author: dbo $ $Date: 2001-02-14 10:17:30 $ + * last change: $Author: dbo $ $Date: 2001-03-09 12:15:26 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -99,37 +99,41 @@ protected: /** * Call the destructor is only allowed if the reference count is zero. */ - virtual ~OWeakObject() throw(::com::sun::star::uno::RuntimeException); + virtual ~OWeakObject() SAL_THROW( (::com::sun::star::uno::RuntimeException) ); /** * The reference counter. */ - oslInterlockedCount m_refCount; + oslInterlockedCount m_refCount; /** * The container of all weak reference listeners and the connection point * from the weak reference. Increment the reference count at m_pWeakConnectionPoint * object does not affect the */ - OWeakConnectionPoint * m_pWeakConnectionPoint; + OWeakConnectionPoint * m_pWeakConnectionPoint; public: // these are here to force memory de/allocation to sal lib. - 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 ); } - 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 ) SAL_THROW( () ) + { return pMem; } + inline static void SAL_CALL operator delete( void *, void * ) SAL_THROW( () ) + {} /** * Set the reference count to zero. */ - OWeakObject() throw() + OWeakObject() SAL_THROW( () ) : m_refCount( 0 ) , m_pWeakConnectionPoint( 0 ) {} /** * Set the reference count to zero. */ - OWeakObject( const OWeakObject & rObj ) throw() + OWeakObject( const OWeakObject & rObj ) SAL_THROW( () ) : m_refCount( 0 ) , m_pWeakConnectionPoint( 0 ) {} @@ -137,20 +141,24 @@ public: * The assignement does not affect the reference count and the weak references * of this object. */ - inline OWeakObject & SAL_CALL operator = ( const OWeakObject & rObj) throw() + inline OWeakObject & SAL_CALL operator = ( const OWeakObject & rObj) SAL_THROW( () ) { return *this; } - + // XInterface - virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL acquire() throw(); - virtual void SAL_CALL release() throw(); + virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( + const ::com::sun::star::uno::Type & rType ) + throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL acquire() + throw (); + virtual void SAL_CALL release() + throw (); // XWeak virtual ::com::sun::star::uno::Reference< ::com::sun::star::uno::XAdapter > SAL_CALL queryAdapter() throw (::com::sun::star::uno::RuntimeException); /// Avoid ambigous cast error from compiler. - inline SAL_CALL operator ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > () throw() + inline SAL_CALL operator ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > () SAL_THROW( () ) { return this; } }; diff --git a/cppuhelper/inc/cppuhelper/weakagg.hxx b/cppuhelper/inc/cppuhelper/weakagg.hxx index 68971afc3..c9e579fe6 100644 --- a/cppuhelper/inc/cppuhelper/weakagg.hxx +++ b/cppuhelper/inc/cppuhelper/weakagg.hxx @@ -2,9 +2,9 @@ * * $RCSfile: weakagg.hxx,v $ * - * $Revision: 1.2 $ + * $Revision: 1.3 $ * - * last change: $Author: dbo $ $Date: 2001-02-14 10:17:30 $ + * last change: $Author: dbo $ $Date: 2001-03-09 12:15:26 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -82,15 +82,17 @@ namespace cppu * @author Markus Meyer * @since 98/04/12 */ -class OWeakAggObject : public ::cppu::OWeakObject, public ::com::sun::star::uno::XAggregation +class OWeakAggObject + : public ::cppu::OWeakObject + , public ::com::sun::star::uno::XAggregation { public: /** * Set the delegator to null. */ - OWeakAggObject() + OWeakAggObject() SAL_THROW( () ) {} - + // XInterface /** * Increment the reference count if no delegator is set, otherwise call @@ -132,7 +134,7 @@ protected: * Call the destructor is only allowed if the reference count is zero. */ virtual ~OWeakAggObject() - throw (::com::sun::star::uno::RuntimeException); + SAL_THROW( (::com::sun::star::uno::RuntimeException) ); /** * The delegator set with setDelegator. @@ -140,9 +142,9 @@ protected: */ ::com::sun::star::uno::WeakReferenceHelper xDelegator; private: - OWeakAggObject( const OWeakObject & rObj ); + OWeakAggObject( const OWeakObject & rObj ) SAL_THROW( () ); - OWeakObject & operator = ( const OWeakObject & rObj ); + OWeakObject & operator = ( const OWeakObject & rObj ) SAL_THROW( () ); }; } diff --git a/cppuhelper/inc/cppuhelper/weakref.hxx b/cppuhelper/inc/cppuhelper/weakref.hxx index 762942e89..dc14dc670 100644 --- a/cppuhelper/inc/cppuhelper/weakref.hxx +++ b/cppuhelper/inc/cppuhelper/weakref.hxx @@ -2,9 +2,9 @@ * * $RCSfile: weakref.hxx,v $ * - * $Revision: 1.1.1.1 $ + * $Revision: 1.2 $ * - * last change: $Author: hr $ $Date: 2000-09-18 15:26:09 $ + * last change: $Author: dbo $ $Date: 2001-03-09 12:15:26 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -96,38 +96,39 @@ class WeakReferenceHelper { public: /** Create an empty weak reference. */ - WeakReferenceHelper() + WeakReferenceHelper() SAL_THROW( () ) : m_pImpl( 0 ) {} /** Initialize this reference with the same interface as in rWeakRef.*/ - WeakReferenceHelper( const WeakReferenceHelper & rWeakRef ); + WeakReferenceHelper( const WeakReferenceHelper & rWeakRef ) SAL_THROW( () ); /** * Initialize this reference with the interface xInt. If the implementation behind * xInt does not support XWeak or XInt is empty then this reference is empty too. */ - WeakReferenceHelper( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > & xInt ); + WeakReferenceHelper( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > & xInt ) + SAL_THROW( () ); /** * Release the reference. */ - ~WeakReferenceHelper(); + ~WeakReferenceHelper() SAL_THROW( () ); /** * Release the reference and take the from rWeakRef. */ - WeakReferenceHelper & SAL_CALL operator = ( const WeakReferenceHelper & rWeakRef ); + WeakReferenceHelper & SAL_CALL operator = ( const WeakReferenceHelper & rWeakRef ) SAL_THROW( () ); /** * Release the reference and take the from xInt. If the implementation behind * xInt does not support XWeak or XInt is empty, than this reference is empty too. */ - WeakReferenceHelper & SAL_CALL operator = ( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > & xInt ) + WeakReferenceHelper & SAL_CALL operator = ( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > & xInt ) SAL_THROW( () ) { return operator = ( WeakReferenceHelper( xInt ) ); } /** * Return true if both OWeakRefs refer to the same object. */ - sal_Bool SAL_CALL operator == ( const WeakReferenceHelper & rObj ) const + sal_Bool SAL_CALL operator == ( const WeakReferenceHelper & rObj ) const SAL_THROW( () ) { return (get() == rObj.get()); } /** @@ -135,13 +136,13 @@ public: * @return Null, if the interface was not found, otherwise the * interface. */ - ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL get() const; + ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL get() const SAL_THROW( () ); /** * Return the reference to the interface. It is null, if the referenced object * was destroyed or the weak reference was not set. */ - SAL_CALL operator Reference< XInterface > () const + SAL_CALL operator Reference< XInterface > () const SAL_THROW( () ) { return get(); } protected: @@ -154,21 +155,21 @@ class WeakReference : public WeakReferenceHelper { public: /** Set an empty weak reference. */ - WeakReference() + WeakReference() SAL_THROW( () ) : WeakReferenceHelper() {} /** * Create a new weak reference with the given interface pInterface and acquire this one. */ - WeakReference( const Reference<interface_type > & rRef ) + WeakReference( const Reference<interface_type > & rRef ) SAL_THROW( () ) : WeakReferenceHelper( rRef ) {} /** * Return the reference to the interface. May be null. */ - SAL_CALL operator Reference< interface_type > () const + SAL_CALL operator Reference< interface_type > () const SAL_THROW( () ) { return Reference< interface_type >::query( get() ); } }; diff --git a/cppuhelper/source/component.cxx b/cppuhelper/source/component.cxx index 755b19c4a..eb761e517 100644 --- a/cppuhelper/source/component.cxx +++ b/cppuhelper/source/component.cxx @@ -2,9 +2,9 @@ * * $RCSfile: component.cxx,v $ * - * $Revision: 1.4 $ + * $Revision: 1.5 $ * - * last change: $Author: dbo $ $Date: 2000-12-20 09:35:42 $ + * last change: $Author: dbo $ $Date: 2001-03-09 12:15:28 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -80,7 +80,7 @@ namespace cppu // ---------------------------------------------------- // class OComponentHelper // ---------------------------------------------------- -OComponentHelper::OComponentHelper( Mutex & rMutex ) +OComponentHelper::OComponentHelper( Mutex & rMutex ) SAL_THROW( () ) : rBHelper( rMutex ) { } @@ -88,7 +88,7 @@ OComponentHelper::OComponentHelper( Mutex & rMutex ) /** * Call dispose if not previous called. */ -OComponentHelper::~OComponentHelper() +OComponentHelper::~OComponentHelper() SAL_THROW( (RuntimeException) ) { } @@ -191,7 +191,8 @@ void OComponentHelper::dispose() } // XComponent -void OComponentHelper::addEventListener(const Reference<XEventListener > & rxListener) +void OComponentHelper::addEventListener( + const Reference<XEventListener > & rxListener ) throw(::com::sun::star::uno::RuntimeException) { if (rBHelper.bDisposed || rBHelper.bInDispose) @@ -205,7 +206,8 @@ void OComponentHelper::addEventListener(const Reference<XEventListener > & rxLis } // XComponent -void OComponentHelper::removeEventListener(const Reference<XEventListener > & rxListener) +void OComponentHelper::removeEventListener( + const Reference<XEventListener > & rxListener ) throw(::com::sun::star::uno::RuntimeException) { rBHelper.removeListener( ::getCppuType( &rxListener ) , rxListener ); diff --git a/cppuhelper/source/exc_thrower.cxx b/cppuhelper/source/exc_thrower.cxx index cae575596..6cc5fefab 100644 --- a/cppuhelper/source/exc_thrower.cxx +++ b/cppuhelper/source/exc_thrower.cxx @@ -2,9 +2,9 @@ * * $RCSfile: exc_thrower.cxx,v $ * - * $Revision: 1.2 $ + * $Revision: 1.3 $ * - * last change: $Author: hr $ $Date: 2000-10-25 14:44:37 $ + * last change: $Author: dbo $ $Date: 2001-03-09 12:15:28 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -90,11 +90,13 @@ class XThrower : public ::com::sun::star::uno::XInterface public: // Methods - virtual void SAL_CALL throwException( const ::com::sun::star::uno::Any& rExc ) throw(::com::sun::star::uno::Exception) = 0; + virtual void SAL_CALL throwException( const ::com::sun::star::uno::Any& rExc ) + SAL_THROW( (::com::sun::star::uno::Exception) ) = 0; }; static const ::com::sun::star::uno::Type& getCppuType( const ::com::sun::star::uno::Reference< ::cppu::XThrower >* ) + SAL_THROW( () ) { static ::com::sun::star::uno::Type * pType_cppu_XThrower = 0; @@ -164,15 +166,17 @@ struct ExceptionThrower : public uno_Interface { oslInterlockedCount nRef; - inline ExceptionThrower(); + inline ExceptionThrower() SAL_THROW( () ); }; +extern "C" +{ //-------------------------------------------------------------------------------------------------- -void SAL_CALL ExceptionThrower_acquire( uno_Interface * pUnoI ) +static void SAL_CALL ExceptionThrower_acquire( uno_Interface * pUnoI ) SAL_THROW( () ) { osl_incrementInterlockedCount( & SAL_STATIC_CAST( ExceptionThrower *, pUnoI )->nRef ); } //-------------------------------------------------------------------------------------------------- -void SAL_CALL ExceptionThrower_release( uno_Interface * pUnoI ) +static void SAL_CALL ExceptionThrower_release( uno_Interface * pUnoI ) SAL_THROW( () ) { if (! osl_decrementInterlockedCount( & SAL_STATIC_CAST( ExceptionThrower *, pUnoI )->nRef )) delete SAL_STATIC_CAST( ExceptionThrower *, pUnoI ); @@ -181,6 +185,7 @@ void SAL_CALL ExceptionThrower_release( uno_Interface * pUnoI ) static void SAL_CALL ExceptionThrower_dispatch( uno_Interface * pUnoI, const typelib_TypeDescription * pMemberType, void * pReturn, void * pArgs[], uno_Any ** ppException ) + SAL_THROW( () ) { OSL_ASSERT( pMemberType->eTypeClass == typelib_TypeClass_INTERFACE_METHOD ); @@ -231,8 +236,9 @@ static void SAL_CALL ExceptionThrower_dispatch( OSL_ENSHURE( sal_False, "### illegal member called!" ); } } +} // extern "C" //__________________________________________________________________________________________________ -inline ExceptionThrower::ExceptionThrower() +inline ExceptionThrower::ExceptionThrower() SAL_THROW( () ) : nRef( 0 ) { uno_Interface::acquire = ExceptionThrower_acquire; @@ -241,8 +247,7 @@ inline ExceptionThrower::ExceptionThrower() } //================================================================================================== -void SAL_CALL throwException( const Any & rExc ) - throw (Exception) +void SAL_CALL throwException( const Any & rExc ) SAL_THROW( (Exception) ) { if (rExc.getValueTypeClass() == TypeClass_EXCEPTION) { diff --git a/cppuhelper/source/factory.cxx b/cppuhelper/source/factory.cxx index 52098838c..5ff8a4de9 100644 --- a/cppuhelper/source/factory.cxx +++ b/cppuhelper/source/factory.cxx @@ -2,9 +2,9 @@ * * $RCSfile: factory.cxx,v $ * - * $Revision: 1.3 $ + * $Revision: 1.4 $ * - * last change: $Author: lla $ $Date: 2000-12-06 09:36:29 $ + * last change: $Author: dbo $ $Date: 2001-03-09 12:15:28 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -108,10 +108,12 @@ class OSingleFactoryHelper , public XSingleServiceFactory { public: - OSingleFactoryHelper( const Reference<XMultiServiceFactory > & rServiceManager, - const OUString & rImplementationName_, - ComponentInstantiation pCreateFunction_, - const Sequence< OUString > * pServiceNames_ ) + OSingleFactoryHelper( + const Reference<XMultiServiceFactory > & rServiceManager, + const OUString & rImplementationName_, + ComponentInstantiation pCreateFunction_, + const Sequence< OUString > * pServiceNames_ ) + SAL_THROW( () ) : xSMgr( rServiceManager ) , aImplementationName( rImplementationName_ ) , pCreateFunction( pCreateFunction_ ) @@ -121,20 +123,21 @@ public: } // old function, only for backward compatibility - OSingleFactoryHelper( const Reference<XMultiServiceFactory > & rServiceManager, - const OUString & rImplementationName_ ) + OSingleFactoryHelper( + const Reference<XMultiServiceFactory > & rServiceManager, + const OUString & rImplementationName_ ) + SAL_THROW( () ) : xSMgr( rServiceManager ) , aImplementationName( rImplementationName_ ) , pCreateFunction( NULL ) - { - } + {} // XInterface Any SAL_CALL queryInterface( const Type & rType ) throw(::com::sun::star::uno::RuntimeException); // XSingleServiceFactory - Reference<XInterface > SAL_CALL createInstance(void) + Reference<XInterface > SAL_CALL createInstance() throw(::com::sun::star::uno::Exception, ::com::sun::star::uno::RuntimeException); virtual Reference<XInterface > SAL_CALL createInstanceWithArguments(const Sequence<Any>& Arguments) throw(::com::sun::star::uno::Exception, ::com::sun::star::uno::RuntimeException); @@ -249,11 +252,13 @@ class OFactoryComponentHelper , public OSingleFactoryHelper { public: - OFactoryComponentHelper( const Reference<XMultiServiceFactory > & rServiceManager, - const OUString & rImplementationName_, - ComponentInstantiation pCreateFunction_, - const Sequence< OUString > * pServiceNames_, - sal_Bool bOneInstance_ = sal_False ) + OFactoryComponentHelper( + const Reference<XMultiServiceFactory > & rServiceManager, + const OUString & rImplementationName_, + ComponentInstantiation pCreateFunction_, + const Sequence< OUString > * pServiceNames_, + sal_Bool bOneInstance_ = sal_False ) + SAL_THROW( () ) : OComponentHelper( aMutex ) , OSingleFactoryHelper( rServiceManager, rImplementationName_, pCreateFunction_, pServiceNames_ ) , bOneInstance( bOneInstance_ ) @@ -261,9 +266,11 @@ public: } // old function, only for backward compatibility - OFactoryComponentHelper( const Reference<XMultiServiceFactory > & rServiceManager, - const OUString & rImplementationName_, - sal_Bool bOneInstance_ = sal_False ) + OFactoryComponentHelper( + const Reference<XMultiServiceFactory > & rServiceManager, + const OUString & rImplementationName_, + sal_Bool bOneInstance_ = sal_False ) + SAL_THROW( () ) : OComponentHelper( aMutex ) , OSingleFactoryHelper( rServiceManager, rImplementationName_ ) , bOneInstance( bOneInstance_ ) @@ -397,10 +404,12 @@ class ORegistryFactoryHelper : public OFactoryComponentHelper { public: - ORegistryFactoryHelper( const Reference<XMultiServiceFactory > & rServiceManager, - const OUString & rImplementationName_, - const Reference<XRegistryKey > & xImplementationKey_, - sal_Bool bOneInstance_ = sal_False ) + ORegistryFactoryHelper( + const Reference<XMultiServiceFactory > & rServiceManager, + const OUString & rImplementationName_, + const Reference<XRegistryKey > & xImplementationKey_, + sal_Bool bOneInstance_ = sal_False ) + SAL_THROW( () ) : OFactoryComponentHelper( rServiceManager, rImplementationName_, 0, 0, bOneInstance_ ) , xImplementationKey( xImplementationKey_ ) {} @@ -595,8 +604,10 @@ class OFactoryProxyHelper : public WeakImplHelper2< XServiceInfo, XSingleService public: - OFactoryProxyHelper( const Reference<XMultiServiceFactory > & /*rServiceManager*/, - const Reference<XSingleServiceFactory > & rFactory ) + OFactoryProxyHelper( + const Reference<XMultiServiceFactory > & /*rServiceManager*/, + const Reference<XSingleServiceFactory > & rFactory ) + SAL_THROW( () ) : xFactory( rFactory ) {} @@ -666,60 +677,55 @@ Sequence< OUString > OFactoryProxyHelper::getSupportedServiceNames(void) //----------------------------------------------------------------------------- //----------------------------------------------------------------------------- // global function -Reference<XSingleServiceFactory > SAL_CALL createSingleFactory -( +Reference<XSingleServiceFactory > SAL_CALL createSingleFactory( const Reference<XMultiServiceFactory > & rServiceManager, const OUString & rImplementationName, ComponentInstantiation pCreateFunction, - const Sequence< OUString > & rServiceNames -) + const Sequence< OUString > & rServiceNames ) + SAL_THROW( () ) { return new OFactoryComponentHelper( rServiceManager, rImplementationName, pCreateFunction, &rServiceNames, sal_False ); } // global function -Reference<XSingleServiceFactory > SAL_CALL createFactoryProxy -( +Reference<XSingleServiceFactory > SAL_CALL createFactoryProxy( const Reference<XMultiServiceFactory > & rServiceManager, - const Reference<XSingleServiceFactory > & rFactory -) + const Reference<XSingleServiceFactory > & rFactory ) + SAL_THROW( () ) { return new OFactoryProxyHelper( rServiceManager, rFactory ); } // global function -Reference<XSingleServiceFactory > SAL_CALL createOneInstanceFactory -( +Reference<XSingleServiceFactory > SAL_CALL createOneInstanceFactory( const Reference<XMultiServiceFactory > & rServiceManager, const OUString & rImplementationName, ComponentInstantiation pCreateFunction, - const Sequence< OUString > & rServiceNames -) + const Sequence< OUString > & rServiceNames ) + SAL_THROW( () ) { return new OFactoryComponentHelper( rServiceManager, rImplementationName, pCreateFunction, &rServiceNames, sal_True ); } // global function -SAL_DLLEXPORT Reference<XSingleServiceFactory > SAL_CALL createSingleRegistryFactory -( +Reference<XSingleServiceFactory > SAL_CALL createSingleRegistryFactory( const Reference<XMultiServiceFactory > & rServiceManager, const OUString & rImplementationName, - const Reference<XRegistryKey > & rImplementationKey -) + const Reference<XRegistryKey > & rImplementationKey ) + SAL_THROW( () ) { return new ORegistryFactoryHelper( rServiceManager, rImplementationName, rImplementationKey, sal_False ); } // global function -Reference<XSingleServiceFactory > SAL_CALL createOneInstanceRegistryFactory -( +Reference<XSingleServiceFactory > SAL_CALL createOneInstanceRegistryFactory( const Reference<XMultiServiceFactory > & rServiceManager, const OUString & rImplementationName, - const Reference<XRegistryKey > & rImplementationKey -) + const Reference<XRegistryKey > & rImplementationKey ) + SAL_THROW( () ) { return new ORegistryFactoryHelper( rServiceManager, rImplementationName, rImplementationKey, sal_True ); diff --git a/cppuhelper/source/implbase.cxx b/cppuhelper/source/implbase.cxx index aaaab8580..3e5913da8 100644 --- a/cppuhelper/source/implbase.cxx +++ b/cppuhelper/source/implbase.cxx @@ -2,9 +2,9 @@ * * $RCSfile: implbase.cxx,v $ * - * $Revision: 1.2 $ + * $Revision: 1.3 $ * - * last change: $Author: dbo $ $Date: 2000-10-06 15:15:09 $ + * last change: $Author: dbo $ $Date: 2001-03-09 12:15:28 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -80,7 +80,7 @@ using namespace com::sun::star::lang; namespace cppu { //================================================================================================== -Mutex & SAL_CALL getImplHelperInitMutex(void) +Mutex & SAL_CALL getImplHelperInitMutex(void) SAL_THROW( () ) { static Mutex * s_pMutex = 0; if (! s_pMutex) @@ -97,7 +97,7 @@ Mutex & SAL_CALL getImplHelperInitMutex(void) // ClassDataBase //__________________________________________________________________________________________________ -ClassDataBase::ClassDataBase() +ClassDataBase::ClassDataBase() SAL_THROW( () ) : bOffsetsInit( sal_False ) , nType2Offset( 0 ) , nClassCode( 0 ) @@ -106,7 +106,7 @@ ClassDataBase::ClassDataBase() { } //__________________________________________________________________________________________________ -ClassDataBase::ClassDataBase( sal_Int32 nClassCode_ ) +ClassDataBase::ClassDataBase( sal_Int32 nClassCode_ ) SAL_THROW( () ) : bOffsetsInit( sal_False ) , nType2Offset( 0 ) , nClassCode( nClassCode_ ) @@ -115,7 +115,7 @@ ClassDataBase::ClassDataBase( sal_Int32 nClassCode_ ) { } //__________________________________________________________________________________________________ -ClassDataBase::~ClassDataBase() +ClassDataBase::~ClassDataBase() SAL_THROW( () ) { delete pTypes; delete pId; @@ -129,7 +129,7 @@ ClassDataBase::~ClassDataBase() // ClassData //__________________________________________________________________________________________________ -void ClassData::writeTypeOffset( const Type & rType, sal_Int32 nOffset ) +void ClassData::writeTypeOffset( const Type & rType, sal_Int32 nOffset ) SAL_THROW( () ) { arType2Offset[nType2Offset].nOffset = nOffset; @@ -149,7 +149,7 @@ void ClassData::writeTypeOffset( const Type & rType, sal_Int32 nOffset ) #endif } //__________________________________________________________________________________________________ -void ClassData::initTypeProvider() +void ClassData::initTypeProvider() SAL_THROW( () ) { ::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() ); if (! pTypes) @@ -190,14 +190,14 @@ void ClassData::initTypeProvider() } } //__________________________________________________________________________________________________ -Sequence< Type > ClassData::getTypes() +Sequence< Type > ClassData::getTypes() SAL_THROW( () ) { if (! pTypes) initTypeProvider(); return *pTypes; } //__________________________________________________________________________________________________ -Sequence< sal_Int8 > ClassData::getImplementationId() +Sequence< sal_Int8 > ClassData::getImplementationId() SAL_THROW( () ) { if (! pTypes) initTypeProvider(); @@ -205,15 +205,16 @@ Sequence< sal_Int8 > ClassData::getImplementationId() } //-------------------------------------------------------------------------------------------------- -static inline sal_Bool td_equals( typelib_TypeDescription * pTD, - typelib_TypeDescriptionReference * pType ) +static inline sal_Bool td_equals( + typelib_TypeDescription * pTD, typelib_TypeDescriptionReference * pType ) + SAL_THROW( () ) { return (pTD->pWeakRef == pType || (pTD->pTypeName->length == pType->pTypeName->length && rtl_ustr_compare( pTD->pTypeName->buffer, pType->pTypeName->buffer ) == 0)); } //__________________________________________________________________________________________________ -Any ClassData::query( const Type & rType, XTypeProvider * pBase ) +Any ClassData::query( const Type & rType, XTypeProvider * pBase ) SAL_THROW( () ) { if (rType == ::getCppuType( (const Reference< XInterface > *)0 )) return Any( &pBase, ::getCppuType( (const Reference< XInterface > *)0 ) ); diff --git a/cppuhelper/source/interfacecontainer.cxx b/cppuhelper/source/interfacecontainer.cxx index d012d16b3..880e64170 100644 --- a/cppuhelper/source/interfacecontainer.cxx +++ b/cppuhelper/source/interfacecontainer.cxx @@ -2,9 +2,9 @@ * * $RCSfile: interfacecontainer.cxx,v $ * - * $Revision: 1.3 $ + * $Revision: 1.4 $ * - * last change: $Author: jbu $ $Date: 2001-02-05 13:21:38 $ + * last change: $Author: dbo $ $Date: 2001-03-09 12:15:28 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -86,6 +86,7 @@ namespace cppu * Reallocate the sequence. */ static void realloc( Sequence< Reference< XInterface > > & rSeq, sal_Int32 nNewLen ) + SAL_THROW( () ) { Sequence< Reference< XInterface > > aNewSeq( nNewLen ); Reference< XInterface > * pDest = aNewSeq.getArray(); @@ -100,6 +101,7 @@ static void realloc( Sequence< Reference< XInterface > > & rSeq, sal_Int32 nNewL * Remove an element from an interface sequence. */ static void sequenceRemoveElementAt( Sequence< Reference< XInterface > > & rSeq, sal_Int32 index ) + SAL_THROW( () ) { sal_Int32 nNewLen = rSeq.getLength() - 1; @@ -127,6 +129,7 @@ static void sequenceRemoveElementAt( Sequence< Reference< XInterface > > & rSeq, //=================================================================== //=================================================================== OInterfaceIteratorHelper::OInterfaceIteratorHelper( OInterfaceContainerHelper & rCont_ ) + SAL_THROW( () ) : rCont( rCont_ ) { MutexGuard aGuard( rCont.rMutex ); @@ -149,7 +152,7 @@ OInterfaceIteratorHelper::OInterfaceIteratorHelper( OInterfaceContainerHelper & nRemain = 0; } -OInterfaceIteratorHelper::~OInterfaceIteratorHelper() +OInterfaceIteratorHelper::~OInterfaceIteratorHelper() SAL_THROW( () ) { sal_Bool bShared; { @@ -174,7 +177,7 @@ OInterfaceIteratorHelper::~OInterfaceIteratorHelper() } } -XInterface * OInterfaceIteratorHelper::next() +XInterface * OInterfaceIteratorHelper::next() SAL_THROW( () ) { if( nRemain ) { @@ -189,7 +192,7 @@ XInterface * OInterfaceIteratorHelper::next() return 0; } -void OInterfaceIteratorHelper::remove() +void OInterfaceIteratorHelper::remove() SAL_THROW( () ) { if( bIsList ) { @@ -211,7 +214,7 @@ void OInterfaceIteratorHelper::remove() //=================================================================== -OInterfaceContainerHelper::OInterfaceContainerHelper( Mutex & rMutex_ ) +OInterfaceContainerHelper::OInterfaceContainerHelper( Mutex & rMutex_ ) SAL_THROW( () ) : rMutex( rMutex_ ) , bInUse( sal_False ) , bIsList( sal_False ) @@ -219,7 +222,7 @@ OInterfaceContainerHelper::OInterfaceContainerHelper( Mutex & rMutex_ ) { } -OInterfaceContainerHelper::~OInterfaceContainerHelper() +OInterfaceContainerHelper::~OInterfaceContainerHelper() SAL_THROW( () ) { OSL_ENSHURE( !bInUse, "~OInterfaceContainerHelper but is in use" ); if( bIsList ) @@ -228,7 +231,7 @@ OInterfaceContainerHelper::~OInterfaceContainerHelper() ((XInterface*)pData)->release(); } -sal_Int32 OInterfaceContainerHelper::getLength() const +sal_Int32 OInterfaceContainerHelper::getLength() const SAL_THROW( () ) { MutexGuard aGuard( rMutex ); if( bIsList ) @@ -238,7 +241,7 @@ sal_Int32 OInterfaceContainerHelper::getLength() const return 0; } -Sequence< Reference<XInterface> > OInterfaceContainerHelper::getElements() const +Sequence< Reference<XInterface> > OInterfaceContainerHelper::getElements() const SAL_THROW( () ) { MutexGuard aGuard( rMutex ); if( bIsList ) @@ -251,7 +254,7 @@ Sequence< Reference<XInterface> > OInterfaceContainerHelper::getElements() const return Sequence< Reference< XInterface > >(); } -void OInterfaceContainerHelper::copyAndResetInUse() +void OInterfaceContainerHelper::copyAndResetInUse() SAL_THROW( () ) { OSL_ENSHURE( bInUse, "OInterfaceContainerHelper not in use" ); if( bInUse ) @@ -267,7 +270,7 @@ void OInterfaceContainerHelper::copyAndResetInUse() } } -sal_Int32 OInterfaceContainerHelper::addInterface( const Reference<XInterface> & rListener ) +sal_Int32 OInterfaceContainerHelper::addInterface( const Reference<XInterface> & rListener ) SAL_THROW( () ) { assert( rListener.is() ); MutexGuard aGuard( rMutex ); @@ -301,7 +304,7 @@ sal_Int32 OInterfaceContainerHelper::addInterface( const Reference<XInterface> & } } -sal_Int32 OInterfaceContainerHelper::removeInterface( const Reference<XInterface> & rListener ) +sal_Int32 OInterfaceContainerHelper::removeInterface( const Reference<XInterface> & rListener ) SAL_THROW( () ) { assert( rListener.is() ); MutexGuard aGuard( rMutex ); @@ -357,7 +360,7 @@ sal_Int32 OInterfaceContainerHelper::removeInterface( const Reference<XInterface return pData ? 1 : 0; } -void OInterfaceContainerHelper::disposeAndClear( const EventObject & rEvt ) +void OInterfaceContainerHelper::disposeAndClear( const EventObject & rEvt ) SAL_THROW( () ) { ClearableMutexGuard aGuard( rMutex ); OInterfaceIteratorHelper aIt( *this ); @@ -387,7 +390,7 @@ void OInterfaceContainerHelper::disposeAndClear( const EventObject & rEvt ) } -void OInterfaceContainerHelper::clear( ) +void OInterfaceContainerHelper::clear() SAL_THROW( () ) { ClearableMutexGuard aGuard( rMutex ); OInterfaceIteratorHelper aIt( *this ); diff --git a/cppuhelper/source/propshlp.cxx b/cppuhelper/source/propshlp.cxx index 383649d66..fced24f3d 100644 --- a/cppuhelper/source/propshlp.cxx +++ b/cppuhelper/source/propshlp.cxx @@ -2,9 +2,9 @@ * * $RCSfile: propshlp.cxx,v $ * - * $Revision: 1.2 $ + * $Revision: 1.3 $ * - * last change: $Author: jbu $ $Date: 2000-10-06 16:01:45 $ + * last change: $Author: dbo $ $Date: 2001-03-09 12:15:28 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -85,20 +85,20 @@ IPropertyArrayHelper::~IPropertyArrayHelper() { } -inline const ::com::sun::star::uno::Type & getPropertyTypeIdentifier( ) +inline const ::com::sun::star::uno::Type & getPropertyTypeIdentifier( ) SAL_THROW( () ) { return ::getCppuType( (Reference< XPropertyChangeListener > *)0 ); } -inline const ::com::sun::star::uno::Type & getPropertiesTypeIdentifier() +inline const ::com::sun::star::uno::Type & getPropertiesTypeIdentifier() SAL_THROW( () ) { return ::getCppuType( (Reference< XPropertiesChangeListener > *)0 ); } -inline const ::com::sun::star::uno::Type & getVetoableTypeIdentifier() +inline const ::com::sun::star::uno::Type & getVetoableTypeIdentifier() SAL_THROW( () ) { return ::getCppuType( (Reference< XVetoableChangeListener > *)0 ); } -int SAL_CALL compare_OUString_Property_Impl( const void *arg1, const void *arg2 ) +int SAL_CALL compare_OUString_Property_Impl( const void *arg1, const void *arg2 ) SAL_THROW( () ) { return ((OUString *)arg1)->compareTo( ((Property *)arg2)->Name ); } @@ -112,7 +112,7 @@ class OPropertySetHelperInfo_Impl Sequence < Property > aInfos; public: - OPropertySetHelperInfo_Impl( IPropertyArrayHelper & rHelper_ ); + OPropertySetHelperInfo_Impl( IPropertyArrayHelper & rHelper_ ) SAL_THROW( () ); // XPropertySetInfo-Methoden virtual Sequence< Property > SAL_CALL getProperties(void); @@ -124,8 +124,10 @@ public: /** * Create an object that implements XPropertySetInfo IPropertyArrayHelper. */ -OPropertySetHelperInfo_Impl::OPropertySetHelperInfo_Impl( IPropertyArrayHelper & rHelper_ ) - :aInfos( rHelper_.getProperties() ) +OPropertySetHelperInfo_Impl::OPropertySetHelperInfo_Impl( + IPropertyArrayHelper & rHelper_ ) + SAL_THROW( () ) + :aInfos( rHelper_.getProperties() ) { } @@ -169,7 +171,8 @@ sal_Bool OPropertySetHelperInfo_Impl::hasPropertyByName( const OUString & Proper // class PropertySetHelper // ---------------------------------------------------- OPropertySetHelper::OPropertySetHelper( - OBroadcastHelper & rBHelper_ ) + OBroadcastHelper & rBHelper_ ) + SAL_THROW( () ) : rBHelper( rBHelper_ ) , aBoundLC( rBHelper_.rMutex ) , aVetoableLC( rBHelper_.rMutex ) @@ -179,7 +182,7 @@ OPropertySetHelper::OPropertySetHelper( /** * You must call disposing before. */ -OPropertySetHelper::~OPropertySetHelper() +OPropertySetHelper::~OPropertySetHelper() SAL_THROW( () ) { } @@ -190,14 +193,15 @@ OPropertySetHelper::~OPropertySetHelper() // XAggregation Any OPropertySetHelper::queryInterface( const ::com::sun::star::uno::Type & rType ) { - return ::cppu::queryInterface( rType, - static_cast< XPropertySet * >( this ), - static_cast< XMultiPropertySet * >( this ), - static_cast< XFastPropertySet * >( this ) ); + return ::cppu::queryInterface( + rType, + static_cast< XPropertySet * >( this ), + static_cast< XMultiPropertySet * >( this ), + static_cast< XFastPropertySet * >( this ) ); } // ComponentHelper -void OPropertySetHelper::disposing() +void OPropertySetHelper::disposing() SAL_THROW( () ) { // Create an event with this as sender Reference < XPropertySet > rSource( SAL_STATIC_CAST( XPropertySet * , this ) , UNO_QUERY ); @@ -210,13 +214,16 @@ void OPropertySetHelper::disposing() aVetoableLC.disposeAndClear( aEvt ); } -Reference < XPropertySetInfo > OPropertySetHelper::createPropertySetInfo( IPropertyArrayHelper & rProperties ) +Reference < XPropertySetInfo > OPropertySetHelper::createPropertySetInfo( + IPropertyArrayHelper & rProperties ) SAL_THROW( () ) { return static_cast< XPropertySetInfo * >( new OPropertySetHelperInfo_Impl( rProperties ) ); } // XPropertySet -void OPropertySetHelper::setPropertyValue( const OUString& rPropertyName, const Any& rValue ) +void OPropertySetHelper::setPropertyValue( + const OUString& rPropertyName, const Any& rValue ) + throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException) { // get the map table IPropertyArrayHelper & rPH = getInfoHelper(); @@ -227,7 +234,9 @@ void OPropertySetHelper::setPropertyValue( const OUString& rPropertyName, const } // XPropertySet -Any OPropertySetHelper::getPropertyValue( const OUString& rPropertyName ) +Any OPropertySetHelper::getPropertyValue( + const OUString& rPropertyName ) + throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException) { // get the map table IPropertyArrayHelper & rPH = getInfoHelper(); @@ -238,8 +247,9 @@ Any OPropertySetHelper::getPropertyValue( const OUString& rPropertyName ) } // XPropertySet -void OPropertySetHelper::addPropertyChangeListener(const OUString& rPropertyName, - const Reference < XPropertyChangeListener > & rxListener) +void OPropertySetHelper::addPropertyChangeListener( + const OUString& rPropertyName, + const Reference < XPropertyChangeListener > & rxListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException) @@ -285,11 +295,12 @@ void OPropertySetHelper::addPropertyChangeListener(const OUString& rPropertyName // XPropertySet -void OPropertySetHelper::removePropertyChangeListener(const OUString& rPropertyName, - const Reference < XPropertyChangeListener >& rxListener) - throw(::com::sun::star::beans::UnknownPropertyException, - ::com::sun::star::lang::WrappedTargetException, - ::com::sun::star::uno::RuntimeException) +void OPropertySetHelper::removePropertyChangeListener( + const OUString& rPropertyName, + const Reference < XPropertyChangeListener >& rxListener ) + throw(::com::sun::star::beans::UnknownPropertyException, + ::com::sun::star::lang::WrappedTargetException, + ::com::sun::star::uno::RuntimeException) { MutexGuard aGuard( rBHelper.rMutex ); OSL_ENSHURE( !rBHelper.bDisposed, "object is disposed" ); @@ -318,14 +329,12 @@ void OPropertySetHelper::removePropertyChangeListener(const OUString& rPropertyN } // XPropertySet -void OPropertySetHelper::addVetoableChangeListener -( +void OPropertySetHelper::addVetoableChangeListener( const OUString& rPropertyName, - const Reference< XVetoableChangeListener > & rxListener -) - throw(::com::sun::star::beans::UnknownPropertyException, - ::com::sun::star::lang::WrappedTargetException, - ::com::sun::star::uno::RuntimeException) + const Reference< XVetoableChangeListener > & rxListener ) + throw(::com::sun::star::beans::UnknownPropertyException, + ::com::sun::star::lang::WrappedTargetException, + ::com::sun::star::uno::RuntimeException) { MutexGuard aGuard( rBHelper.rMutex ); OSL_ENSHURE( !rBHelper.bInDispose, "do not addVetoableChangeListener in the dispose call" ); @@ -366,14 +375,12 @@ void OPropertySetHelper::addVetoableChangeListener } // XPropertySet -void OPropertySetHelper::removeVetoableChangeListener -( +void OPropertySetHelper::removeVetoableChangeListener( const OUString& rPropertyName, - const Reference < XVetoableChangeListener > & rxListener -) - throw(::com::sun::star::beans::UnknownPropertyException, - ::com::sun::star::lang::WrappedTargetException, - ::com::sun::star::uno::RuntimeException) + const Reference < XVetoableChangeListener > & rxListener ) + throw(::com::sun::star::beans::UnknownPropertyException, + ::com::sun::star::lang::WrappedTargetException, + ::com::sun::star::uno::RuntimeException) { MutexGuard aGuard( rBHelper.rMutex ); OSL_ENSHURE( !rBHelper.bDisposed, "object is disposed" ); @@ -587,14 +594,12 @@ void OPropertySetHelper::fire } // OPropertySetHelper -void OPropertySetHelper::setFastPropertyValues -( +void OPropertySetHelper::setFastPropertyValues( sal_Int32 nSeqLen, sal_Int32 * pHandles, const Any * pValues, - sal_Int32 nHitCount -) -throw (Exception) + sal_Int32 nHitCount ) + SAL_THROW( (::com::sun::star::uno::Exception) ) { OSL_ENSHURE( !rBHelper.bInDispose, "do not getFastPropertyValue in the dispose call" ); OSL_ENSHURE( !rBHelper.bDisposed, "object is disposed" ); @@ -670,11 +675,10 @@ throw (Exception) * The sequence may be conatain not known properties. The implementation * must ignore these properties. */ -void OPropertySetHelper::setPropertyValues -( +void OPropertySetHelper::setPropertyValues( const Sequence<OUString>& rPropertyNames, - const Sequence<Any>& rValues -) + const Sequence<Any>& rValues ) + throw(::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException) { sal_Int32 * pHandles = NULL; try @@ -697,7 +701,8 @@ void OPropertySetHelper::setPropertyValues } // XMultiPropertySet -Sequence<Any> OPropertySetHelper::getPropertyValues( const Sequence<OUString>& rPropertyNames ) +Sequence<Any> OPropertySetHelper::getPropertyValues( const Sequence<OUString>& rPropertyNames ) + throw(::com::sun::star::uno::RuntimeException) { sal_Int32 nSeqLen = rPropertyNames.getLength(); sal_Int32 * pHandles = new sal_Int32[ nSeqLen ]; @@ -721,27 +726,27 @@ Sequence<Any> OPropertySetHelper::getPropertyValues( const Sequence<OUString>& r } // XMultiPropertySet -void OPropertySetHelper::addPropertiesChangeListener ( - const Sequence<OUString> & , - const Reference < XPropertiesChangeListener > & rListener - ) +void OPropertySetHelper::addPropertiesChangeListener( + const Sequence<OUString> & , + const Reference < XPropertiesChangeListener > & rListener ) + throw(::com::sun::star::uno::RuntimeException) { rBHelper.addListener( getCppuType(&rListener) , rListener ); } // XMultiPropertySet -void OPropertySetHelper::removePropertiesChangeListener - ( const Reference < XPropertiesChangeListener > & rListener ) +void OPropertySetHelper::removePropertiesChangeListener( + const Reference < XPropertiesChangeListener > & rListener ) + throw(::com::sun::star::uno::RuntimeException) { rBHelper.removeListener( getCppuType(&rListener) , rListener ); } // XMultiPropertySet -void OPropertySetHelper::firePropertiesChangeEvent -( +void OPropertySetHelper::firePropertiesChangeEvent( const Sequence<OUString>& rPropertyNames, - const Reference < XPropertiesChangeListener >& rListener -) + const Reference < XPropertiesChangeListener >& rListener ) + throw(::com::sun::star::uno::RuntimeException) { sal_Int32 nLen = rPropertyNames.getLength(); sal_Int32 * pHandles = new sal_Int32[nLen]; @@ -844,12 +849,12 @@ void OPropertySetHelper::removePropertyStateChangeListener( const OUString& aPro // return ow; // } -int SAL_CALL compare_Property_Impl( const void *arg1, const void *arg2 ) +int SAL_CALL compare_Property_Impl( const void *arg1, const void *arg2 ) SAL_THROW( () ) { return ((Property *)arg1)->Name.compareTo( ((Property *)arg2)->Name ); } -void OPropertyArrayHelper::init( sal_Bool bSorted ) +void OPropertyArrayHelper::init( sal_Bool bSorted ) SAL_THROW( () ) { sal_Int32 i, nElements = aInfos.getLength(); const Property* pProperties = aInfos.getConstArray(); @@ -874,23 +879,21 @@ void OPropertyArrayHelper::init( sal_Bool bSorted ) bRightOrdered = sal_True; } -OPropertyArrayHelper::OPropertyArrayHelper -( +OPropertyArrayHelper::OPropertyArrayHelper( Property * pProps, sal_Int32 nEle, - sal_Bool bSorted -) + sal_Bool bSorted ) + SAL_THROW( () ) : aInfos(pProps, nEle) , bRightOrdered( sal_False ) { init( bSorted ); } -OPropertyArrayHelper::OPropertyArrayHelper -( +OPropertyArrayHelper::OPropertyArrayHelper( const Sequence< Property > & aProps, - sal_Bool bSorted -) + sal_Bool bSorted ) + SAL_THROW( () ) : aInfos(aProps) , bRightOrdered( sal_False ) { diff --git a/cppuhelper/source/servicefactory.cxx b/cppuhelper/source/servicefactory.cxx index bd265f015..ff18c0d53 100644 --- a/cppuhelper/source/servicefactory.cxx +++ b/cppuhelper/source/servicefactory.cxx @@ -2,9 +2,9 @@ * * $RCSfile: servicefactory.cxx,v $ * - * $Revision: 1.7 $ + * $Revision: 1.8 $ * - * last change: $Author: dbo $ $Date: 2001-02-15 11:46:17 $ + * last change: $Author: dbo $ $Date: 2001-03-09 12:15:28 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -171,7 +171,7 @@ static Reference< XMultiServiceFactory > createImplServiceFactory( const OUString & rReadRegistry, sal_Bool bReadOnly, const OUString & rBootstrapPath ) - throw( ::com::sun::star::uno::Exception ) + SAL_THROW( (::com::sun::star::uno::Exception) ) { Reference< XSingleServiceFactory > xSMFac( loadLibComponentFactory( OUString( RTL_CONSTASCII_USTRINGPARAM("smgr") ), @@ -370,7 +370,7 @@ Reference< XMultiServiceFactory > SAL_CALL createRegistryServiceFactory( const OUString & rReadRegistry, sal_Bool bReadOnly, const OUString & rBootstrapPath ) - throw( ::com::sun::star::uno::Exception ) + SAL_THROW( (::com::sun::star::uno::Exception) ) { return createImplServiceFactory( rWriteRegistry, rReadRegistry, bReadOnly, rBootstrapPath ); } diff --git a/cppuhelper/source/shlib.cxx b/cppuhelper/source/shlib.cxx index 63a4da39f..30bb04503 100644 --- a/cppuhelper/source/shlib.cxx +++ b/cppuhelper/source/shlib.cxx @@ -2,9 +2,9 @@ * * $RCSfile: shlib.cxx,v $ * - * $Revision: 1.4 $ + * $Revision: 1.5 $ * - * last change: $Author: pluby $ $Date: 2001-02-10 17:52:00 $ + * last change: $Author: dbo $ $Date: 2001-03-09 12:15:28 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -89,7 +89,7 @@ namespace cppu #ifdef DEBUG //================================================================================================== -static inline void out( const char * p ) throw () +static inline void out( const char * p ) SAL_THROW( () ) { ::fprintf( stderr, p ); } @@ -101,7 +101,7 @@ static inline void out( const OUString & r ) throw () #endif //================================================================================================== -static const ::std::vector< OUString > * getAccessDPath() throw () +static const ::std::vector< OUString > * getAccessDPath() SAL_THROW( () ) { static ::std::vector< OUString > * s_p = 0; static bool s_bInit = false; @@ -143,6 +143,13 @@ static const ::std::vector< OUString > * getAccessDPath() throw () #endif s_p = & s_v; } + else + { + // no access path env set +#ifdef DEBUG + out( "=> no CPLD_ACCESSPATH set.\n" ); +#endif + } s_bInit = true; } } @@ -153,12 +160,6 @@ static const ::std::vector< OUString > * getAccessDPath() throw () //================================================================================================== static bool checkAccessPath( OUString * pComp ) throw () { -#ifdef DEBUG - out( "> trying to access module: \"" ); - out( *pComp ); - out( "\"\n" ); -#endif - const ::std::vector< OUString > * pPath = getAccessDPath(); if (pPath) @@ -221,15 +222,12 @@ static bool checkAccessPath( OUString * pComp ) throw () else { // no access path env set -#ifdef DEBUG - out( "=> no CPLD_ACCESSPATH set.\n" ); -#endif return true; } } //-------------------------------------------------------------------------------------------------- -static inline sal_Int32 endsWith( const OUString & rText, const OUString & rEnd ) throw () +static inline sal_Int32 endsWith( const OUString & rText, const OUString & rEnd ) SAL_THROW( () ) { if (rText.getLength() >= rEnd.getLength() && rEnd.equalsIgnoreCase( rText.copy( rText.getLength() - rEnd.getLength() ) )) @@ -239,9 +237,7 @@ static inline sal_Int32 endsWith( const OUString & rText, const OUString & rEnd return -1; } //================================================================================================== -static OUString makeComponentPath( - const OUString & rLibName, const OUString & rPath - ) throw () +static OUString makeComponentPath( const OUString & rLibName, const OUString & rPath ) SAL_THROW( () ) { OUStringBuffer buf( rPath.getLength() + 32 ); @@ -307,7 +303,7 @@ Reference< XSingleServiceFactory > SAL_CALL loadSharedLibComponentFactory( OUString const & rImplName, Reference< XMultiServiceFactory > const & xMgr, Reference< XRegistryKey > const & xKey ) - throw (CannotActivateFactoryException) + SAL_THROW( (CannotActivateFactoryException) ) { OUString aModulePath( makeComponentPath( rLibName, rPath ) ); @@ -451,7 +447,9 @@ Reference< XSingleServiceFactory > SAL_CALL loadSharedLibComponentFactory( { ::osl_unloadModule( lib ); #ifdef DEBUG + out( "### cannot activate factory: " ); out( aExcMsg ); + out( "\n" ); #endif throw CannotActivateFactoryException( aExcMsg, Reference< XInterface >() ); } @@ -464,7 +462,7 @@ void SAL_CALL writeSharedLibComponentInfo( OUString const & rLibName, OUString const & rPath, Reference< XMultiServiceFactory > const & xMgr, Reference< XRegistryKey > const & xKey ) - throw (CannotRegisterImplementationException) + SAL_THROW( (CannotRegisterImplementationException) ) { OUString aModulePath( makeComponentPath( rLibName, rPath ) ); @@ -603,7 +601,9 @@ void SAL_CALL writeSharedLibComponentInfo( { ::osl_unloadModule( lib ); #ifdef DEBUG + out( "### cannot write component info: " ); out( aExcMsg ); + out( "\n" ); #endif throw CannotRegisterImplementationException( aExcMsg, Reference< XInterface >() ); } diff --git a/cppuhelper/source/stdidlclass.cxx b/cppuhelper/source/stdidlclass.cxx index b48b401df..806f1cbbe 100644 --- a/cppuhelper/source/stdidlclass.cxx +++ b/cppuhelper/source/stdidlclass.cxx @@ -2,9 +2,9 @@ * * $RCSfile: stdidlclass.cxx,v $ * - * $Revision: 1.1.1.1 $ + * $Revision: 1.2 $ * - * last change: $Author: hr $ $Date: 2000-09-18 15:26:10 $ + * last change: $Author: dbo $ $Date: 2001-03-09 12:15:28 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -88,7 +88,7 @@ public: const OUString & sImplementationName , const Reference < XIdlClass > & rSuperClass, const Sequence < OUString > &seq - ); + ) SAL_THROW( () ); // XInterface Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type & rType ) @@ -98,7 +98,8 @@ public: void SAL_CALL release() { OWeakObject::release(); } // XIdlClassProvider - Sequence< Reference < XIdlClass > > SAL_CALL getIdlClasses(void); + Sequence< Reference < XIdlClass > > SAL_CALL getIdlClasses(void) + throw (RuntimeException); // XIdlClass virtual Sequence< Reference< XIdlClass > > SAL_CALL getClasses( ) throw(RuntimeException) @@ -146,7 +147,7 @@ OStdIdlClass::OStdIdlClass( const OUString & sImplementationName , const Reference < XIdlClass > & rSuperClass, const Sequence < OUString > &seq - ) : + ) SAL_THROW( () ) : m_rSMgr( rSMgr ) , m_sImplementationName( sImplementationName ) , m_seqSupportedInterface( seq ) @@ -192,6 +193,7 @@ Sequence< Reference< XIdlClass > > SAL_CALL OStdIdlClass::getInterfaces( ) thro // XIdlClassProvider Sequence< Reference < XIdlClass > > SAL_CALL OStdIdlClass::getIdlClasses(void) + throw (RuntimeException) { // weak reference to cache the standard class static WeakReference< XIdlClass > weakRef; @@ -225,6 +227,7 @@ XIdlClass * SAL_CALL createStandardClassWithSequence( const OUString & sImplementationName , const Reference < XIdlClass > & rSuperClass, const Sequence < OUString > &seqInterfaceNames ) + SAL_THROW( () ) { return SAL_STATIC_CAST( XIdlClass * , diff --git a/cppuhelper/source/typeprovider.cxx b/cppuhelper/source/typeprovider.cxx index 895694748..606071f50 100644 --- a/cppuhelper/source/typeprovider.cxx +++ b/cppuhelper/source/typeprovider.cxx @@ -2,9 +2,9 @@ * * $RCSfile: typeprovider.cxx,v $ * - * $Revision: 1.1.1.1 $ + * $Revision: 1.2 $ * - * last change: $Author: hr $ $Date: 2000-09-18 15:26:10 $ + * last change: $Author: dbo $ $Date: 2001-03-09 12:15:28 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -69,12 +69,12 @@ namespace cppu { //__________________________________________________________________________________________________ -OImplementationId::~OImplementationId() +OImplementationId::~OImplementationId() SAL_THROW( () ) { delete _pSeq; } //__________________________________________________________________________________________________ -Sequence< sal_Int8 > OImplementationId::getImplementationId() const +Sequence< sal_Int8 > OImplementationId::getImplementationId() const SAL_THROW( () ) { if (! _pSeq) { @@ -91,6 +91,7 @@ Sequence< sal_Int8 > OImplementationId::getImplementationId() const //-------------------------------------------------------------------------------------------------- static inline void copy( Sequence< Type > & rDest, const Sequence< Type > & rSource, sal_Int32 nOffset ) + SAL_THROW( () ) { Type * pDest = rDest.getArray(); const Type * pSource = rSource.getConstArray(); @@ -103,6 +104,7 @@ static inline void copy( Sequence< Type > & rDest, const Sequence< Type > & rSou OTypeCollection::OTypeCollection( const Type & rType1, const Sequence< Type > & rAddTypes ) + SAL_THROW( () ) : _aTypes( 1 + rAddTypes.getLength() ) { _aTypes[0] = rType1; @@ -113,6 +115,7 @@ OTypeCollection::OTypeCollection( const Type & rType1, const Type & rType2, const Sequence< Type > & rAddTypes ) + SAL_THROW( () ) : _aTypes( 2 + rAddTypes.getLength() ) { _aTypes[0] = rType1; @@ -125,6 +128,7 @@ OTypeCollection::OTypeCollection( const Type & rType2, const Type & rType3, const Sequence< Type > & rAddTypes ) + SAL_THROW( () ) : _aTypes( 3 + rAddTypes.getLength() ) { _aTypes[0] = rType1; @@ -139,6 +143,7 @@ OTypeCollection::OTypeCollection( const Type & rType3, const Type & rType4, const Sequence< Type > & rAddTypes ) + SAL_THROW( () ) : _aTypes( 4 + rAddTypes.getLength() ) { _aTypes[0] = rType1; @@ -155,6 +160,7 @@ OTypeCollection::OTypeCollection( const Type & rType4, const Type & rType5, const Sequence< Type > & rAddTypes ) + SAL_THROW( () ) : _aTypes( 5 + rAddTypes.getLength() ) { _aTypes[0] = rType1; @@ -173,6 +179,7 @@ OTypeCollection::OTypeCollection( const Type & rType5, const Type & rType6, const Sequence< Type > & rAddTypes ) + SAL_THROW( () ) : _aTypes( 6 + rAddTypes.getLength() ) { _aTypes[0] = rType1; @@ -193,6 +200,7 @@ OTypeCollection::OTypeCollection( const Type & rType6, const Type & rType7, const Sequence< Type > & rAddTypes ) + SAL_THROW( () ) : _aTypes( 7 + rAddTypes.getLength() ) { _aTypes[0] = rType1; @@ -215,6 +223,7 @@ OTypeCollection::OTypeCollection( const Type & rType7, const Type & rType8, const Sequence< Type > & rAddTypes ) + SAL_THROW( () ) : _aTypes( 8 + rAddTypes.getLength() ) { _aTypes[0] = rType1; @@ -239,6 +248,7 @@ OTypeCollection::OTypeCollection( const Type & rType8, const Type & rType9, const Sequence< Type > & rAddTypes ) + SAL_THROW( () ) : _aTypes( 9 + rAddTypes.getLength() ) { _aTypes[0] = rType1; @@ -265,6 +275,7 @@ OTypeCollection::OTypeCollection( const Type & rType9, const Type & rType10, const Sequence< Type > & rAddTypes ) + SAL_THROW( () ) : _aTypes( 10 + rAddTypes.getLength() ) { _aTypes[0] = rType1; @@ -293,6 +304,7 @@ OTypeCollection::OTypeCollection( const Type & rType10, const Type & rType11, const Sequence< Type > & rAddTypes ) + SAL_THROW( () ) : _aTypes( 11 + rAddTypes.getLength() ) { _aTypes[0] = rType1; @@ -323,6 +335,7 @@ OTypeCollection::OTypeCollection( const Type & rType11, const Type & rType12, const Sequence< Type > & rAddTypes ) + SAL_THROW( () ) : _aTypes( 12 + rAddTypes.getLength() ) { _aTypes[0] = rType1; diff --git a/cppuhelper/source/weak.cxx b/cppuhelper/source/weak.cxx index d0e756265..73c38bbec 100644 --- a/cppuhelper/source/weak.cxx +++ b/cppuhelper/source/weak.cxx @@ -2,9 +2,9 @@ * * $RCSfile: weak.cxx,v $ * - * $Revision: 1.3 $ + * $Revision: 1.4 $ * - * last change: $Author: dbo $ $Date: 2001-02-14 10:17:32 $ + * last change: $Author: dbo $ $Date: 2001-03-09 12:15:28 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -103,7 +103,7 @@ inline static Mutex & getWeakMutex() throw() */ // due to static Reflection destruction from usr, ther must be a mutex leak (#73272#) -inline static Mutex & getWeakMutex() throw() +inline static Mutex & getWeakMutex() SAL_THROW( () ) { static Mutex * s_pMutex = 0; if (! s_pMutex) @@ -120,7 +120,7 @@ public: /** Hold the weak object without an acquire (only the pointer). */ - OWeakConnectionPoint( OWeakObject* pObj ) throw() + OWeakConnectionPoint( OWeakObject* pObj ) SAL_THROW( () ) : m_aRefCount( 0 ) , m_pObject(pObj) , m_aReferences( getWeakMutex() ) @@ -252,7 +252,7 @@ void SAL_CALL OWeakObject::release() throw() } } -OWeakObject::~OWeakObject() throw(::com::sun::star::uno::RuntimeException) +OWeakObject::~OWeakObject() SAL_THROW( (::com::sun::star::uno::RuntimeException) ) { } @@ -279,7 +279,7 @@ Reference< XAdapter > SAL_CALL OWeakObject::queryAdapter() //-- OWeakAggObject ---------------------------------------------------- //------------------------------------------------------------------------ OWeakAggObject::~OWeakAggObject() - throw (::com::sun::star::uno::RuntimeException) + SAL_THROW( (::com::sun::star::uno::RuntimeException) ) { } @@ -358,13 +358,13 @@ namespace uno class OWeakRefListener : public XReference { public: - OWeakRefListener(); - OWeakRefListener(const OWeakRefListener& rRef); - OWeakRefListener(const Reference< XInterface >& xInt); - ~OWeakRefListener(); - + OWeakRefListener() SAL_THROW( () ); + OWeakRefListener(const OWeakRefListener& rRef) SAL_THROW( () ); + OWeakRefListener(const Reference< XInterface >& xInt) SAL_THROW( () ); + ~OWeakRefListener() SAL_THROW( () ); + // XInterface - Any SAL_CALL queryInterface( const Type & rType ) throw(); + Any SAL_CALL queryInterface( const Type & rType ) throw(RuntimeException); void SAL_CALL acquire() throw(); void SAL_CALL release() throw(); @@ -377,15 +377,15 @@ public: Reference< XAdapter > m_XWeakConnectionPoint; private: - OWeakRefListener& SAL_CALL operator=(const OWeakRefListener& rRef); + OWeakRefListener& SAL_CALL operator=(const OWeakRefListener& rRef) SAL_THROW( () ); }; -OWeakRefListener::OWeakRefListener() +OWeakRefListener::OWeakRefListener() SAL_THROW( () ) : m_aRefCount( 0 ) { } -OWeakRefListener::OWeakRefListener(const OWeakRefListener& rRef) +OWeakRefListener::OWeakRefListener(const OWeakRefListener& rRef) SAL_THROW( () ) : m_aRefCount( 0 ) { m_XWeakConnectionPoint = rRef.m_XWeakConnectionPoint; @@ -394,7 +394,7 @@ OWeakRefListener::OWeakRefListener(const OWeakRefListener& rRef) m_XWeakConnectionPoint->addReference((XReference*)this); } -OWeakRefListener::OWeakRefListener(const Reference< XInterface >& xInt) +OWeakRefListener::OWeakRefListener(const Reference< XInterface >& xInt) SAL_THROW( () ) : m_aRefCount( 0 ) { Reference< XWeak > xWeak( Reference< XWeak >::query( xInt ) ); @@ -410,7 +410,7 @@ OWeakRefListener::OWeakRefListener(const Reference< XInterface >& xInt) } } -OWeakRefListener::~OWeakRefListener() +OWeakRefListener::~OWeakRefListener() SAL_THROW( () ) { acquire(); // dont die again if (m_XWeakConnectionPoint.is()) @@ -418,7 +418,7 @@ OWeakRefListener::~OWeakRefListener() } // XInterface -Any SAL_CALL OWeakRefListener::queryInterface( const Type & rType ) throw() +Any SAL_CALL OWeakRefListener::queryInterface( const Type & rType ) throw(RuntimeException) { return ::cppu::queryInterface( rType, static_cast< XReference * >( this ), static_cast< XInterface * >( this ) ); @@ -457,7 +457,7 @@ void SAL_CALL OWeakRefListener::dispose() //------------------------------------------------------------------------ //-- WeakReferenceHelper ---------------------------------------------------------- //------------------------------------------------------------------------ -WeakReferenceHelper::WeakReferenceHelper(const Reference< XInterface >& xInt) +WeakReferenceHelper::WeakReferenceHelper(const Reference< XInterface >& xInt) SAL_THROW( () ) : m_pImpl( 0 ) { if (xInt.is()) @@ -467,7 +467,7 @@ WeakReferenceHelper::WeakReferenceHelper(const Reference< XInterface >& xInt) } } -WeakReferenceHelper::WeakReferenceHelper(const WeakReferenceHelper& rWeakRef) +WeakReferenceHelper::WeakReferenceHelper(const WeakReferenceHelper& rWeakRef) SAL_THROW( () ) : m_pImpl( 0 ) { Reference< XInterface > xInt( rWeakRef.get() ); @@ -478,7 +478,7 @@ WeakReferenceHelper::WeakReferenceHelper(const WeakReferenceHelper& rWeakRef) } } -WeakReferenceHelper& WeakReferenceHelper::operator=(const WeakReferenceHelper& rWeakRef) +WeakReferenceHelper& WeakReferenceHelper::operator=(const WeakReferenceHelper& rWeakRef) SAL_THROW( () ) { if (this != &rWeakRef) { @@ -502,7 +502,7 @@ WeakReferenceHelper& WeakReferenceHelper::operator=(const WeakReferenceHelper& r return *this; } -WeakReferenceHelper::~WeakReferenceHelper() +WeakReferenceHelper::~WeakReferenceHelper() SAL_THROW( () ) { if (m_pImpl) { @@ -516,7 +516,7 @@ WeakReferenceHelper::~WeakReferenceHelper() } } -Reference< XInterface > WeakReferenceHelper::get() const +Reference< XInterface > WeakReferenceHelper::get() const SAL_THROW( () ) { Reference< XAdapter > xAdp; { |