diff options
author | Noel Grandin <noel@peralex.com> | 2014-09-19 15:17:37 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2014-09-29 12:50:34 +0200 |
commit | 26f2da07b1c6074e519d28557a3d1d5518ff6cb4 (patch) | |
tree | 6981a11bc7e6fc897771277a7b60a6e3a88cff29 /vcl/source/window/menubarwindow.cxx | |
parent | d9632a6effabe8554c4e7e05ee24c16acd0f4f95 (diff) |
loplugin: cstylecast
Change-Id: I58ec00d6f8a4cc6188877db1330c5e32c9db12e5
Diffstat (limited to 'vcl/source/window/menubarwindow.cxx')
-rw-r--r-- | vcl/source/window/menubarwindow.cxx | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/vcl/source/window/menubarwindow.cxx b/vcl/source/window/menubarwindow.cxx index c9770ca813f5..840c5e19e83c 100644 --- a/vcl/source/window/menubarwindow.cxx +++ b/vcl/source/window/menubarwindow.cxx @@ -223,7 +223,7 @@ IMPL_LINK_NOARG(MenuBarWindow, CloseHdl) // #i106052# call close hdl asynchronously to ease handler implementation // this avoids still being in the handler while the DecoToolBox already // gets destroyed - Application::PostUserEvent(((MenuBar*)pMenu)->GetCloseButtonClickHdl(), pMenu); + Application::PostUserEvent(static_cast<MenuBar*>(pMenu)->GetCloseButtonClickHdl(), pMenu); } else { @@ -278,12 +278,12 @@ IMPL_LINK( MenuBarWindow, ShowHideListener, VclWindowEvent*, pEvent ) IMPL_LINK_NOARG(MenuBarWindow, FloatHdl) { - return pMenu ? ((MenuBar*)pMenu)->GetFloatButtonClickHdl().Call( pMenu ) : 0; + return pMenu ? static_cast<MenuBar*>(pMenu)->GetFloatButtonClickHdl().Call( pMenu ) : 0; } IMPL_LINK_NOARG(MenuBarWindow, HideHdl) { - return pMenu ? ((MenuBar*)pMenu)->GetHideButtonClickHdl().Call( pMenu ) : 0; + return pMenu ? static_cast<MenuBar*>(pMenu)->GetHideButtonClickHdl().Call( pMenu ) : 0; } void MenuBarWindow::ImplCreatePopup( bool bPreSelectFirst ) @@ -296,9 +296,10 @@ void MenuBarWindow::ImplCreatePopup( bool bPreSelectFirst ) { KillActivePopup(); } - if ( pItemData->bEnabled && pItemData->pSubMenu && ( nHighlightedItem != ITEMPOS_INVALID ) && ( pItemData->pSubMenu != pActivePopup ) ) + if ( pItemData->bEnabled && pItemData->pSubMenu && ( nHighlightedItem != ITEMPOS_INVALID ) && + ( pItemData->pSubMenu != pActivePopup ) ) { - pActivePopup = (PopupMenu*)pItemData->pSubMenu; + pActivePopup = static_cast<PopupMenu*>(pItemData->pSubMenu); long nX = 0; MenuItemData* pData = 0; for ( sal_uLong n = 0; n < nHighlightedItem; n++ ) @@ -341,7 +342,7 @@ void MenuBarWindow::KillActivePopup() if ( pActivePopup ) { if( pActivePopup->pWindow != NULL ) - if( ((FloatingWindow *) pActivePopup->pWindow)->IsInCleanUp() ) + if( static_cast<FloatingWindow *>(pActivePopup->pWindow)->IsInCleanUp() ) return; // kill it later if ( pActivePopup->bInCallback ) @@ -713,7 +714,7 @@ bool MenuBarWindow::HandleKeyEvent( const KeyEvent& rKEvent, bool bFromMenu ) { if( GetParent()->GetWindow( WINDOW_CLIENT )->IsSystemWindow() ) { - SystemWindow *pSysWin = (SystemWindow*)GetParent()->GetWindow( WINDOW_CLIENT ); + SystemWindow *pSysWin = static_cast<SystemWindow*>(GetParent()->GetWindow( WINDOW_CLIENT )); if( pSysWin->GetTaskPaneList() ) if( pSysWin->GetTaskPaneList()->HandleKeyEvent( rKEvent ) ) return true; @@ -1000,7 +1001,7 @@ void MenuBarWindow::LayoutChanged() // depending on the native implementation or the displayable flag // the menubar windows is suppressed (ie, height=0) - if( !((MenuBar*) pMenu)->IsDisplayable() || + if( !static_cast<MenuBar*>(pMenu)->IsDisplayable() || ( pMenu->ImplGetSalMenu() && pMenu->ImplGetSalMenu()->VisibleMenuBar() ) ) nHeight = 0; |