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 /svx | |
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 'svx')
-rw-r--r-- | svx/source/dialog/rubydialog.cxx | 2 | ||||
-rw-r--r-- | svx/source/fmcomp/gridctrl.cxx | 2 | ||||
-rw-r--r-- | svx/source/form/datanavi.cxx | 2 | ||||
-rw-r--r-- | svx/source/form/tabwin.cxx | 2 | ||||
-rw-r--r-- | svx/source/gallery2/galbrws1.cxx | 4 | ||||
-rw-r--r-- | svx/source/sidebar/tools/PopupContainer.cxx | 2 | ||||
-rw-r--r-- | svx/source/tbxctrls/colrctrl.cxx | 2 | ||||
-rw-r--r-- | svx/source/tbxctrls/grafctrl.cxx | 6 | ||||
-rw-r--r-- | svx/source/tbxctrls/itemwin.cxx | 32 | ||||
-rw-r--r-- | svx/source/tbxctrls/tbcontrl.cxx | 18 | ||||
-rw-r--r-- | svx/source/tbxctrls/tbunocontroller.cxx | 4 | ||||
-rw-r--r-- | svx/source/tbxctrls/tbunosearchcontrollers.cxx | 4 |
12 files changed, 40 insertions, 40 deletions
diff --git a/svx/source/dialog/rubydialog.cxx b/svx/source/dialog/rubydialog.cxx index fc8bd10dbd3c..c44d7b25af9b 100644 --- a/svx/source/dialog/rubydialog.cxx +++ b/svx/source/dialog/rubydialog.cxx @@ -890,7 +890,7 @@ void RubyEdit::GetFocus() bool RubyEdit::PreNotify( NotifyEvent& rNEvt ) { bool nHandled = false; - if ( rNEvt.GetType() == EVENT_KEYINPUT ) + if ( rNEvt.GetType() == MouseNotifyEvent::KEYINPUT ) { const KeyEvent* pKEvt = rNEvt.GetKeyEvent(); const vcl::KeyCode& rKeyCode = pKEvt->GetKeyCode(); diff --git a/svx/source/fmcomp/gridctrl.cxx b/svx/source/fmcomp/gridctrl.cxx index ddd46801a458..bf271b37b973 100644 --- a/svx/source/fmcomp/gridctrl.cxx +++ b/svx/source/fmcomp/gridctrl.cxx @@ -3198,7 +3198,7 @@ bool DbGridControl::PreNotify(NotifyEvent& rEvt) switch (rEvt.GetType()) { - case EVENT_KEYINPUT: + case MouseNotifyEvent::KEYINPUT: { const KeyEvent* pKeyEvent = rEvt.GetKeyEvent(); diff --git a/svx/source/form/datanavi.cxx b/svx/source/form/datanavi.cxx index a9813718e8d0..34e71ce831b6 100644 --- a/svx/source/form/datanavi.cxx +++ b/svx/source/form/datanavi.cxx @@ -1019,7 +1019,7 @@ namespace svxform { bool nHandled = false; - if ( rNEvt.GetType() == EVENT_KEYINPUT ) + if ( rNEvt.GetType() == MouseNotifyEvent::KEYINPUT ) { sal_uInt16 nCode = rNEvt.GetKeyEvent()->GetKeyCode().GetCode(); diff --git a/svx/source/form/tabwin.cxx b/svx/source/form/tabwin.cxx index 111ab2b5d684..2fd8ad07cbd2 100644 --- a/svx/source/form/tabwin.cxx +++ b/svx/source/form/tabwin.cxx @@ -248,7 +248,7 @@ bool FmFieldWin::createSelectionControls( ) bool FmFieldWin::PreNotify( NotifyEvent& _rNEvt ) { - if ( EVENT_KEYINPUT == _rNEvt.GetType() ) + if ( MouseNotifyEvent::KEYINPUT == _rNEvt.GetType() ) { const vcl::KeyCode& rKeyCode = _rNEvt.GetKeyEvent()->GetKeyCode(); if ( ( 0 == rKeyCode.GetModifier() ) && ( KEY_RETURN == rKeyCode.GetCode() ) ) diff --git a/svx/source/gallery2/galbrws1.cxx b/svx/source/gallery2/galbrws1.cxx index 91309f5b4541..86f5f07005ff 100644 --- a/svx/source/gallery2/galbrws1.cxx +++ b/svx/source/gallery2/galbrws1.cxx @@ -92,14 +92,14 @@ bool GalleryThemeListBox::PreNotify( NotifyEvent& rNEvt ) { bool bDone = false; - if( rNEvt.GetType() == EVENT_COMMAND ) + if( rNEvt.GetType() == MouseNotifyEvent::COMMAND ) { const CommandEvent* pCEvt = rNEvt.GetCommandEvent(); if( pCEvt && pCEvt->GetCommand() == COMMAND_CONTEXTMENU ) static_cast< GalleryBrowser1* >( GetParent() )->ShowContextMenu(); } - else if( rNEvt.GetType() == EVENT_KEYINPUT ) + else if( rNEvt.GetType() == MouseNotifyEvent::KEYINPUT ) { const KeyEvent* pKEvt = rNEvt.GetKeyEvent(); diff --git a/svx/source/sidebar/tools/PopupContainer.cxx b/svx/source/sidebar/tools/PopupContainer.cxx index dc29c558f986..1c37b6c6bbf0 100644 --- a/svx/source/sidebar/tools/PopupContainer.cxx +++ b/svx/source/sidebar/tools/PopupContainer.cxx @@ -39,7 +39,7 @@ PopupContainer::~PopupContainer (void) bool PopupContainer::Notify (NotifyEvent& rEvent) { - if (rEvent.GetType() == EVENT_LOSEFOCUS) + if (rEvent.GetType() == MouseNotifyEvent::LOSEFOCUS) { if ( ! HasChildPathFocus(true)) { diff --git a/svx/source/tbxctrls/colrctrl.cxx b/svx/source/tbxctrls/colrctrl.cxx index 3b79190336a8..2713c13c0e66 100644 --- a/svx/source/tbxctrls/colrctrl.cxx +++ b/svx/source/tbxctrls/colrctrl.cxx @@ -493,7 +493,7 @@ void SvxColorDockingWindow::GetFocus (void) bool SvxColorDockingWindow::Notify( NotifyEvent& rNEvt ) { bool nRet = false; - if( ( rNEvt.GetType() == EVENT_KEYINPUT ) ) + if( ( rNEvt.GetType() == MouseNotifyEvent::KEYINPUT ) ) { KeyEvent aKeyEvt = *rNEvt.GetKeyEvent(); sal_uInt16 nKeyCode = aKeyEvt.GetKeyCode().GetCode(); diff --git a/svx/source/tbxctrls/grafctrl.cxx b/svx/source/tbxctrls/grafctrl.cxx index 119d42f14744..ccc885b945ed 100644 --- a/svx/source/tbxctrls/grafctrl.cxx +++ b/svx/source/tbxctrls/grafctrl.cxx @@ -368,9 +368,9 @@ void ImplGrafModeControl::Select() bool ImplGrafModeControl::PreNotify( NotifyEvent& rNEvt ) { - sal_uInt16 nType = rNEvt.GetType(); + MouseNotifyEvent nType = rNEvt.GetType(); - if( EVENT_MOUSEBUTTONDOWN == nType || EVENT_GETFOCUS == nType ) + if( MouseNotifyEvent::MOUSEBUTTONDOWN == nType || MouseNotifyEvent::GETFOCUS == nType ) mnCurPos = GetSelectEntryPos(); return ListBox::PreNotify( rNEvt ); @@ -380,7 +380,7 @@ bool ImplGrafModeControl::Notify( NotifyEvent& rNEvt ) { bool nHandled = ListBox::Notify( rNEvt ); - if( rNEvt.GetType() == EVENT_KEYINPUT ) + if( rNEvt.GetType() == MouseNotifyEvent::KEYINPUT ) { const KeyEvent* pKEvt = rNEvt.GetKeyEvent(); diff --git a/svx/source/tbxctrls/itemwin.cxx b/svx/source/tbxctrls/itemwin.cxx index a74bddb2a113..30e52ece7957 100644 --- a/svx/source/tbxctrls/itemwin.cxx +++ b/svx/source/tbxctrls/itemwin.cxx @@ -156,18 +156,18 @@ void SvxLineBox::Select() bool SvxLineBox::PreNotify( NotifyEvent& rNEvt ) { - sal_uInt16 nType = rNEvt.GetType(); + MouseNotifyEvent nType = rNEvt.GetType(); switch(nType) { - case EVENT_MOUSEBUTTONDOWN: - case EVENT_GETFOCUS: + case MouseNotifyEvent::MOUSEBUTTONDOWN: + case MouseNotifyEvent::GETFOCUS: nCurPos = GetSelectEntryPos(); break; - case EVENT_LOSEFOCUS: + case MouseNotifyEvent::LOSEFOCUS: SelectEntryPos(nCurPos); break; - case EVENT_KEYINPUT: + case MouseNotifyEvent::KEYINPUT: { const KeyEvent* pKEvt = rNEvt.GetKeyEvent(); if( pKEvt->GetKeyCode().GetCode() == KEY_TAB) @@ -187,7 +187,7 @@ bool SvxLineBox::Notify( NotifyEvent& rNEvt ) { bool nHandled = LineLB::Notify( rNEvt ); - if ( rNEvt.GetType() == EVENT_KEYINPUT ) + if ( rNEvt.GetType() == MouseNotifyEvent::KEYINPUT ) { const KeyEvent* pKEvt = rNEvt.GetKeyEvent(); @@ -354,9 +354,9 @@ void SvxMetricField::RefreshDlgUnit() bool SvxMetricField::PreNotify( NotifyEvent& rNEvt ) { - sal_uInt16 nType = rNEvt.GetType(); + MouseNotifyEvent nType = rNEvt.GetType(); - if ( EVENT_MOUSEBUTTONDOWN == nType || EVENT_GETFOCUS == nType ) + if ( MouseNotifyEvent::MOUSEBUTTONDOWN == nType || MouseNotifyEvent::GETFOCUS == nType ) aCurTxt = GetText(); return MetricField::PreNotify( rNEvt ); @@ -368,7 +368,7 @@ bool SvxMetricField::Notify( NotifyEvent& rNEvt ) { bool nHandled = MetricField::Notify( rNEvt ); - if ( rNEvt.GetType() == EVENT_KEYINPUT ) + if ( rNEvt.GetType() == MouseNotifyEvent::KEYINPUT ) { const KeyEvent* pKEvt = rNEvt.GetKeyEvent(); const vcl::KeyCode& rKey = pKEvt->GetKeyCode(); @@ -442,11 +442,11 @@ SvxFillTypeBox::~SvxFillTypeBox() bool SvxFillTypeBox::PreNotify( NotifyEvent& rNEvt ) { - sal_uInt16 nType = rNEvt.GetType(); + MouseNotifyEvent nType = rNEvt.GetType(); - if ( EVENT_MOUSEBUTTONDOWN == nType || EVENT_GETFOCUS == nType ) + if ( MouseNotifyEvent::MOUSEBUTTONDOWN == nType || MouseNotifyEvent::GETFOCUS == nType ) nCurPos = GetSelectEntryPos(); - else if ( EVENT_LOSEFOCUS == nType + else if ( MouseNotifyEvent::LOSEFOCUS == nType && Application::GetFocusWindow() && !IsWindowOrChild( Application::GetFocusWindow(), true ) ) { @@ -465,7 +465,7 @@ bool SvxFillTypeBox::Notify( NotifyEvent& rNEvt ) { bool nHandled = FillTypeLB::Notify( rNEvt ); - if ( rNEvt.GetType() == EVENT_KEYINPUT ) + if ( rNEvt.GetType() == MouseNotifyEvent::KEYINPUT ) { const KeyEvent* pKEvt = rNEvt.GetKeyEvent(); switch ( pKEvt->GetKeyCode().GetCode() ) @@ -529,9 +529,9 @@ SvxFillAttrBox::~SvxFillAttrBox() bool SvxFillAttrBox::PreNotify( NotifyEvent& rNEvt ) { - sal_uInt16 nType = rNEvt.GetType(); + MouseNotifyEvent nType = rNEvt.GetType(); - if ( EVENT_MOUSEBUTTONDOWN == nType || EVENT_GETFOCUS == nType ) + if ( MouseNotifyEvent::MOUSEBUTTONDOWN == nType || MouseNotifyEvent::GETFOCUS == nType ) nCurPos = GetSelectEntryPos(); return FillAttrLB::PreNotify( rNEvt ); @@ -543,7 +543,7 @@ bool SvxFillAttrBox::Notify( NotifyEvent& rNEvt ) { bool nHandled = FillAttrLB::Notify( rNEvt ); - if ( rNEvt.GetType() == EVENT_KEYINPUT ) + if ( rNEvt.GetType() == MouseNotifyEvent::KEYINPUT ) { const KeyEvent* pKEvt = rNEvt.GetKeyEvent(); diff --git a/svx/source/tbxctrls/tbcontrl.cxx b/svx/source/tbxctrls/tbcontrl.cxx index 8216a9f7d3c3..aa3b63eb9412 100644 --- a/svx/source/tbxctrls/tbcontrl.cxx +++ b/svx/source/tbxctrls/tbcontrl.cxx @@ -464,11 +464,11 @@ void SvxStyleBox_Impl::SetFamily( SfxStyleFamily eNewFamily ) bool SvxStyleBox_Impl::PreNotify( NotifyEvent& rNEvt ) { - sal_uInt16 nType = rNEvt.GetType(); + MouseNotifyEvent nType = rNEvt.GetType(); - if ( EVENT_MOUSEBUTTONDOWN == nType || EVENT_GETFOCUS == nType ) + if ( MouseNotifyEvent::MOUSEBUTTONDOWN == nType || MouseNotifyEvent::GETFOCUS == nType ) nCurSel = GetSelectEntryPos(); - else if ( EVENT_LOSEFOCUS == nType ) + else if ( MouseNotifyEvent::LOSEFOCUS == nType ) { // don't handle before our Select() is called if ( !HasFocus() && !HasChildPathFocus() ) @@ -481,7 +481,7 @@ bool SvxStyleBox_Impl::Notify( NotifyEvent& rNEvt ) { bool nHandled = false; - if ( rNEvt.GetType() == EVENT_KEYINPUT ) + if ( rNEvt.GetType() == MouseNotifyEvent::KEYINPUT ) { sal_uInt16 nCode = rNEvt.GetKeyEvent()->GetKeyCode().GetCode(); @@ -933,9 +933,9 @@ void SvxFontNameBox_Impl::Update( const SvxFontItem* pFontItem ) bool SvxFontNameBox_Impl::PreNotify( NotifyEvent& rNEvt ) { - sal_uInt16 nType = rNEvt.GetType(); + MouseNotifyEvent nType = rNEvt.GetType(); - if ( EVENT_MOUSEBUTTONDOWN == nType || EVENT_GETFOCUS == nType ) + if ( MouseNotifyEvent::MOUSEBUTTONDOWN == nType || MouseNotifyEvent::GETFOCUS == nType ) { EnableControls_Impl(); FillList(); @@ -947,10 +947,10 @@ bool SvxFontNameBox_Impl::Notify( NotifyEvent& rNEvt ) { bool nHandled = false; mbEndPreview = false; - if ( rNEvt.GetType() == EVENT_KEYUP ) + if ( rNEvt.GetType() == MouseNotifyEvent::KEYUP ) mbEndPreview = true; - if ( rNEvt.GetType() == EVENT_KEYINPUT ) + if ( rNEvt.GetType() == MouseNotifyEvent::KEYINPUT ) { sal_uInt16 nCode = rNEvt.GetKeyEvent()->GetKeyCode().GetCode(); @@ -974,7 +974,7 @@ bool SvxFontNameBox_Impl::Notify( NotifyEvent& rNEvt ) break; } } - else if ( EVENT_LOSEFOCUS == rNEvt.GetType() ) + else if ( MouseNotifyEvent::LOSEFOCUS == rNEvt.GetType() ) { vcl::Window* pFocusWin = Application::GetFocusWindow(); if ( !HasFocus() && GetSubEdit() != pFocusWin ) diff --git a/svx/source/tbxctrls/tbunocontroller.cxx b/svx/source/tbxctrls/tbunocontroller.cxx index 746d387ae951..0317b84e8979 100644 --- a/svx/source/tbxctrls/tbunocontroller.cxx +++ b/svx/source/tbxctrls/tbunocontroller.cxx @@ -224,7 +224,7 @@ bool SvxFontSizeBox_Impl::Notify( NotifyEvent& rNEvt ) { bool nHandled = false; - if ( rNEvt.GetType() == EVENT_KEYINPUT ) + if ( rNEvt.GetType() == MouseNotifyEvent::KEYINPUT ) { sal_uInt16 nCode = rNEvt.GetKeyEvent()->GetKeyCode().GetCode(); @@ -248,7 +248,7 @@ bool SvxFontSizeBox_Impl::Notify( NotifyEvent& rNEvt ) break; } } - else if( EVENT_LOSEFOCUS == rNEvt.GetType() ) + else if( MouseNotifyEvent::LOSEFOCUS == rNEvt.GetType() ) { vcl::Window* pFocusWin = Application::GetFocusWindow(); if(!HasFocus() && GetSubEdit() != pFocusWin) diff --git a/svx/source/tbxctrls/tbunosearchcontrollers.cxx b/svx/source/tbxctrls/tbunosearchcontrollers.cxx index f84080a0c959..707693de7989 100644 --- a/svx/source/tbxctrls/tbunosearchcontrollers.cxx +++ b/svx/source/tbxctrls/tbunosearchcontrollers.cxx @@ -197,7 +197,7 @@ bool FindTextFieldControl::PreNotify( NotifyEvent& rNEvt ) switch ( rNEvt.GetType() ) { - case EVENT_KEYINPUT: + case MouseNotifyEvent::KEYINPUT: { const KeyEvent* pKeyEvent = rNEvt.GetKeyEvent(); bool bShift = pKeyEvent->GetKeyCode().IsShift(); @@ -243,7 +243,7 @@ bool FindTextFieldControl::PreNotify( NotifyEvent& rNEvt ) break; } - case EVENT_GETFOCUS: + case MouseNotifyEvent::GETFOCUS: SetSelection( Selection( SELECTION_MIN, SELECTION_MAX ) ); break; } |