From fd813ea19e7bec566e78ab1ec5bde2b84d7f4f8c Mon Sep 17 00:00:00 2001 From: Oliver Bolte Date: Thu, 12 Aug 2004 11:17:50 +0000 Subject: INTEGRATION: CWS unotlc (1.5.32); FILE MERGED 2004/08/03 15:07:59 dbo 1.5.32.2: RESYNC: (1.5-1.6); FILE MERGED 2004/07/12 13:30:02 dbo 1.5.32.1: #i20303# fixing resolve order: first tdmgr, then local provider --- .../registry_tdprovider/rdbtdp_tdenumeration.cxx | 47 +++++----------------- 1 file changed, 11 insertions(+), 36 deletions(-) (limited to 'stoc') diff --git a/stoc/source/registry_tdprovider/rdbtdp_tdenumeration.cxx b/stoc/source/registry_tdprovider/rdbtdp_tdenumeration.cxx index 92adc3cf7..90bcf3d2e 100644 --- a/stoc/source/registry_tdprovider/rdbtdp_tdenumeration.cxx +++ b/stoc/source/registry_tdprovider/rdbtdp_tdenumeration.cxx @@ -2,9 +2,9 @@ * * $RCSfile: rdbtdp_tdenumeration.cxx,v $ * - * $Revision: 1.6 $ + * $Revision: 1.7 $ * - * last change: $Author: rt $ $Date: 2004-07-23 15:03:51 $ + * last change: $Author: obo $ $Date: 2004-08-12 12:17:50 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -127,7 +127,7 @@ namespace stoc_rdbtdp // static rtl::Reference< TypeDescriptionEnumerationImpl > TypeDescriptionEnumerationImpl::createInstance( - const uno::Reference< uno::XComponentContext > & xContext, + const uno::Reference< container::XHierarchicalNameAccess > & xTDMgr, const rtl::OUString & rModuleName, const uno::Sequence< uno::TypeClass > & rTypes, reflection::TypeDescriptionSearchDepth eDepth, @@ -141,7 +141,7 @@ TypeDescriptionEnumerationImpl::createInstance( // Enumeration for root requested. return rtl::Reference< TypeDescriptionEnumerationImpl >( new TypeDescriptionEnumerationImpl( - xContext, rBaseKeys, rTypes, eDepth ) ); + xTDMgr, rBaseKeys, rTypes, eDepth ) ); } RegistryKeyList aModuleKeys; @@ -220,20 +220,19 @@ TypeDescriptionEnumerationImpl::createInstance( return rtl::Reference< TypeDescriptionEnumerationImpl >( new TypeDescriptionEnumerationImpl( - xContext, aModuleKeys, rTypes, eDepth ) ); + xTDMgr, aModuleKeys, rTypes, eDepth ) ); } //========================================================================= TypeDescriptionEnumerationImpl::TypeDescriptionEnumerationImpl( - const uno::Reference< - uno::XComponentContext > & xContext, - const RegistryKeyList & rModuleKeys, - const uno::Sequence< uno::TypeClass > & rTypes, - reflection::TypeDescriptionSearchDepth eDepth ) + const uno::Reference< container::XHierarchicalNameAccess > & xTDMgr, + const RegistryKeyList & rModuleKeys, + const uno::Sequence< uno::TypeClass > & rTypes, + reflection::TypeDescriptionSearchDepth eDepth ) : m_aModuleKeys( rModuleKeys ), m_aTypes( rTypes ), m_eDepth( eDepth ), - m_xContext( xContext ) + m_xTDMgr( xTDMgr ) { g_moduleCount.modCnt.acquire( &g_moduleCount.modCnt ); } @@ -646,7 +645,7 @@ TypeDescriptionEnumerationImpl::queryNext() xKey->getBinaryValue() ); xTD = createTypeDescription( aBytes, - getTDMgr(), + m_xTDMgr, false ); OSL_ENSURE( xTD.is(), "TypeDescriptionEnumerationImpl::queryNext " @@ -683,29 +682,5 @@ TypeDescriptionEnumerationImpl::queryNext() return uno::Reference< reflection::XTypeDescription >(); } -//========================================================================= -uno::Reference< container::XHierarchicalNameAccess > -TypeDescriptionEnumerationImpl::getTDMgr() -{ - if ( !m_xTDMgr.is() ) - { - uno::Reference< container::XHierarchicalNameAccess > xTDMgr; - m_xContext->getValueByName( - rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( - "/singletons/com.sun.star.reflection.theTypeDescriptionManager" ) ) ) - >>= xTDMgr; - - OSL_ENSURE( xTDMgr.is(), - "TypeDescriptionEnumerationImpl::getTDMgr " - "Cannot get singleton \"TypeDescriptionManager\" from context!" ); - { - MutexGuard guard( m_aMutex ); - if ( !m_xTDMgr.is() ) - m_xTDMgr = xTDMgr; - } - } - return m_xTDMgr; -} - } // namespace stoc_rdbtdp -- cgit v1.2.3