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

Do not throw if AcceleratorConfigurations are missing.

Which can happen on mobile platforms if we don't want them.

Change-Id: I53639ccc75886708850d2d3a01eec76104b7f2c9
üst e034b032
......@@ -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;
}
......
......@@ -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;
}
......
......@@ -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;
......
......@@ -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;
......
......@@ -197,6 +197,7 @@ certain functionality.
@li @c fwk.joburl
@li @c fwk.loadenv
@li @c fwk.session
@li @c fwk.uiconfiguration
@li @c fwk.uielement
@section i18nlangtag
......
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