diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2015-03-26 15:31:36 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2015-03-26 15:33:37 +0100 |
commit | 0d05f417c3a7dcde89f5e15b29f39ce2db65b543 (patch) | |
tree | 52f3890d679ef16bdd74c075a0e89f7cc036b087 /svtools/source/contnr/ivctrl.cxx | |
parent | 3b9e0676b0a193dbf802a6b703827c9cc0689900 (diff) |
const_cast: convert some C-style casts and remove some redundant ones
Change-Id: Iabe2ecce65a91b003fe042a22630131449968fd8
Diffstat (limited to 'svtools/source/contnr/ivctrl.cxx')
-rw-r--r-- | svtools/source/contnr/ivctrl.cxx | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/svtools/source/contnr/ivctrl.cxx b/svtools/source/contnr/ivctrl.cxx index 0ced60f2dfd3..ce1c05c49f64 100644 --- a/svtools/source/contnr/ivctrl.cxx +++ b/svtools/source/contnr/ivctrl.cxx @@ -231,7 +231,7 @@ SvxIconChoiceCtrlEntry* SvtIconChoiceCtrl::GetEntry( const Point& rPixPos, bool { Point aPos( rPixPos ); aPos -= GetMapMode().GetOrigin(); - return ((SvtIconChoiceCtrl*)this)->_pImp->GetEntry( aPos, bHit ); + return const_cast<SvtIconChoiceCtrl*>(this)->_pImp->GetEntry( aPos, bHit ); } void SvtIconChoiceCtrl::SetStyle( WinBits nWinStyle ) @@ -296,7 +296,7 @@ void SvtIconChoiceCtrl::KeyInput( const KeyEvent& rKEvt ) bool bKeyUsed = DoKeyInput( rKEvt ); if ( !bKeyUsed ) { - _pCurKeyEvent = (KeyEvent*)&rKEvt; + _pCurKeyEvent = const_cast<KeyEvent*>(&rKEvt); Control::KeyInput( rKEvt ); _pCurKeyEvent = NULL; } @@ -306,7 +306,7 @@ bool SvtIconChoiceCtrl::DoKeyInput( const KeyEvent& rKEvt ) // under OS/2, we get key up/down even while editing if( IsEntryEditing() ) return true; - _pCurKeyEvent = (KeyEvent*)&rKEvt; + _pCurKeyEvent = const_cast<KeyEvent*>(&rKEvt); bool bHandled = _pImp->KeyInput( rKEvt ); _pCurKeyEvent = NULL; return bHandled; |