From 14596452e781f6a66bcc63b0c447c852df1f2896 Mon Sep 17 00:00:00 2001 From: Tobias Madl Date: Wed, 26 Nov 2014 14:53:25 +0000 Subject: fdo#84938: replace EVENT_ constants with enum Change-Id: I8275832d8dae43b374bddd48520d11592e9a6a1f Reviewed-on: https://gerrit.libreoffice.org/13134 Tested-by: LibreOffice gerrit bot Reviewed-by: Noel Grandin --- extensions/source/bibliography/bibcont.cxx | 2 +- extensions/source/bibliography/toolbar.cxx | 4 ++-- extensions/source/propctrlr/browserlistbox.cxx | 4 ++-- extensions/source/propctrlr/browserview.cxx | 2 +- extensions/source/propctrlr/commoncontrol.cxx | 2 +- extensions/source/propctrlr/standardcontrol.cxx | 6 +++--- extensions/source/propctrlr/standardcontrol.hxx | 2 +- extensions/source/propctrlr/usercontrol.cxx | 2 +- 8 files changed, 12 insertions(+), 12 deletions(-) (limited to 'extensions') diff --git a/extensions/source/bibliography/bibcont.cxx b/extensions/source/bibliography/bibcont.cxx index c7787c49d04e..488a24f4e1ca 100644 --- a/extensions/source/bibliography/bibcont.cxx +++ b/extensions/source/bibliography/bibcont.cxx @@ -212,7 +212,7 @@ void BibBookContainer::GetFocus() bool BibBookContainer::PreNotify( NotifyEvent& rNEvt ) { bool nHandled = false; - if( EVENT_KEYINPUT == rNEvt.GetType() ) + if( MouseNotifyEvent::KEYINPUT == rNEvt.GetType() ) { const KeyEvent* pKEvt = rNEvt.GetKeyEvent(); const vcl::KeyCode aKeyCode = pKEvt->GetKeyCode(); diff --git a/extensions/source/bibliography/toolbar.cxx b/extensions/source/bibliography/toolbar.cxx index d4f433ec763d..86ef53333d13 100644 --- a/extensions/source/bibliography/toolbar.cxx +++ b/extensions/source/bibliography/toolbar.cxx @@ -426,8 +426,8 @@ bool BibToolBar::PreNotify( NotifyEvent& rNEvt ) { bool nResult = true; - sal_uInt16 nSwitch=rNEvt.GetType(); - if(aEdQuery.HasFocus() && nSwitch==EVENT_KEYINPUT) + MouseNotifyEvent nSwitch=rNEvt.GetType(); + if(aEdQuery.HasFocus() && nSwitch==MouseNotifyEvent::KEYINPUT) { const vcl::KeyCode& aKeyCode=rNEvt.GetKeyEvent()->GetKeyCode(); sal_uInt16 nKey = aKeyCode.GetCode(); diff --git a/extensions/source/propctrlr/browserlistbox.cxx b/extensions/source/propctrlr/browserlistbox.cxx index 66664193ad9b..c43a058f4fb8 100644 --- a/extensions/source/propctrlr/browserlistbox.cxx +++ b/extensions/source/propctrlr/browserlistbox.cxx @@ -1205,7 +1205,7 @@ namespace pcr { switch ( _rNEvt.GetType() ) { - case EVENT_KEYINPUT: + case MouseNotifyEvent::KEYINPUT: { const KeyEvent* pKeyEvent = _rNEvt.GetKeyEvent(); if ( ( pKeyEvent->GetKeyCode().GetModifier() != 0 ) @@ -1263,7 +1263,7 @@ namespace pcr { switch ( _rNEvt.GetType() ) { - case EVENT_COMMAND: + case MouseNotifyEvent::COMMAND: { const CommandEvent* pCommand = _rNEvt.GetCommandEvent(); if ( ( COMMAND_WHEEL == pCommand->GetCommand() ) diff --git a/extensions/source/propctrlr/browserview.cxx b/extensions/source/propctrlr/browserview.cxx index f56532cab6d0..4179cbe8e3ed 100644 --- a/extensions/source/propctrlr/browserview.cxx +++ b/extensions/source/propctrlr/browserview.cxx @@ -83,7 +83,7 @@ namespace pcr bool OPropertyBrowserView::Notify( NotifyEvent& _rNEvt ) { - if ( EVENT_KEYINPUT == _rNEvt.GetType() ) + if ( MouseNotifyEvent::KEYINPUT == _rNEvt.GetType() ) { sal_uInt16 nKey = _rNEvt.GetKeyEvent()->GetKeyCode().GetCode(); diff --git a/extensions/source/propctrlr/commoncontrol.cxx b/extensions/source/propctrlr/commoncontrol.cxx index 0e95203be50a..ac33ace00daa 100644 --- a/extensions/source/propctrlr/commoncontrol.cxx +++ b/extensions/source/propctrlr/commoncontrol.cxx @@ -128,7 +128,7 @@ namespace pcr bool ControlHelper::handlePreNotify(NotifyEvent& rNEvt) { - if (EVENT_KEYINPUT == rNEvt.GetType()) + if (MouseNotifyEvent::KEYINPUT == rNEvt.GetType()) { const vcl::KeyCode& aKeyCode = rNEvt.GetKeyEvent()->GetKeyCode(); sal_uInt16 nKey = aKeyCode.GetCode(); diff --git a/extensions/source/propctrlr/standardcontrol.cxx b/extensions/source/propctrlr/standardcontrol.cxx index 60d64a91e43a..4e1c60037db1 100644 --- a/extensions/source/propctrlr/standardcontrol.cxx +++ b/extensions/source/propctrlr/standardcontrol.cxx @@ -993,8 +993,8 @@ namespace pcr { bool nResult = true; - sal_uInt16 nSwitch = _rNEvt.GetType(); - if (EVENT_KEYINPUT == nSwitch) + MouseNotifyEvent nSwitch = _rNEvt.GetType(); + if (MouseNotifyEvent::KEYINPUT == nSwitch) { const vcl::KeyCode& aKeyCode = _rNEvt.GetKeyEvent()->GetKeyCode(); sal_uInt16 nKey = aKeyCode.GetCode(); @@ -1099,7 +1099,7 @@ namespace pcr { bool nResult = true; - if (rNEvt.GetType() == EVENT_KEYINPUT) + if (rNEvt.GetType() == MouseNotifyEvent::KEYINPUT) { const vcl::KeyCode& aKeyCode = rNEvt.GetKeyEvent()->GetKeyCode(); sal_uInt16 nKey = aKeyCode.GetCode(); diff --git a/extensions/source/propctrlr/standardcontrol.hxx b/extensions/source/propctrlr/standardcontrol.hxx index fdfb1dc638d1..a78b43ed0359 100644 --- a/extensions/source/propctrlr/standardcontrol.hxx +++ b/extensions/source/propctrlr/standardcontrol.hxx @@ -73,7 +73,7 @@ namespace pcr template< class LISTBOX_WINDOW > bool ListLikeControlWithModifyHandler< LISTBOX_WINDOW >::PreNotify( NotifyEvent& _rNEvt ) { - if ( _rNEvt.GetType() == EVENT_KEYINPUT ) + if ( _rNEvt.GetType() == MouseNotifyEvent::KEYINPUT ) { const ::KeyEvent* pKeyEvent = _rNEvt.GetKeyEvent(); if ( ( pKeyEvent->GetKeyCode().GetModifier() == 0 ) diff --git a/extensions/source/propctrlr/usercontrol.cxx b/extensions/source/propctrlr/usercontrol.cxx index f26035c1d1c6..783e43c84a49 100644 --- a/extensions/source/propctrlr/usercontrol.cxx +++ b/extensions/source/propctrlr/usercontrol.cxx @@ -48,7 +48,7 @@ namespace pcr bool NumberFormatSampleField::PreNotify( NotifyEvent& rNEvt ) { // want to handle two keys myself : Del/Backspace should empty the window (setting my prop to "standard" this way) - if (EVENT_KEYINPUT == rNEvt.GetType()) + if (MouseNotifyEvent::KEYINPUT == rNEvt.GetType()) { sal_uInt16 nKey = rNEvt.GetKeyEvent()->GetKeyCode().GetCode(); -- cgit