Commit 709b1f3ddb fixes the
root cause of the crash during a dynamic_cast so revert
commit 709b1f3ddb 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 <noel.grandin@collabora.co.uk>
This commit is contained in:
Patrick Luby 2024-11-07 08:52:37 -05:00 committed by Noel Grandin
parent cc9b55e8a8
commit 1e99b33b9a
4 changed files with 5 additions and 5 deletions

View file

@ -274,7 +274,7 @@ void SAL_CALL ToolbarModeMenuController::setPopupMenu( const Reference< css::awt
// Create popup menu on demand
SolarMutexGuard aSolarMutexGuard;
m_xPopupMenu = dynamic_cast<VCLXMenu*>(xPopupMenu.get());
m_xPopupMenu = dynamic_cast<VCLXPopupMenu*>(xPopupMenu.get());
assert(bool(xPopupMenu) == bool(m_xPopupMenu) && "we only support VCLXPopupMenu");
m_xPopupMenu->addMenuListener( Reference< css::awt::XMenuListener >(this) );
fillPopupMenu( m_xPopupMenu );

View file

@ -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<VCLXMenu*>(xPopupMenu.get());
m_xPopupMenu = dynamic_cast<VCLXPopupMenu*>(xPopupMenu.get());
assert(bool(xPopupMenu) == bool(m_xPopupMenu) && "we only support VCLXPopupMenu");
m_xPopupMenu->addMenuListener( Reference< css::awt::XMenuListener >(this) );
fillPopupMenu( m_xPopupMenu );

View file

@ -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<XStatusListener> maStatusListeners;
};
}

View file

@ -343,7 +343,7 @@ void SAL_CALL PopupMenuControllerBase::setPopupMenu( const Reference< awt::XPopu
// Create popup menu on demand
SolarMutexGuard aSolarMutexGuard;
m_xPopupMenu = dynamic_cast<VCLXMenu*>(xPopupMenu.get());
m_xPopupMenu = dynamic_cast<VCLXPopupMenu*>(xPopupMenu.get());
assert(bool(xPopupMenu) == bool(m_xPopupMenu) && "we only support VCLXPopupMenu");
m_xPopupMenu->addMenuListener( Reference< awt::XMenuListener >(this) );