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/dlgctrl.cxx | |
parent | d9632a6effabe8554c4e7e05ee24c16acd0f4f95 (diff) |
loplugin: cstylecast
Change-Id: I58ec00d6f8a4cc6188877db1330c5e32c9db12e5
Diffstat (limited to 'vcl/source/window/dlgctrl.cxx')
-rw-r--r-- | vcl/source/window/dlgctrl.cxx | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/vcl/source/window/dlgctrl.cxx b/vcl/source/window/dlgctrl.cxx index a43247d71313..77ac0f17f029 100644 --- a/vcl/source/window/dlgctrl.cxx +++ b/vcl/source/window/dlgctrl.cxx @@ -95,7 +95,7 @@ static vcl::Window* ImplGetSubChildWindow( vcl::Window* pParent, sal_uInt16 n, s // for a TabControl, remember the current TabPage for later use if ( pWindow->GetType() == WINDOW_TABCONTROL ) { - TabControl* pTabControl = ((TabControl*)pWindow); + TabControl* pTabControl = static_cast<TabControl*>(pWindow); // Check if the TabPage is a Child of the TabControl and still exists (by // walking all child windows); because it could be that the TabPage has been // destroyed already by a Dialog-Dtor, event that the TabControl still exists. @@ -480,8 +480,8 @@ void Window::ImplControlFocus( sal_uInt16 nFlags ) { if ( GetType() == WINDOW_RADIOBUTTON ) { - if ( !((RadioButton*)this)->IsChecked() ) - ((RadioButton*)this)->ImplCallClick( true, nFlags ); + if ( !static_cast<RadioButton*>(this)->IsChecked() ) + static_cast<RadioButton*>(this)->ImplCallClick( true, nFlags ); else ImplGrabFocus( nFlags ); } @@ -491,12 +491,12 @@ void Window::ImplControlFocus( sal_uInt16 nFlags ) if ( nFlags & GETFOCUS_UNIQUEMNEMONIC ) { if ( GetType() == WINDOW_CHECKBOX ) - ((CheckBox*)this)->ImplCheck(); + static_cast<CheckBox*>(this)->ImplCheck(); else if ( mpWindowImpl->mbPushButton ) { - ((PushButton*)this)->SetPressed( true ); - ((PushButton*)this)->SetPressed( false ); - ((PushButton*)this)->Click(); + static_cast<PushButton*>(this)->SetPressed( true ); + static_cast<PushButton*>(this)->SetPressed( false ); + static_cast<PushButton*>(this)->Click(); } } } @@ -505,8 +505,8 @@ void Window::ImplControlFocus( sal_uInt16 nFlags ) { if ( GetType() == WINDOW_RADIOBUTTON ) { - if ( !((RadioButton*)this)->IsChecked() ) - ((RadioButton*)this)->ImplCallClick( true, nFlags ); + if ( !static_cast<RadioButton*>(this)->IsChecked() ) + static_cast<RadioButton*>(this)->ImplCallClick( true, nFlags ); else ImplGrabFocus( nFlags ); } @@ -718,7 +718,7 @@ bool Window::ImplDlgCtrl( const KeyEvent& rKEvt, bool bKeyInput ) { if ( mpWindowImpl->mpDlgCtrlDownWindow != pButtonWindow ) { - ((PushButton*)mpWindowImpl->mpDlgCtrlDownWindow)->SetPressed( false ); + static_cast<PushButton*>(mpWindowImpl->mpDlgCtrlDownWindow)->SetPressed( false ); mpWindowImpl->mpDlgCtrlDownWindow = NULL; return true; } @@ -930,18 +930,18 @@ bool Window::ImplDlgCtrl( const KeyEvent& rKEvt, bool bKeyInput ) { if ( mpWindowImpl->mpDlgCtrlDownWindow && (mpWindowImpl->mpDlgCtrlDownWindow != pButtonWindow) ) { - ((PushButton*)mpWindowImpl->mpDlgCtrlDownWindow)->SetPressed( false ); + static_cast<PushButton*>(mpWindowImpl->mpDlgCtrlDownWindow)->SetPressed( false ); mpWindowImpl->mpDlgCtrlDownWindow = NULL; } - ((PushButton*)pButtonWindow)->SetPressed( true ); + static_cast<PushButton*>(pButtonWindow)->SetPressed( true ); mpWindowImpl->mpDlgCtrlDownWindow = pButtonWindow; } else if ( mpWindowImpl->mpDlgCtrlDownWindow == pButtonWindow ) { mpWindowImpl->mpDlgCtrlDownWindow = NULL; - ((PushButton*)pButtonWindow)->SetPressed( false ); - ((PushButton*)pButtonWindow)->Click(); + static_cast<PushButton*>(pButtonWindow)->SetPressed( false ); + static_cast<PushButton*>(pButtonWindow)->Click(); } return true; @@ -1022,7 +1022,7 @@ static void ImplDlgCtrlUpdateDefButton( vcl::Window* pParent, vcl::Window* pFocu { if ( pSWindow->ImplIsPushButton() ) { - PushButton* pPushButton = (PushButton*)pSWindow; + PushButton* pPushButton = static_cast<PushButton*>(pSWindow); if ( pPushButton->ImplIsDefButton() ) pOldDefButton = pPushButton; if ( pPushButton->HasChildPathFocus() ) @@ -1060,7 +1060,7 @@ void Window::ImplDlgCtrlFocusChanged( vcl::Window* pWindow, bool bGetFocus ) { if ( mpWindowImpl->mpDlgCtrlDownWindow && !bGetFocus ) { - ((PushButton*)mpWindowImpl->mpDlgCtrlDownWindow)->SetPressed( false ); + static_cast<PushButton*>(mpWindowImpl->mpDlgCtrlDownWindow)->SetPressed( false ); mpWindowImpl->mpDlgCtrlDownWindow = NULL; } |