diff options
author | Tobias Madl <tobias.madl.dev@gmail.com> | 2014-11-26 14:53:25 +0000 |
---|---|---|
committer | Noel Grandin <noelgrandin@gmail.com> | 2014-12-01 07:43:31 +0000 |
commit | 14596452e781f6a66bcc63b0c447c852df1f2896 (patch) | |
tree | c225569f229679084b081021c8c51cfdaf12eb21 /sc | |
parent | 96ec51292301a105effacfcceec44f696ee6e0f0 (diff) |
fdo#84938: replace EVENT_ constants with enum
Change-Id: I8275832d8dae43b374bddd48520d11592e9a6a1f
Reviewed-on: https://gerrit.libreoffice.org/13134
Tested-by: LibreOffice gerrit bot <gerrit@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'sc')
-rw-r--r-- | sc/source/ui/app/inputwin.cxx | 6 | ||||
-rw-r--r-- | sc/source/ui/cctrl/checklistmenu.cxx | 2 | ||||
-rw-r--r-- | sc/source/ui/condformat/condformatdlgentry.cxx | 2 | ||||
-rw-r--r-- | sc/source/ui/miscdlgs/acredlin.cxx | 2 | ||||
-rw-r--r-- | sc/source/ui/miscdlgs/anyrefdg.cxx | 4 | ||||
-rw-r--r-- | sc/source/ui/navipi/navipi.cxx | 10 | ||||
-rw-r--r-- | sc/source/ui/navipi/scenwnd.cxx | 4 | ||||
-rw-r--r-- | sc/source/ui/pagedlg/tphfedit.cxx | 4 | ||||
-rw-r--r-- | sc/source/ui/view/gridwin.cxx | 10 |
9 files changed, 22 insertions, 22 deletions
diff --git a/sc/source/ui/app/inputwin.cxx b/sc/source/ui/app/inputwin.cxx index 7a1a84fb711b..6e4a2389bb3e 100644 --- a/sc/source/ui/app/inputwin.cxx +++ b/sc/source/ui/app/inputwin.cxx @@ -2452,7 +2452,7 @@ bool ScPosWnd::Notify( NotifyEvent& rNEvt ) switch (rNEvt.GetType()) { - case EVENT_KEYINPUT: + case MouseNotifyEvent::KEYINPUT: { const KeyEvent* pKEvt = rNEvt.GetKeyEvent(); @@ -2478,14 +2478,14 @@ bool ScPosWnd::Notify( NotifyEvent& rNEvt ) } } break; - case EVENT_GETFOCUS: + case MouseNotifyEvent::GETFOCUS: { // Select the whole text upon focus. OUString aStr = GetText(); SetSelection(Selection(0, aStr.getLength())); } break; - case EVENT_LOSEFOCUS: + case MouseNotifyEvent::LOSEFOCUS: HideTip(); bHandled = false; break; diff --git a/sc/source/ui/cctrl/checklistmenu.cxx b/sc/source/ui/cctrl/checklistmenu.cxx index 9fbcd2c65e52..cbf834e885fb 100644 --- a/sc/source/ui/cctrl/checklistmenu.cxx +++ b/sc/source/ui/cctrl/checklistmenu.cxx @@ -1171,7 +1171,7 @@ bool ScCheckListMenuWindow::Notify(NotifyEvent& rNEvt) { switch (rNEvt.GetType()) { - case EVENT_KEYUP: + case MouseNotifyEvent::KEYUP: { const KeyEvent* pKeyEvent = rNEvt.GetKeyEvent(); const vcl::KeyCode& rCode = pKeyEvent->GetKeyCode(); diff --git a/sc/source/ui/condformat/condformatdlgentry.cxx b/sc/source/ui/condformat/condformatdlgentry.cxx index 10fd33fbbd8b..81d907696561 100644 --- a/sc/source/ui/condformat/condformatdlgentry.cxx +++ b/sc/source/ui/condformat/condformatdlgentry.cxx @@ -65,7 +65,7 @@ ScCondFrmtEntry::~ScCondFrmtEntry() bool ScCondFrmtEntry::Notify( NotifyEvent& rNEvt ) { - if( rNEvt.GetType() == EVENT_MOUSEBUTTONDOWN ) + if( rNEvt.GetType() == MouseNotifyEvent::MOUSEBUTTONDOWN ) { ImplCallEventListenersAndHandler( VCLEVENT_WINDOW_MOUSEBUTTONDOWN, maClickHdl, this ); } diff --git a/sc/source/ui/miscdlgs/acredlin.cxx b/sc/source/ui/miscdlgs/acredlin.cxx index 8614e813bec7..a511a1444597 100644 --- a/sc/source/ui/miscdlgs/acredlin.cxx +++ b/sc/source/ui/miscdlgs/acredlin.cxx @@ -747,7 +747,7 @@ SvTreeListEntry* ScAcceptChgDlg::InsertChangeActionContent(const ScChangeActionC bool ScAcceptChgDlg::PreNotify( NotifyEvent& rNEvt ) { - if(rNEvt.GetType()==EVENT_GETFOCUS && bNeedsUpdate) + if(rNEvt.GetType()==MouseNotifyEvent::GETFOCUS && bNeedsUpdate) { ClearView(); UpdateView(); diff --git a/sc/source/ui/miscdlgs/anyrefdg.cxx b/sc/source/ui/miscdlgs/anyrefdg.cxx index 32448aa8c707..cb5ea7c6bf21 100644 --- a/sc/source/ui/miscdlgs/anyrefdg.cxx +++ b/sc/source/ui/miscdlgs/anyrefdg.cxx @@ -937,8 +937,8 @@ void ScRefHandler::preNotify(const NotifyEvent& rNEvt, const bool bBindRef) { if( bBindRef || m_bInRefMode ) { - sal_uInt16 nSwitch=rNEvt.GetType(); - if(nSwitch==EVENT_GETFOCUS) + MouseNotifyEvent nSwitch=rNEvt.GetType(); + if(nSwitch==MouseNotifyEvent::GETFOCUS) { pActiveWin=rNEvt.GetWindow(); } diff --git a/sc/source/ui/navipi/navipi.cxx b/sc/source/ui/navipi/navipi.cxx index b3a1f190f502..1f5d7fa76f45 100644 --- a/sc/source/ui/navipi/navipi.cxx +++ b/sc/source/ui/navipi/navipi.cxx @@ -95,8 +95,8 @@ bool ColumnEdit::Notify( NotifyEvent& rNEvt ) { bool nHandled = SpinField::Notify( rNEvt ); - sal_uInt16 nType = rNEvt.GetType(); - if ( nType == EVENT_KEYINPUT ) + MouseNotifyEvent nType = rNEvt.GetType(); + if ( nType == MouseNotifyEvent::KEYINPUT ) { const KeyEvent* pKEvt = rNEvt.GetKeyEvent(); vcl::KeyCode aCode = pKEvt->GetKeyCode(); @@ -115,8 +115,8 @@ bool ColumnEdit::Notify( NotifyEvent& rNEvt ) } } } - else if ( nType == EVENT_LOSEFOCUS ) // LoseFocus wird bei VCL nicht gerufen - EvalText(); // nCol setzen + else if ( nType == MouseNotifyEvent::LOSEFOCUS ) // LoseFocus not called at VCL + EvalText(); // nCol set return nHandled; } @@ -267,7 +267,7 @@ bool RowEdit::Notify( NotifyEvent& rNEvt ) { bool nHandled = NumericField::Notify( rNEvt ); - if ( rNEvt.GetType() == EVENT_KEYINPUT ) + if ( rNEvt.GetType() == MouseNotifyEvent::KEYINPUT ) { const KeyEvent* pKEvt = rNEvt.GetKeyEvent(); vcl::KeyCode aCode = pKEvt->GetKeyCode(); diff --git a/sc/source/ui/navipi/scenwnd.cxx b/sc/source/ui/navipi/scenwnd.cxx index d72a7456c21d..96b37d81602d 100644 --- a/sc/source/ui/navipi/scenwnd.cxx +++ b/sc/source/ui/navipi/scenwnd.cxx @@ -111,7 +111,7 @@ bool ScScenarioListBox::Notify( NotifyEvent& rNEvt ) { bool bHandled = false; - if( rNEvt.GetType() == EVENT_KEYINPUT ) + if( rNEvt.GetType() == MouseNotifyEvent::KEYINPUT ) { vcl::KeyCode aCode = rNEvt.GetKeyEvent()->GetKeyCode(); switch( aCode.GetCode() ) @@ -126,7 +126,7 @@ bool ScScenarioListBox::Notify( NotifyEvent& rNEvt ) break; } } - else if ( rNEvt.GetType() == EVENT_COMMAND && GetSelectEntryCount() ) + else if ( rNEvt.GetType() == MouseNotifyEvent::COMMAND && GetSelectEntryCount() ) { const CommandEvent* pCEvt = rNEvt.GetCommandEvent(); if ( pCEvt && pCEvt->GetCommand() == COMMAND_CONTEXTMENU ) diff --git a/sc/source/ui/pagedlg/tphfedit.cxx b/sc/source/ui/pagedlg/tphfedit.cxx index 5b79c98535d6..1fca515a8c79 100644 --- a/sc/source/ui/pagedlg/tphfedit.cxx +++ b/sc/source/ui/pagedlg/tphfedit.cxx @@ -396,8 +396,8 @@ void ScExtIButton::StartPopup() bool ScExtIButton::PreNotify( NotifyEvent& rNEvt ) { - sal_uInt16 nSwitch=rNEvt.GetType(); - if(nSwitch==EVENT_MOUSEBUTTONUP) + MouseNotifyEvent nSwitch=rNEvt.GetType(); + if(nSwitch==MouseNotifyEvent::MOUSEBUTTONUP) { MouseButtonUp(*rNEvt.GetMouseEvent()); } diff --git a/sc/source/ui/view/gridwin.cxx b/sc/source/ui/view/gridwin.cxx index 7b27f0caae98..10442a79f79b 100644 --- a/sc/source/ui/view/gridwin.cxx +++ b/sc/source/ui/view/gridwin.cxx @@ -277,7 +277,7 @@ void ScFilterListBox::LoseFocus() bool ScFilterListBox::PreNotify( NotifyEvent& rNEvt ) { bool nDone = false; - if ( rNEvt.GetType() == EVENT_KEYINPUT ) + if ( rNEvt.GetType() == MouseNotifyEvent::KEYINPUT ) { KeyEvent aKeyEvt = *rNEvt.GetKeyEvent(); vcl::KeyCode aCode = aKeyEvt.GetKeyCode(); @@ -2653,8 +2653,8 @@ static void lcl_InitMouseEvent( ::com::sun::star::awt::MouseEvent& rEvent, const bool ScGridWindow::PreNotify( NotifyEvent& rNEvt ) { bool bDone = false; - sal_uInt16 nType = rNEvt.GetType(); - if ( nType == EVENT_MOUSEBUTTONUP || nType == EVENT_MOUSEBUTTONDOWN ) + MouseNotifyEvent nType = rNEvt.GetType(); + if ( nType == MouseNotifyEvent::MOUSEBUTTONUP || nType == MouseNotifyEvent::MOUSEBUTTONDOWN ) { vcl::Window* pWindow = rNEvt.GetWindow(); if (pWindow == this && pViewData) @@ -2672,7 +2672,7 @@ bool ScGridWindow::PreNotify( NotifyEvent& rNEvt ) lcl_InitMouseEvent( aEvent, *rNEvt.GetMouseEvent() ); if ( rNEvt.GetWindow() ) aEvent.Source = rNEvt.GetWindow()->GetComponentInterface(); - if ( nType == EVENT_MOUSEBUTTONDOWN) + if ( nType == MouseNotifyEvent::MOUSEBUTTONDOWN) bDone = pImp->MousePressed( aEvent ); else bDone = pImp->MouseReleased( aEvent ); @@ -2683,7 +2683,7 @@ bool ScGridWindow::PreNotify( NotifyEvent& rNEvt ) } if (bDone) // event consumed by a listener { - if ( nType == EVENT_MOUSEBUTTONDOWN ) + if ( nType == MouseNotifyEvent::MOUSEBUTTONDOWN ) { const MouseEvent* pMouseEvent = rNEvt.GetMouseEvent(); if ( pMouseEvent->IsRight() && pMouseEvent->GetClicks() == 1 ) |