diff options
author | Kohei Yoshida <kyoshida@novell.com> | 2010-09-28 12:06:54 -0400 |
---|---|---|
committer | Kohei Yoshida <kyoshida@novell.com> | 2010-09-28 12:06:54 -0400 |
commit | 5157d9a63e4501d7ff2e20afeaf5dbadbb43ecf5 (patch) | |
tree | 4c4832d2427fcf5937ccfedb59d27e59d7688191 /sc | |
parent | 2d301b6f4afc6e961e69b8821c0c10b43c7f5066 (diff) |
Ported calc-auto-tab-complete.diff from ooo-build.
Diffstat (limited to 'sc')
-rw-r--r-- | sc/source/ui/app/inputhdl.cxx | 31 |
1 files changed, 16 insertions, 15 deletions
diff --git a/sc/source/ui/app/inputhdl.cxx b/sc/source/ui/app/inputhdl.cxx index 4921600b140a..5bd70fb42095 100644 --- a/sc/source/ui/app/inputhdl.cxx +++ b/sc/source/ui/app/inputhdl.cxx @@ -3000,10 +3000,19 @@ BOOL ScInputHandler::KeyInput( const KeyEvent& rKEvt, BOOL bStartEdit /* = FALSE USHORT nCode = aCode.GetCode(); sal_Unicode nChar = rKEvt.GetCharCode(); - // Alt-Return is accepted, everything else with ALT, or CTRL-TAB are not: - if (( bAlt && !bControl && nCode != KEY_RETURN ) || - ( bControl && aCode.GetCode() == KEY_TAB )) - return FALSE; + if (bAlt && !bControl && nCode != KEY_RETURN) + // Alt-Return and Alt-Ctrl-* are accepted. Everything else with ALT are not. + return false; + + if (!bControl && nCode == KEY_TAB) + { + // Normal TAB moves the cursor right. + EnterHandler(); + + if (pActiveViewSh) + pActiveViewSh->FindNextUnprot( bShift ); + return true; + } BOOL bInputLine = ( eMode==SC_INPUT_TOP ); @@ -3042,30 +3051,22 @@ BOOL ScInputHandler::KeyInput( const KeyEvent& rKEvt, BOOL bStartEdit /* = FALSE } break; case KEY_TAB: - if (!bControl && !bAlt) + if (bControl && !bAlt) { if ( pFormulaData && nTipVisible && nAutoPos != SCPOS_INVALID ) { // blaettern NextFormulaEntry( bShift ); + bUsed = true; } else if ( pColumnData && bUseTab && nAutoPos != SCPOS_INVALID ) { // in den Eintraegen der AutoEingabe blaettern NextAutoEntry( bShift ); + bUsed = true; } - else - { - EnterHandler(); - - // TabKeyInput gibt auf manchen Rechnern unter W95 Stackueberlaeufe, - // darum direkter Aufruf: - if (pActiveViewSh) - pActiveViewSh->FindNextUnprot( bShift ); - } - bUsed = TRUE; } break; case KEY_ESCAPE: |