summaryrefslogtreecommitdiff
path: root/framework/source
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
commitbe064ef4e2303fbb893e0ee0683440d0cef85d04 (patch)
tree6d4354c33b321398e2d1c8db70ed4fbdcb3162dc /framework/source
parent473b5bd0e134e96ecf6fde87dc9406876ad55e05 (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')
-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 ab22afa9f9..97b53a347b 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 )
{
@@ -576,12 +576,15 @@ throw ( ::com::sun::star::container::NoSuchElementException, ::com::sun::star::l
if ( Args[i].Name.equals( aPropFrame ))
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 >();
}