summaryrefslogtreecommitdiff
path: root/framework/source/uifactory
diff options
context:
space:
mode:
authorVladimir Glazounov <vg@openoffice.org>2008-08-18 12:02:01 +0000
committerVladimir Glazounov <vg@openoffice.org>2008-08-18 12:02:01 +0000
commit171ec1d2cb3f84d6a80016ce8bbc8daf1de7a618 (patch)
treedd9c6462ef355c260394a28e22830b80c4633a95 /framework/source/uifactory
parent538c884096759974adb1bc1b25e8201eb9a9defb (diff)
INTEGRATION: CWS vcl30stop2 (1.9.64); FILE MERGED
2008/07/24 12:20:19 pl 1.9.64.1: #i92075# solve some threading issues (thanks cd)
Diffstat (limited to 'framework/source/uifactory')
-rw-r--r--framework/source/uifactory/uielementfactorymanager.cxx23
1 files changed, 15 insertions, 8 deletions
diff --git a/framework/source/uifactory/uielementfactorymanager.cxx b/framework/source/uifactory/uielementfactorymanager.cxx
index cb9b37b81bb7..92c3a878b179 100644
--- a/framework/source/uifactory/uielementfactorymanager.cxx
+++ b/framework/source/uifactory/uielementfactorymanager.cxx
@@ -7,7 +7,7 @@
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: uielementfactorymanager.cxx,v $
- * $Revision: 1.9 $
+ * $Revision: 1.10 $
*
* This file is part of OpenOffice.org.
*
@@ -54,6 +54,7 @@
#include <rtl/ustrbuf.hxx>
#include <cppuhelper/weak.hxx>
#include <tools/urlobj.hxx>
+#include <vcl/svapp.hxx>
//_________________________________________________________________________________________________________________
// Defines
@@ -436,10 +437,9 @@ void ConfigurationAccess_UIElementFactoryManager::readConfigurationData()
}
}
- // UNSAFE
- aLock.unlock();
-
Reference< XContainer > xContainer( m_xConfigAccess, UNO_QUERY );
+ aLock.unlock();
+ // UNSAFE
if ( xContainer.is() )
xContainer->addContainerListener( this );
}
@@ -501,7 +501,7 @@ DEFINE_XSERVICEINFO_ONEINSTANCESERVICE ( UIElementFactoryManager
DEFINE_INIT_SERVICE ( UIElementFactoryManager, {} )
UIElementFactoryManager::UIElementFactoryManager( const Reference< XMultiServiceFactory >& xServiceManager ) :
- ThreadHelpBase(),
+ ThreadHelpBase( &Application::GetSolarMutex() ),
m_bConfigRead( sal_False ),
m_xServiceManager( xServiceManager )
{
@@ -577,11 +577,14 @@ throw ( ::com::sun::star::container::NoSuchElementException, ::com::sun::star::l
Args[i].Value >>= xFrame;
}
+ Reference< XModuleManager > xManager( m_xModuleManager );
+ aLock.unlock();
+
// Determine the module identifier
try
{
- if ( xFrame.is() && m_xModuleManager.is() )
- aModuleId = m_xModuleManager->identify( Reference< XInterface >( xFrame, UNO_QUERY ) );
+ if ( xFrame.is() && xManager.is() )
+ aModuleId = xManager->identify( Reference< XInterface >( xFrame, UNO_QUERY ) );
Reference< XUIElementFactory > xUIElementFactory = getFactory( ResourceURL, aModuleId );
if ( xUIElementFactory.is() )
@@ -626,9 +629,13 @@ throw ( RuntimeException )
RetrieveTypeNameFromResourceURL( aResourceURL, aType, aName );
+ Reference< XMultiServiceFactory > xSManager( m_xServiceManager );
+
rtl::OUString aServiceSpecifier = m_pConfigAccess->getFactorySpecifierFromTypeNameModule( aType, aName, aModuleId );
+
+ aLock.unlock();
if ( aServiceSpecifier.getLength() )
- return Reference< XUIElementFactory >( m_xServiceManager->createInstance( aServiceSpecifier ), UNO_QUERY );
+ return Reference< XUIElementFactory >( xSManager->createInstance( aServiceSpecifier ), UNO_QUERY );
else
return Reference< XUIElementFactory >();
}