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 /svtools/source | |
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 'svtools/source')
-rw-r--r-- | svtools/source/brwbox/ebbcontrols.cxx | 10 | ||||
-rw-r--r-- | svtools/source/brwbox/editbrowsebox.cxx | 6 | ||||
-rw-r--r-- | svtools/source/contnr/imivctl1.cxx | 2 | ||||
-rw-r--r-- | svtools/source/contnr/simptabl.cxx | 2 | ||||
-rw-r--r-- | svtools/source/control/calendar.cxx | 2 | ||||
-rw-r--r-- | svtools/source/control/fileurlbox.cxx | 6 | ||||
-rw-r--r-- | svtools/source/control/fmtfield.cxx | 8 | ||||
-rw-r--r-- | svtools/source/control/inettbc.cxx | 6 | ||||
-rw-r--r-- | svtools/source/control/roadmap.cxx | 2 | ||||
-rw-r--r-- | svtools/source/control/tabbar.cxx | 4 | ||||
-rw-r--r-- | svtools/source/control/urlcontrol.cxx | 4 | ||||
-rw-r--r-- | svtools/source/dialogs/addresstemplate.cxx | 2 | ||||
-rw-r--r-- | svtools/source/dialogs/prnsetup.cxx | 2 | ||||
-rw-r--r-- | svtools/source/dialogs/wizdlg.cxx | 2 | ||||
-rw-r--r-- | svtools/source/edit/editsyntaxhighlighter.cxx | 2 | ||||
-rw-r--r-- | svtools/source/hatchwindow/ipwin.cxx | 4 | ||||
-rw-r--r-- | svtools/source/table/tabledatawindow.cxx | 2 | ||||
-rw-r--r-- | svtools/source/toolpanel/toolpaneldeck.cxx | 2 |
18 files changed, 34 insertions, 34 deletions
diff --git a/svtools/source/brwbox/ebbcontrols.cxx b/svtools/source/brwbox/ebbcontrols.cxx index 2d12692c74a2..6314bfadf6e8 100644 --- a/svtools/source/brwbox/ebbcontrols.cxx +++ b/svtools/source/brwbox/ebbcontrols.cxx @@ -54,7 +54,7 @@ namespace svt { switch (rNEvt.GetType()) { - case EVENT_KEYINPUT: + case MouseNotifyEvent::KEYINPUT: if (!IsInDropDown()) { const KeyEvent *pEvt = rNEvt.GetKeyEvent(); @@ -162,7 +162,7 @@ namespace svt { switch (rNEvt.GetType()) { - case EVENT_KEYINPUT: + case MouseNotifyEvent::KEYINPUT: if (!IsInDropDown()) { const KeyEvent *pEvt = rNEvt.GetKeyEvent(); @@ -328,10 +328,10 @@ namespace svt { switch (rEvt.GetType()) { - case EVENT_GETFOCUS: + case MouseNotifyEvent::GETFOCUS: ShowFocus(aFocusRect); break; - case EVENT_LOSEFOCUS: + case MouseNotifyEvent::LOSEFOCUS: HideFocus(); } return Control::PreNotify(rEvt); @@ -572,7 +572,7 @@ namespace svt bool MultiLineTextCell::PreNotify( NotifyEvent& rNEvt ) { - if ( rNEvt.GetType() == EVENT_KEYINPUT ) + if ( rNEvt.GetType() == MouseNotifyEvent::KEYINPUT ) { if ( IsWindowOrChild( rNEvt.GetWindow() ) ) { diff --git a/svtools/source/brwbox/editbrowsebox.cxx b/svtools/source/brwbox/editbrowsebox.cxx index e009e82c885d..a95b68b3198a 100644 --- a/svtools/source/brwbox/editbrowsebox.cxx +++ b/svtools/source/brwbox/editbrowsebox.cxx @@ -613,7 +613,7 @@ namespace svt { switch (rEvt.GetType()) { - case EVENT_KEYINPUT: + case MouseNotifyEvent::KEYINPUT: if ( (IsEditing() && Controller()->GetWindow().HasChildPathFocus()) || rEvt.GetWindow() == &GetDataWindow() || (!IsEditing() && HasChildPathFocus()) @@ -738,11 +738,11 @@ namespace svt { switch (rEvt.GetType()) { - case EVENT_GETFOCUS: + case MouseNotifyEvent::GETFOCUS: DetermineFocus( getRealGetFocusFlags( this ) ); break; - case EVENT_LOSEFOCUS: + case MouseNotifyEvent::LOSEFOCUS: DetermineFocus( 0 ); break; } diff --git a/svtools/source/contnr/imivctl1.cxx b/svtools/source/contnr/imivctl1.cxx index cbcfb74d4924..b4f9fb20dfbe 100644 --- a/svtools/source/contnr/imivctl1.cxx +++ b/svtools/source/contnr/imivctl1.cxx @@ -3387,7 +3387,7 @@ void IcnViewEdit_Impl::KeyInput( const KeyEvent& rKEvt ) bool IcnViewEdit_Impl::PreNotify( NotifyEvent& rNEvt ) { - if( rNEvt.GetType() == EVENT_LOSEFOCUS ) + if( rNEvt.GetType() == MouseNotifyEvent::LOSEFOCUS ) { if ( !bAlreadyInCallback && ((!Application::GetFocusWindow()) || !IsChild(Application::GetFocusWindow()))) diff --git a/svtools/source/contnr/simptabl.cxx b/svtools/source/contnr/simptabl.cxx index 2422bba2efb8..c5d024cde996 100644 --- a/svtools/source/contnr/simptabl.cxx +++ b/svtools/source/contnr/simptabl.cxx @@ -45,7 +45,7 @@ void SvSimpleTableContainer::SetTable(SvSimpleTable* pTable) bool SvSimpleTableContainer::PreNotify( NotifyEvent& rNEvt ) { 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/svtools/source/control/calendar.cxx b/svtools/source/control/calendar.cxx index 3a27921ea1d7..5ab89ee57e6a 100644 --- a/svtools/source/control/calendar.cxx +++ b/svtools/source/control/calendar.cxx @@ -2359,7 +2359,7 @@ void ImplCFieldFloatWin::ArrangeButtons() bool ImplCFieldFloatWin::Notify( NotifyEvent& rNEvt ) { - if ( rNEvt.GetType() == EVENT_KEYINPUT ) + if ( rNEvt.GetType() == MouseNotifyEvent::KEYINPUT ) { const KeyEvent* pKEvt = rNEvt.GetKeyEvent(); if ( pKEvt->GetKeyCode().GetCode() == KEY_RETURN ) diff --git a/svtools/source/control/fileurlbox.cxx b/svtools/source/control/fileurlbox.cxx index 5ed40d77eaac..8437040b5706 100644 --- a/svtools/source/control/fileurlbox.cxx +++ b/svtools/source/control/fileurlbox.cxx @@ -56,7 +56,7 @@ namespace svt { switch ( _rNEvt.GetType() ) { - case EVENT_KEYINPUT: + case MouseNotifyEvent::KEYINPUT: if ( ( GetSubEdit() == _rNEvt.GetWindow() ) && ( KEY_RETURN == _rNEvt.GetKeyEvent()->GetKeyCode().GetCode() ) && ( IsInDropDown() ) @@ -64,7 +64,7 @@ namespace svt m_sPreservedText = GetURL(); break; - case EVENT_LOSEFOCUS: + case MouseNotifyEvent::LOSEFOCUS: if ( IsWindowOrChild( _rNEvt.GetWindow() ) ) DisplayURL( GetText() ); break; @@ -78,7 +78,7 @@ namespace svt { switch ( _rNEvt.GetType() ) { - case EVENT_KEYINPUT: + case MouseNotifyEvent::KEYINPUT: if ( ( GetSubEdit() == _rNEvt.GetWindow() ) && ( KEY_RETURN == _rNEvt.GetKeyEvent()->GetKeyCode().GetCode() ) && ( IsInDropDown() ) diff --git a/svtools/source/control/fmtfield.cxx b/svtools/source/control/fmtfield.cxx index 3cdd68082dcd..37533abc9a51 100644 --- a/svtools/source/control/fmtfield.cxx +++ b/svtools/source/control/fmtfield.cxx @@ -532,7 +532,7 @@ void FormattedField::ImplSetTextImpl(const OUString& rNew, Selection* pNewSel) bool FormattedField::PreNotify(NotifyEvent& rNEvt) { - if (rNEvt.GetType() == EVENT_KEYINPUT) + if (rNEvt.GetType() == MouseNotifyEvent::KEYINPUT) m_aLastSelection = GetSelection(); return SpinField::PreNotify(rNEvt); } @@ -763,7 +763,7 @@ void FormattedField::ReFormat() bool FormattedField::Notify(NotifyEvent& rNEvt) { - if ((rNEvt.GetType() == EVENT_KEYINPUT) && !IsReadOnly()) + if ((rNEvt.GetType() == MouseNotifyEvent::KEYINPUT) && !IsReadOnly()) { const KeyEvent& rKEvt = *rNEvt.GetKeyEvent(); sal_uInt16 nMod = rKEvt.GetKeyCode().GetModifier(); @@ -782,7 +782,7 @@ bool FormattedField::Notify(NotifyEvent& rNEvt) } } - if ((rNEvt.GetType() == EVENT_COMMAND) && !IsReadOnly()) + if ((rNEvt.GetType() == MouseNotifyEvent::COMMAND) && !IsReadOnly()) { const CommandEvent* pCommand = rNEvt.GetCommandEvent(); if (pCommand->GetCommand() == COMMAND_WHEEL) @@ -798,7 +798,7 @@ bool FormattedField::Notify(NotifyEvent& rNEvt) } } - if (rNEvt.GetType() == EVENT_LOSEFOCUS) + if (rNEvt.GetType() == MouseNotifyEvent::LOSEFOCUS) { // Sonderbehandlung fuer leere Texte if (GetText().isEmpty()) diff --git a/svtools/source/control/inettbc.cxx b/svtools/source/control/inettbc.cxx index 0a114737a8d9..d125f3eed4bd 100644 --- a/svtools/source/control/inettbc.cxx +++ b/svtools/source/control/inettbc.cxx @@ -1095,7 +1095,7 @@ void SvtURLBox::Modify() bool SvtURLBox::PreNotify( NotifyEvent& rNEvt ) { - if( rNEvt.GetWindow() == GetSubEdit() && rNEvt.GetType() == EVENT_KEYINPUT ) + if( rNEvt.GetWindow() == GetSubEdit() && rNEvt.GetType() == MouseNotifyEvent::KEYINPUT ) { const KeyEvent& rEvent = *rNEvt.GetKeyEvent(); @@ -1135,14 +1135,14 @@ void SvtURLBox::AutoCompleteHandler( Edit* ) bool SvtURLBox::Notify( NotifyEvent &rEvt ) { - if ( EVENT_GETFOCUS == rEvt.GetType() ) + if ( MouseNotifyEvent::GETFOCUS == rEvt.GetType() ) { #ifndef UNX // pb: don't select automatically on unix #93251# SetSelection( Selection( 0, GetText().getLength() ) ); #endif } - else if ( EVENT_LOSEFOCUS == rEvt.GetType() ) + else if ( MouseNotifyEvent::LOSEFOCUS == rEvt.GetType() ) { if( GetText().isEmpty() ) ClearModifyFlag(); diff --git a/svtools/source/control/roadmap.cxx b/svtools/source/control/roadmap.cxx index ce709005dbd2..093390848d32 100644 --- a/svtools/source/control/roadmap.cxx +++ b/svtools/source/control/roadmap.cxx @@ -612,7 +612,7 @@ namespace svt bool ORoadmap::PreNotify( NotifyEvent& _rNEvt ) { // capture KeyEvents for taskpane cycling - if ( _rNEvt.GetType() == EVENT_KEYINPUT ) + if ( _rNEvt.GetType() == MouseNotifyEvent::KEYINPUT ) { vcl::Window* pWindow = _rNEvt.GetWindow(); RoadmapItem* pItem = GetByPointer( pWindow ); diff --git a/svtools/source/control/tabbar.cxx b/svtools/source/control/tabbar.cxx index 9fa8b99f7d23..36d8ce0105bc 100644 --- a/svtools/source/control/tabbar.cxx +++ b/svtools/source/control/tabbar.cxx @@ -124,7 +124,7 @@ void ImplTabButton::Command( const CommandEvent& rCEvt ) bool ImplTabButton::PreNotify( NotifyEvent& rNEvt ) { - if ( rNEvt.GetType() == EVENT_MOUSEBUTTONDOWN ) + if ( rNEvt.GetType() == MouseNotifyEvent::MOUSEBUTTONDOWN ) { if ( GetParent()->IsInEditMode() ) { @@ -275,7 +275,7 @@ TabBarEdit::TabBarEdit( TabBar* pParent, WinBits nWinStyle ) : bool TabBarEdit::PreNotify( NotifyEvent& rNEvt ) { - if ( rNEvt.GetType() == EVENT_KEYINPUT ) + if ( rNEvt.GetType() == MouseNotifyEvent::KEYINPUT ) { const KeyEvent* pKEvt = rNEvt.GetKeyEvent(); if ( !pKEvt->GetKeyCode().GetModifier() ) diff --git a/svtools/source/control/urlcontrol.cxx b/svtools/source/control/urlcontrol.cxx index e22b6b351c26..81a1969bf102 100644 --- a/svtools/source/control/urlcontrol.cxx +++ b/svtools/source/control/urlcontrol.cxx @@ -44,7 +44,7 @@ namespace svt bool OFileURLControl::PreNotify( NotifyEvent& _rNEvt ) { if (GetSubEdit() == _rNEvt.GetWindow()) - if (EVENT_KEYINPUT == _rNEvt.GetType()) + if (MouseNotifyEvent::KEYINPUT == _rNEvt.GetType()) if (KEY_RETURN == _rNEvt.GetKeyEvent()->GetKeyCode().GetCode()) if (IsInDropDown()) m_sPreservedText = GetURL(); @@ -55,7 +55,7 @@ namespace svt bool OFileURLControl::Notify( NotifyEvent& _rNEvt ) { if (GetSubEdit() == _rNEvt.GetWindow()) - if (EVENT_KEYINPUT == _rNEvt.GetType()) + if (MouseNotifyEvent::KEYINPUT == _rNEvt.GetType()) if (KEY_RETURN == _rNEvt.GetKeyEvent()->GetKeyCode().GetCode()) if (IsInDropDown()) { diff --git a/svtools/source/dialogs/addresstemplate.cxx b/svtools/source/dialogs/addresstemplate.cxx index bfc972a50bf0..5fca301bd266 100644 --- a/svtools/source/dialogs/addresstemplate.cxx +++ b/svtools/source/dialogs/addresstemplate.cxx @@ -1230,7 +1230,7 @@ void AssignmentPersistentData::Commit() { switch (_rNEvt.GetType()) { - case EVENT_KEYINPUT: + case MouseNotifyEvent::KEYINPUT: { const KeyEvent* pKeyEvent = _rNEvt.GetKeyEvent(); sal_uInt16 nCode = pKeyEvent->GetKeyCode().GetCode(); diff --git a/svtools/source/dialogs/prnsetup.cxx b/svtools/source/dialogs/prnsetup.cxx index d5fe5fa9b394..ddadba678879 100644 --- a/svtools/source/dialogs/prnsetup.cxx +++ b/svtools/source/dialogs/prnsetup.cxx @@ -313,7 +313,7 @@ IMPL_LINK_NOARG(PrinterSetupDialog, ImplChangePrinterHdl) bool PrinterSetupDialog::Notify( NotifyEvent& rNEvt ) { - if ( (rNEvt.GetType() == EVENT_GETFOCUS) && IsReallyVisible() ) + if ( (rNEvt.GetType() == MouseNotifyEvent::GETFOCUS) && IsReallyVisible() ) ImplStatusHdl( &maStatusTimer ); return ModalDialog::Notify( rNEvt ); diff --git a/svtools/source/dialogs/wizdlg.cxx b/svtools/source/dialogs/wizdlg.cxx index 6a6a4b60b01c..ed8e29051e8e 100644 --- a/svtools/source/dialogs/wizdlg.cxx +++ b/svtools/source/dialogs/wizdlg.cxx @@ -429,7 +429,7 @@ void WizardDialog::StateChanged( StateChangedType nType ) bool WizardDialog::Notify( NotifyEvent& rNEvt ) { - if ( (rNEvt.GetType() == EVENT_KEYINPUT) && mpPrevBtn && mpNextBtn ) + if ( (rNEvt.GetType() == MouseNotifyEvent::KEYINPUT) && mpPrevBtn && mpNextBtn ) { const KeyEvent* pKEvt = rNEvt.GetKeyEvent(); vcl::KeyCode aKeyCode = pKEvt->GetKeyCode(); diff --git a/svtools/source/edit/editsyntaxhighlighter.cxx b/svtools/source/edit/editsyntaxhighlighter.cxx index 1410921320f7..8b8bbb6228fa 100644 --- a/svtools/source/edit/editsyntaxhighlighter.cxx +++ b/svtools/source/edit/editsyntaxhighlighter.cxx @@ -115,7 +115,7 @@ void MultiLineEditSyntaxHighlight::DoBracketHilight(sal_uInt16 nKey) bool MultiLineEditSyntaxHighlight::PreNotify( NotifyEvent& rNEvt ) { - if ( mbDoBracketHilight && (rNEvt.GetType() == EVENT_KEYINPUT) ) + if ( mbDoBracketHilight && (rNEvt.GetType() == MouseNotifyEvent::KEYINPUT) ) DoBracketHilight(rNEvt.GetKeyEvent()->GetCharCode()); return MultiLineEdit::PreNotify(rNEvt); diff --git a/svtools/source/hatchwindow/ipwin.cxx b/svtools/source/hatchwindow/ipwin.cxx index 5ddfba33b8a6..d347ad41e645 100644 --- a/svtools/source/hatchwindow/ipwin.cxx +++ b/svtools/source/hatchwindow/ipwin.cxx @@ -619,7 +619,7 @@ void SvResizeWindow::Paint( const Rectangle & /*rRect*/ ) bool SvResizeWindow::PreNotify( NotifyEvent& rEvt ) { - if ( rEvt.GetType() == EVENT_GETFOCUS && !m_bActive ) + if ( rEvt.GetType() == MouseNotifyEvent::GETFOCUS && !m_bActive ) { m_bActive = true; m_pWrapper->Activated(); @@ -630,7 +630,7 @@ bool SvResizeWindow::PreNotify( NotifyEvent& rEvt ) bool SvResizeWindow::Notify( NotifyEvent& rEvt ) { - if ( rEvt.GetType() == EVENT_LOSEFOCUS && m_bActive ) + if ( rEvt.GetType() == MouseNotifyEvent::LOSEFOCUS && m_bActive ) { bool bHasFocus = HasChildPathFocus(true); if ( !bHasFocus ) diff --git a/svtools/source/table/tabledatawindow.cxx b/svtools/source/table/tabledatawindow.cxx index 80a0557b1335..9b5bcc5538f4 100644 --- a/svtools/source/table/tabledatawindow.cxx +++ b/svtools/source/table/tabledatawindow.cxx @@ -213,7 +213,7 @@ namespace svt { namespace table bool TableDataWindow::Notify(NotifyEvent& rNEvt ) { bool nDone = false; - if ( rNEvt.GetType() == EVENT_COMMAND ) + if ( rNEvt.GetType() == MouseNotifyEvent::COMMAND ) { const CommandEvent& rCEvt = *rNEvt.GetCommandEvent(); if ( rCEvt.GetCommand() == COMMAND_WHEEL ) diff --git a/svtools/source/toolpanel/toolpaneldeck.cxx b/svtools/source/toolpanel/toolpaneldeck.cxx index 27dfa5146c0f..af00abb8c204 100644 --- a/svtools/source/toolpanel/toolpaneldeck.cxx +++ b/svtools/source/toolpanel/toolpaneldeck.cxx @@ -447,7 +447,7 @@ namespace svt bool ToolPanelDeck::Notify( NotifyEvent& i_rNotifyEvent ) { bool bHandled = false; - if ( i_rNotifyEvent.GetType() == EVENT_KEYINPUT ) + if ( i_rNotifyEvent.GetType() == MouseNotifyEvent::KEYINPUT ) { const KeyEvent* pEvent = i_rNotifyEvent.GetKeyEvent(); const vcl::KeyCode& rKeyCode = pEvent->GetKeyCode(); |