INTEGRATION: CWS tune04 (1.5.122); FILE MERGED

2004/06/15 08:53:10 cmc 1.5.122.1: #i29636# turn global objects into local static data protected with swishy double-locked templated template
This commit is contained in:
Hans-Joachim Lankenau 2004-06-25 16:37:31 +00:00
parent 1166e3aec1
commit 5f410a225a

View file

@ -2,9 +2,9 @@
*
* $RCSfile: access_control.cxx,v $
*
* $Revision: 1.5 $
* $Revision: 1.6 $
*
* last change: $Author: dbo $ $Date: 2002-01-25 09:36:50 $
* last change: $Author: hjs $ $Date: 2004-06-25 17:37:31 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@ -74,17 +74,21 @@ using namespace ::osl;
using namespace ::com::sun::star;
using namespace ::com::sun::star::uno;
namespace
{
inline OUString str_ac_singleton()
{
return OUSTR("/singletons/com.sun.star.security.theAccessController");
}
}
namespace cppu
{
static OUString str_envType = OUSTR(CPPU_CURRENT_LANGUAGE_BINDING_NAME);
static OUString str_ac_singleton = OUSTR("/singletons/com.sun.star.security.theAccessController");
//__________________________________________________________________________________________________
AccessControl::AccessControl( Reference< XComponentContext > const & xContext )
SAL_THROW( (RuntimeException) )
{
if (! (xContext->getValueByName( str_ac_singleton ) >>= m_xController))
if (! (xContext->getValueByName( str_ac_singleton() ) >>= m_xController))
{
throw SecurityException(
OUSTR("no access controller!"), Reference< XInterface >() );