From 5f410a225a9cea57320d0e6f938ed3c07783396d Mon Sep 17 00:00:00 2001 From: Hans-Joachim Lankenau Date: Fri, 25 Jun 2004 16:37:31 +0000 Subject: [PATCH] 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 --- cppuhelper/source/access_control.cxx | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/cppuhelper/source/access_control.cxx b/cppuhelper/source/access_control.cxx index 79d4b5b3113a..1a958d1c881a 100644 --- a/cppuhelper/source/access_control.cxx +++ b/cppuhelper/source/access_control.cxx @@ -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 >() );