summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick Luby <guibmacdev@gmail.com>2024-11-07 08:52:37 -0500
committerNoel Grandin <noel.grandin@collabora.co.uk>2024-11-08 10:16:43 +0100
commit1e99b33b9ab77874a3483ce6e192a58842794f2a (patch)
treef8eeea3b94545608fc5c60ab9585e14cd9db9bc4
parentcc9b55e8a8f8b8dbc81d17712cd848b1a6dfb206 (diff)
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 <noel.grandin@collabora.co.uk>
-rw-r--r--framework/source/uielement/toolbarmodemenucontroller.cxx2
-rw-r--r--framework/source/uielement/toolbarsmenucontroller.cxx2
-rw-r--r--include/svtools/popupmenucontrollerbase.hxx4
-rw-r--r--svtools/source/uno/popupmenucontrollerbase.cxx2
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<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 );
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<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 );
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<XStatusListener> 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<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) );