INTEGRATION: CWS krmisc (1.6.68); FILE MERGED

2006/10/25 11:46:44 kr 1.6.68.2: #i70222# added 'explicit' keyword
2006/10/10 11:28:03 kr 1.6.68.1: enhanced: #i70222#
This commit is contained in:
Rüdiger Timm 2006-10-27 11:14:57 +00:00
parent 20c7949a91
commit 231c094d76

View file

@ -4,9 +4,9 @@
*
* $RCSfile: environment.hxx,v $
*
* $Revision: 1.6 $
* $Revision: 1.7 $
*
* last change: $Author: rt $ $Date: 2005-09-08 08:40:49 $
* last change: $Author: rt $ $Date: 2006-10-27 12:14:57 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
@ -90,6 +90,15 @@ public:
*/
inline Environment( uno_Environment * pEnv = 0 ) SAL_THROW( () );
/** Gets a specific environment. If the specified environment does not exist, then a default one
is created and registered.
@param envTypeName type name of the environment
@param pContext context pointer
*/
inline explicit Environment( rtl::OUString const & envEypeName, void * pContext = NULL ) SAL_THROW( () );
/** Copy constructor: acquires given environment
@param rEnv another environment
@ -154,6 +163,12 @@ inline Environment::Environment( uno_Environment * pEnv ) SAL_THROW( () )
(*_pEnv->acquire)( _pEnv );
}
//__________________________________________________________________________________________________
inline Environment::Environment( rtl::OUString const & rEnvTypeName, void * pContext ) SAL_THROW( () )
: _pEnv(NULL)
{
uno_getEnvironment(&_pEnv, rEnvTypeName.pData, pContext);
}
//__________________________________________________________________________________________________
inline Environment::Environment( const Environment & rEnv ) SAL_THROW( () )
: _pEnv( rEnv._pEnv )
{