diff options
author | Vladimir Glazounov <vg@openoffice.org> | 2003-10-06 12:01:20 +0000 |
---|---|---|
committer | Vladimir Glazounov <vg@openoffice.org> | 2003-10-06 12:01:20 +0000 |
commit | 8252b4f7d99bacd0494b9584934d5caee074b5ea (patch) | |
tree | 2d629a5029cae1cd5c80f514b368497f678d519d /cppu | |
parent | dbcb064fff42afeb5b5c2eb333acf467dc40cb5a (diff) |
INTEGRATION: CWS unopkg (1.16.58); FILE MERGED
2003/10/01 12:14:42 dbo 1.16.58.2: #112449# return statement
2003/09/25 13:26:27 dbo 1.16.58.1: added member function Reference<>::set( any const &, UnoReference_Query[Throw] )
Diffstat (limited to 'cppu')
-rw-r--r-- | cppu/inc/com/sun/star/uno/Reference.hxx | 28 |
1 files changed, 26 insertions, 2 deletions
diff --git a/cppu/inc/com/sun/star/uno/Reference.hxx b/cppu/inc/com/sun/star/uno/Reference.hxx index 3da60e64c9cb..b46a08229a00 100644 --- a/cppu/inc/com/sun/star/uno/Reference.hxx +++ b/cppu/inc/com/sun/star/uno/Reference.hxx @@ -2,9 +2,9 @@ * * $RCSfile: Reference.hxx,v $ * - * $Revision: 1.16 $ + * $Revision: 1.17 $ * - * last change: $Author: dbo $ $Date: 2002-08-21 09:19:06 $ + * last change: $Author: vg $ $Date: 2003-10-06 13:01:20 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -276,6 +276,18 @@ inline sal_Bool Reference< interface_type >::set( { return set( iquery( rRef.get() ), SAL_NO_ACQUIRE ); } + +//______________________________________________________________________________ +template< class interface_type > +inline bool Reference< interface_type >::set( + Any const & rAny, UnoReference_Query ) +{ + return set( iquery( + rAny.pType->eTypeClass == typelib_TypeClass_INTERFACE + ? reinterpret_cast< XInterface * >( rAny.pReserved ) : 0 ), + SAL_NO_ACQUIRE ); +} + #ifndef EXCEPTIONS_OFF //__________________________________________________________________________________________________ template< class interface_type > @@ -291,6 +303,18 @@ inline void Reference< interface_type >::set( { set( iquery_throw( rRef.get() ), SAL_NO_ACQUIRE ); } + +//______________________________________________________________________________ +template< class interface_type > +inline void Reference< interface_type >::set( + Any const & rAny, UnoReference_QueryThrow ) +{ + set( iquery_throw( + rAny.pType->eTypeClass == typelib_TypeClass_INTERFACE + ? reinterpret_cast< XInterface * >( rAny.pReserved ) : 0 ), + SAL_NO_ACQUIRE ); +} + #endif //__________________________________________________________________________________________________ |