From 8ceff95c69cf9bd9ff5ab3a4b5689925b8bd6a59 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Fri, 7 Jun 2024 13:47:06 +0200 Subject: Merging upstream version 4:24.2.4. Signed-off-by: Daniel Baumann --- framework/source/uielement/menubarmanager.cxx | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'framework/source') diff --git a/framework/source/uielement/menubarmanager.cxx b/framework/source/uielement/menubarmanager.cxx index 2abd584348..fd9485a019 100644 --- a/framework/source/uielement/menubarmanager.cxx +++ b/framework/source/uielement/menubarmanager.cxx @@ -660,7 +660,16 @@ IMPL_LINK( MenuBarManager, Activate, Menu *, pMenu, bool ) if ( aTargetURL.Complete.startsWith( ".uno:StyleApply?" ) ) xMenuItemDispatch = new StyleDispatcher( m_xFrame, m_xURLTransformer, aTargetURL ); else - xMenuItemDispatch = xDispatchProvider->queryDispatch( aTargetURL, menuItemHandler->aTargetFrame, 0 ); + { + try + { + xMenuItemDispatch = xDispatchProvider->queryDispatch( aTargetURL, menuItemHandler->aTargetFrame, 0 ); + } + catch (uno::Exception const&) + { + TOOLS_WARN_EXCEPTION("fwk.uielement", "MenuBarManager::Activate(): exception from queryDispatch()"); + } + } bool bPopupMenu( false ); if ( !menuItemHandler->xPopupMenuController.is() && -- cgit v1.2.3