From ad5e8b30ac66a00d0110fcdaf4d064181247585b Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Sat, 4 Oct 2014 20:11:40 +0200 Subject: fix for invalid dynamic_cast after my loplugin-cstylecast commits. this is a follow on to the bug reported in fdo#84608 Change-Id: Icc4f4baf3690e939c07a71a949200270bf1f4614 --- toolkit/source/awt/vclxtopwindow.cxx | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'toolkit') diff --git a/toolkit/source/awt/vclxtopwindow.cxx b/toolkit/source/awt/vclxtopwindow.cxx index 21386aedb3ec..48b593eb37fb 100644 --- a/toolkit/source/awt/vclxtopwindow.cxx +++ b/toolkit/source/awt/vclxtopwindow.cxx @@ -147,15 +147,16 @@ void VCLXTopWindow_Base::setMenuBar( const ::com::sun::star::uno::Reference< ::c { SolarMutexGuard aGuard; - SystemWindow* pWindow = dynamic_cast( GetWindowImpl() ); + vcl::Window* pWindow = GetWindowImpl(); if ( pWindow ) { - pWindow->SetMenuBar( NULL ); + SystemWindow* pSystemWindow = static_cast( pWindow ); + pSystemWindow->SetMenuBar( NULL ); if ( rxMenu.is() ) { VCLXMenu* pMenu = VCLXMenu::GetImplementation( rxMenu ); if ( pMenu && !pMenu->IsPopupMenu() ) - pWindow->SetMenuBar( static_cast( pMenu->GetMenu() )); + pSystemWindow->SetMenuBar( static_cast( pMenu->GetMenu() )); } } mxMenuBar = rxMenu; -- cgit v1.2.3