Kaydet (Commit) e034b032 authored tarafından Matúš Kukan's avatar Matúš Kukan

Simplify the code a bit.

Change-Id: I57581fb0f3439ddc4a4848466f6925d962b04aea
üst cc5ec805
......@@ -1483,14 +1483,9 @@ Reference< ui::XAcceleratorConfiguration > SAL_CALL ModuleUIConfigurationManager
if ( m_bDisposed )
throw DisposedException();
Reference< XComponentContext > xContext = m_xContext;
OUString aModule = m_aModuleIdentifier;
if ( !m_xModuleAcceleratorManager.is() )
{
Reference< ui::XAcceleratorConfiguration > xManager = ui::ModuleAcceleratorConfiguration::createWithModuleIdentifier(xContext, aModule);
m_xModuleAcceleratorManager = xManager;
}
m_xModuleAcceleratorManager = ui::ModuleAcceleratorConfiguration::
createWithModuleIdentifier(m_xContext, m_aModuleIdentifier);
return m_xModuleAcceleratorManager;
}
......
......@@ -1178,24 +1178,11 @@ Reference< XAcceleratorConfiguration > SAL_CALL UIConfigurationManager::getShort
// SAFE ->
ResetableGuard aGuard( m_aLock );
if (m_xAccConfig.is())
return m_xAccConfig;
if (!m_xAccConfig.is())
m_xAccConfig = DocumentAcceleratorConfiguration::
createWithDocumentRoot(m_xContext, m_xDocConfigStorage);
Reference< XComponentContext > xContext = m_xContext;
Reference< XStorage > xDocumentRoot = m_xDocConfigStorage;
aGuard.unlock();
// <- SAFE
Reference< XAcceleratorConfiguration > xAccConfig = DocumentAcceleratorConfiguration::createWithDocumentRoot(xContext, xDocumentRoot);
// SAFE ->
aGuard.lock();
m_xAccConfig = xAccConfig;
aGuard.unlock();
// <- SAFE
return xAccConfig;
return m_xAccConfig;
}
Reference< XInterface > SAL_CALL UIConfigurationManager::getEventsManager() throw (::com::sun::star::uno::RuntimeException)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment