diff options
author | Mikhail Voytenko <mav@openoffice.org> | 2011-01-06 14:57:12 +0100 |
---|---|---|
committer | Mikhail Voytenko <mav@openoffice.org> | 2011-01-06 14:57:12 +0100 |
commit | 8ff51afa0dcd4e5e644e923131ee72435c80b57b (patch) | |
tree | d63f6b6e298485b5f29f60c7af25baca46f59375 /framework/source/uielement/comboboxtoolbarcontroller.cxx | |
parent | fa1f3c352c6126b24ab5af87ea4ebea742c546c2 (diff) | |
parent | 794c821e4d48c34aa376cdc7b6ab2cb029d9574d (diff) |
removetooltypes01: rebase to DEV300_m96
Diffstat (limited to 'framework/source/uielement/comboboxtoolbarcontroller.cxx')
-rw-r--r-- | framework/source/uielement/comboboxtoolbarcontroller.cxx | 33 |
1 files changed, 22 insertions, 11 deletions
diff --git a/framework/source/uielement/comboboxtoolbarcontroller.cxx b/framework/source/uielement/comboboxtoolbarcontroller.cxx index cd5c4e6aadf4..0185c68726dd 100644 --- a/framework/source/uielement/comboboxtoolbarcontroller.cxx +++ b/framework/source/uielement/comboboxtoolbarcontroller.cxx @@ -261,19 +261,30 @@ void ComboboxToolbarController::LoseFocus() long ComboboxToolbarController::PreNotify( NotifyEvent& rNEvt ) { - if( rNEvt.GetType() == EVENT_KEYINPUT ) + switch ( rNEvt.GetType() ) { - const ::KeyEvent* pKeyEvent = rNEvt.GetKeyEvent(); - const KeyCode& rKeyCode = pKeyEvent->GetKeyCode(); - if(( rKeyCode.GetModifier() | rKeyCode.GetCode()) == KEY_RETURN ) - { - // Call execute only with non-empty text - if ( m_pComboBox->GetText().Len() > 0 ) - execute( rKeyCode.GetModifier() ); - return 1; - } + case EVENT_KEYINPUT : + { + const ::KeyEvent* pKeyEvent = rNEvt.GetKeyEvent(); + const KeyCode& rKeyCode = pKeyEvent->GetKeyCode(); + if(( rKeyCode.GetModifier() | rKeyCode.GetCode()) == KEY_RETURN ) + { + // Call execute only with non-empty text + if ( m_pComboBox->GetText().Len() > 0 ) + execute( rKeyCode.GetModifier() ); + return 1; + } + } + break; + case EVENT_GETFOCUS : + notifyFocusGet(); + break; + case EVENT_LOSEFOCUS : + notifyFocusLost(); + break; + default : + break; } - return 0; } |