diff options
author | Jens-Heiner Rechtien <hr@openoffice.org> | 2004-07-23 13:10:46 +0000 |
---|---|---|
committer | Jens-Heiner Rechtien <hr@openoffice.org> | 2004-07-23 13:10:46 +0000 |
commit | 05efa5846e75edb34cd0b374e0d845af60463211 (patch) | |
tree | fd7cc7facae4de333c83c432406d534c9c54c8b5 /scripting | |
parent | INTEGRATION: CWS scriptingf7 (1.8.4); FILE MERGED (diff) | |
download | core-05efa5846e75edb34cd0b374e0d845af60463211.tar.gz core-05efa5846e75edb34cd0b374e0d845af60463211.zip |
INTEGRATION: CWS scriptingf7 (1.5.18); FILE MERGED
2004/06/12 08:42:36 npower 1.5.18.1: #i25269# Add support for pkgchk.
Diffstat (limited to 'scripting')
-rw-r--r-- | scripting/source/provider/ProviderCache.cxx | 23 |
1 files changed, 19 insertions, 4 deletions
diff --git a/scripting/source/provider/ProviderCache.cxx b/scripting/source/provider/ProviderCache.cxx index 4c24f3d8aeeb..1efbb54245c7 100644 --- a/scripting/source/provider/ProviderCache.cxx +++ b/scripting/source/provider/ProviderCache.cxx @@ -2,9 +2,9 @@ * * $RCSfile: ProviderCache.cxx,v $ * - * $Revision: 1.5 $ + * $Revision: 1.6 $ * - * last change: $Author: hr $ $Date: 2004-03-09 12:07:57 $ + * last change: $Author: hr $ $Date: 2004-07-23 14:10:46 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -91,6 +91,21 @@ ProviderCache::ProviderCache( const Reference< XComponentContext >& xContext, co populateCache(); } + +ProviderCache::ProviderCache( const Reference< XComponentContext >& xContext, const Sequence< Any >& scriptContext, const Sequence< ::rtl::OUString >& blackList ) + throw ( RuntimeException ) : m_Sctx( scriptContext ), m_xContext( xContext ), m_sBlackList( blackList ) + +{ + OSL_TRACE("ProviderCache::ProviderCache() - ctor"); + // initialise m_hProviderDetailsCache with details of ScriptProviders + // will use createContentEnumeration + + m_xMgr = m_xContext->getServiceManager(); + validateXRef( m_xMgr, "ProviderCache::ProviderCache() failed to obtain ServiceManager" ); + OSL_TRACE("ProviderCache::ProviderCache() about to populateCache"); + populateCache(); +} + ProviderCache::~ProviderCache() { OSL_TRACE("ProviderCache::ProviderCache() - dtor"); @@ -161,7 +176,7 @@ ProviderCache::getAllProviders() throw ( RuntimeException ) xScriptProvider = createProvider( h_it->second ); providers[ providerIndex++ ] = xScriptProvider; } - catch ( RuntimeException& e ) + catch ( Exception& e ) { OSL_TRACE("failed to create provider ****"); ::rtl::OUString temp = OUSTR( "ProviderCache::getAllProviders: failed to create provider, " ); @@ -223,7 +238,7 @@ ProviderCache::populateCache() throw ( RuntimeException ) { for ( sal_Int32 index = 0; index < serviceNames.getLength(); index++ ) { - if ( serviceNames[ index ].indexOf( providerKey ) == 0 ) + if ( serviceNames[ index ].indexOf( providerKey ) == 0 && !isInBlackList( serviceNames[ index ] ) ) { serviceName = serviceNames[ index ]; OSL_TRACE("ProviderCache::populateCache(), creating entry with factory for service %s", |