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
This commit is contained in:
parent
552adfbbc6
commit
ad5e8b30ac
@ -147,15 +147,16 @@ void VCLXTopWindow_Base::setMenuBar( const ::com::sun::star::uno::Reference< ::c
|
||||
{
|
||||
SolarMutexGuard aGuard;
|
||||
|
||||
SystemWindow* pWindow = dynamic_cast<SystemWindow*>( GetWindowImpl() );
|
||||
vcl::Window* pWindow = GetWindowImpl();
|
||||
if ( pWindow )
|
||||
{
|
||||
pWindow->SetMenuBar( NULL );
|
||||
SystemWindow* pSystemWindow = static_cast<SystemWindow*>( pWindow );
|
||||
pSystemWindow->SetMenuBar( NULL );
|
||||
if ( rxMenu.is() )
|
||||
{
|
||||
VCLXMenu* pMenu = VCLXMenu::GetImplementation( rxMenu );
|
||||
if ( pMenu && !pMenu->IsPopupMenu() )
|
||||
pWindow->SetMenuBar( static_cast<MenuBar*>( pMenu->GetMenu() ));
|
||||
pSystemWindow->SetMenuBar( static_cast<MenuBar*>( pMenu->GetMenu() ));
|
||||
}
|
||||
}
|
||||
mxMenuBar = rxMenu;
|
||||
|
@ -80,7 +80,7 @@ void MenuFloatingWindow::doShutdown()
|
||||
}
|
||||
if( i < nCount )
|
||||
{
|
||||
MenuFloatingWindow* pPWin = dynamic_cast<MenuFloatingWindow*>(pMenu->pStartedFrom->ImplGetWindow());
|
||||
MenuFloatingWindow* pPWin = static_cast<MenuFloatingWindow*>(pMenu->pStartedFrom->ImplGetWindow());
|
||||
if( pPWin )
|
||||
pPWin->HighlightItem( i, false );
|
||||
}
|
||||
@ -682,7 +682,7 @@ void MenuFloatingWindow::ChangeHighlightItem( sal_uInt16 n, bool bStartPopupTime
|
||||
}
|
||||
if( i < nCount )
|
||||
{
|
||||
MenuFloatingWindow* pPWin = dynamic_cast<MenuFloatingWindow*>(pMenu->pStartedFrom->ImplGetWindow());
|
||||
MenuFloatingWindow* pPWin = static_cast<MenuFloatingWindow*>(pMenu->pStartedFrom->ImplGetWindow());
|
||||
if( pPWin && pPWin->nHighlightedItem != i )
|
||||
{
|
||||
pPWin->HighlightItem( i, true );
|
||||
|
Loading…
x
Reference in New Issue
Block a user