diff options
author | Matúš Kukan <matus.kukan@collabora.com> | 2014-02-10 11:30:52 +0100 |
---|---|---|
committer | Matúš Kukan <matus.kukan@collabora.com> | 2014-02-10 16:43:54 +0100 |
commit | e034b0323c7e5494a01abc0d1deab4fb2727bd9f (patch) | |
tree | 80aaf130e9fc292b098a5f68f93bbba80f4ffde9 /framework | |
parent | cc5ec80521546cddd0ce12fcd25becbcf2c7d2a5 (diff) |
Simplify the code a bit.
Change-Id: I57581fb0f3439ddc4a4848466f6925d962b04aea
Diffstat (limited to 'framework')
-rw-r--r-- | framework/source/uiconfiguration/moduleuiconfigurationmanager.cxx | 9 | ||||
-rw-r--r-- | framework/source/uiconfiguration/uiconfigurationmanager.cxx | 21 |
2 files changed, 6 insertions, 24 deletions
diff --git a/framework/source/uiconfiguration/moduleuiconfigurationmanager.cxx b/framework/source/uiconfiguration/moduleuiconfigurationmanager.cxx index 981e6c6b9045..e4b302e07dca 100644 --- a/framework/source/uiconfiguration/moduleuiconfigurationmanager.cxx +++ b/framework/source/uiconfiguration/moduleuiconfigurationmanager.cxx @@ -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; } diff --git a/framework/source/uiconfiguration/uiconfigurationmanager.cxx b/framework/source/uiconfiguration/uiconfigurationmanager.cxx index 845233fdab82..f34e7cb3dcd8 100644 --- a/framework/source/uiconfiguration/uiconfigurationmanager.cxx +++ b/framework/source/uiconfiguration/uiconfigurationmanager.cxx @@ -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) |