From 1e99b33b9ab77874a3483ce6e192a58842794f2a Mon Sep 17 00:00:00 2001 From: Patrick Luby Date: Thu, 7 Nov 2024 08:52:37 -0500 Subject: [PATCH] Revert commit 2fe53b2e436cb236b2dc121ceec4f22de49a13a8 Commit 709b1f3ddb87303a2dec6155dbe0106369c151ed fixes the root cause of the crash during a dynamic_cast so revert commit 709b1f3ddb87303a2dec6155dbe0106369c151ed as it was merely a workaround and is no longer needed. Change-Id: Ia052913eba7fd4d979054ea6a644f4ff9791277c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176217 Tested-by: Jenkins Reviewed-by: Noel Grandin --- framework/source/uielement/toolbarmodemenucontroller.cxx | 2 +- framework/source/uielement/toolbarsmenucontroller.cxx | 2 +- include/svtools/popupmenucontrollerbase.hxx | 4 ++-- svtools/source/uno/popupmenucontrollerbase.cxx | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/framework/source/uielement/toolbarmodemenucontroller.cxx b/framework/source/uielement/toolbarmodemenucontroller.cxx index 11bf5d787866..1b6c9964b698 100644 --- a/framework/source/uielement/toolbarmodemenucontroller.cxx +++ b/framework/source/uielement/toolbarmodemenucontroller.cxx @@ -274,7 +274,7 @@ void SAL_CALL ToolbarModeMenuController::setPopupMenu( const Reference< css::awt // Create popup menu on demand SolarMutexGuard aSolarMutexGuard; - m_xPopupMenu = dynamic_cast(xPopupMenu.get()); + m_xPopupMenu = dynamic_cast(xPopupMenu.get()); assert(bool(xPopupMenu) == bool(m_xPopupMenu) && "we only support VCLXPopupMenu"); m_xPopupMenu->addMenuListener( Reference< css::awt::XMenuListener >(this) ); fillPopupMenu( m_xPopupMenu ); diff --git a/framework/source/uielement/toolbarsmenucontroller.cxx b/framework/source/uielement/toolbarsmenucontroller.cxx index 764702adadc1..387eef47590b 100644 --- a/framework/source/uielement/toolbarsmenucontroller.cxx +++ b/framework/source/uielement/toolbarsmenucontroller.cxx @@ -706,7 +706,7 @@ void SAL_CALL ToolbarsMenuController::setPopupMenu( const Reference< css::awt::X // Create popup menu on demand SolarMutexGuard aSolarMutexGuard; - m_xPopupMenu = dynamic_cast(xPopupMenu.get()); + m_xPopupMenu = dynamic_cast(xPopupMenu.get()); assert(bool(xPopupMenu) == bool(m_xPopupMenu) && "we only support VCLXPopupMenu"); m_xPopupMenu->addMenuListener( Reference< css::awt::XMenuListener >(this) ); fillPopupMenu( m_xPopupMenu ); diff --git a/include/svtools/popupmenucontrollerbase.hxx b/include/svtools/popupmenucontrollerbase.hxx index b3b7bee4a1f3..228fd5bd4c8f 100644 --- a/include/svtools/popupmenucontrollerbase.hxx +++ b/include/svtools/popupmenucontrollerbase.hxx @@ -37,7 +37,7 @@ namespace com :: sun :: star :: frame { class XFrame; } namespace com :: sun :: star :: uno { class XComponentContext; } namespace com :: sun :: star :: util { class XURLTransformer; } -class VCLXMenu; +class VCLXPopupMenu; namespace svt { @@ -118,7 +118,7 @@ namespace svt css::uno::Reference< css::frame::XDispatch > m_xDispatch; css::uno::Reference< css::frame::XFrame > m_xFrame; css::uno::Reference< css::util::XURLTransformer > m_xURLTransformer; - rtl::Reference< VCLXMenu > m_xPopupMenu; + rtl::Reference< VCLXPopupMenu > m_xPopupMenu; comphelper::OInterfaceContainerHelper4 maStatusListeners; }; } diff --git a/svtools/source/uno/popupmenucontrollerbase.cxx b/svtools/source/uno/popupmenucontrollerbase.cxx index 02d09d7d82a7..ab6bee1a0555 100644 --- a/svtools/source/uno/popupmenucontrollerbase.cxx +++ b/svtools/source/uno/popupmenucontrollerbase.cxx @@ -343,7 +343,7 @@ void SAL_CALL PopupMenuControllerBase::setPopupMenu( const Reference< awt::XPopu // Create popup menu on demand SolarMutexGuard aSolarMutexGuard; - m_xPopupMenu = dynamic_cast(xPopupMenu.get()); + m_xPopupMenu = dynamic_cast(xPopupMenu.get()); assert(bool(xPopupMenu) == bool(m_xPopupMenu) && "we only support VCLXPopupMenu"); m_xPopupMenu->addMenuListener( Reference< awt::XMenuListener >(this) );