diff options
author | Matúš Kukan <matus.kukan@collabora.com> | 2014-02-10 11:49:18 +0100 |
---|---|---|
committer | Matúš Kukan <matus.kukan@collabora.com> | 2014-02-10 16:43:54 +0100 |
commit | d55495daf9b412eacc271860788ad822e99e57c1 (patch) | |
tree | d0acb298707e4f3776ffed1192fed7bdb9aa434d /framework | |
parent | e034b0323c7e5494a01abc0d1deab4fb2727bd9f (diff) |
Do not throw if AcceleratorConfigurations are missing.
Which can happen on mobile platforms if we don't want them.
Change-Id: I53639ccc75886708850d2d3a01eec76104b7f2c9
Diffstat (limited to 'framework')
4 files changed, 28 insertions, 4 deletions
diff --git a/framework/source/uiconfiguration/moduleuiconfigurationmanager.cxx b/framework/source/uiconfiguration/moduleuiconfigurationmanager.cxx index e4b302e07dca..1bbcc39603be 100644 --- a/framework/source/uiconfiguration/moduleuiconfigurationmanager.cxx +++ b/framework/source/uiconfiguration/moduleuiconfigurationmanager.cxx @@ -1483,9 +1483,16 @@ Reference< ui::XAcceleratorConfiguration > SAL_CALL ModuleUIConfigurationManager if ( m_bDisposed ) throw DisposedException(); - if ( !m_xModuleAcceleratorManager.is() ) + if ( !m_xModuleAcceleratorManager.is() ) try + { m_xModuleAcceleratorManager = ui::ModuleAcceleratorConfiguration:: createWithModuleIdentifier(m_xContext, m_aModuleIdentifier); + } + catch ( const css::uno::DeploymentException& ) + { + SAL_WARN("fwk.uiconfiguration", "ModuleAcceleratorConfiguration" + " not available. This should happen only on mobile platforms."); + } return m_xModuleAcceleratorManager; } diff --git a/framework/source/uiconfiguration/uiconfigurationmanager.cxx b/framework/source/uiconfiguration/uiconfigurationmanager.cxx index f34e7cb3dcd8..b3f30787ff5d 100644 --- a/framework/source/uiconfiguration/uiconfigurationmanager.cxx +++ b/framework/source/uiconfiguration/uiconfigurationmanager.cxx @@ -1178,9 +1178,16 @@ Reference< XAcceleratorConfiguration > SAL_CALL UIConfigurationManager::getShort // SAFE -> ResetableGuard aGuard( m_aLock ); - if (!m_xAccConfig.is()) + if (!m_xAccConfig.is()) try + { m_xAccConfig = DocumentAcceleratorConfiguration:: createWithDocumentRoot(m_xContext, m_xDocConfigStorage); + } + catch ( const css::uno::DeploymentException& ) + { + SAL_WARN("fwk.uiconfiguration", "DocumentAcceleratorConfiguration" + " not available. This should happen only on mobile platforms."); + } return m_xAccConfig; } diff --git a/framework/source/uielement/menubarmanager.cxx b/framework/source/uielement/menubarmanager.cxx index 7504d07edb1f..736c2d5fe3f6 100644 --- a/framework/source/uielement/menubarmanager.cxx +++ b/framework/source/uielement/menubarmanager.cxx @@ -1542,11 +1542,16 @@ void MenuBarManager::RetrieveShortcuts( std::vector< MenuItemHandler* >& aMenuSh } } - if ( !xGlobalAccelCfg.is() ) + if ( !xGlobalAccelCfg.is() ) try { xGlobalAccelCfg = GlobalAcceleratorConfiguration::create( m_xContext ); m_xGlobalAcceleratorManager = xGlobalAccelCfg; } + catch ( const css::uno::DeploymentException& ) + { + SAL_WARN("fwk.uielement", "GlobalAcceleratorConfiguration" + " not available. This should happen only on mobile platforms."); + } } KeyCode aEmptyKeyCode; diff --git a/framework/source/uielement/toolbarmanager.cxx b/framework/source/uielement/toolbarmanager.cxx index 1b4417467c94..49bb97325861 100644 --- a/framework/source/uielement/toolbarmanager.cxx +++ b/framework/source/uielement/toolbarmanager.cxx @@ -2229,11 +2229,16 @@ bool ToolBarManager::RetrieveShortcut( const OUString& rCommandURL, OUString& rS } } - if ( !xGlobalAccelCfg.is() ) + if ( !xGlobalAccelCfg.is() ) try { xGlobalAccelCfg = GlobalAcceleratorConfiguration::create( m_xContext ); m_xGlobalAcceleratorManager = xGlobalAccelCfg; } + catch ( const css::uno::DeploymentException& ) + { + SAL_WARN("fwk.uielement", "GlobalAcceleratorConfiguration" + " not available. This should happen only on mobile platforms."); + } } bool bFound = false; |