diff options
author | Oliver-Rainer Wittmann <orw@apache.org> | 2013-05-31 14:03:01 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2013-06-12 20:01:49 +0100 |
commit | a108ecfabf7930b0cdff16ab819ec36a7cb0a3a6 (patch) | |
tree | f5342cdb4d62d7a698dec44ec5c1db0c77952a57 /sw | |
parent | 7fa7e2f9ac7d11d839246ac0d9f3fc564241dd9e (diff) |
Resolves: #i122262# correct handling of Shift-<arrow key> for bigger steps...
movement of objects in order to get back text selection via keys in a table
(cherry picked from commit 7d2515d9ac497b3aaf47ae3ce79ec79bc6880330)
Conflicts:
sw/source/ui/docvw/edtwin.cxx
Change-Id: Iee81649eae297108dbdb6137539f962611e9e636
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/ui/docvw/edtwin.cxx | 34 |
1 files changed, 26 insertions, 8 deletions
diff --git a/sw/source/ui/docvw/edtwin.cxx b/sw/source/ui/docvw/edtwin.cxx index 6105a5619765..152ee16c7cc7 100644 --- a/sw/source/ui/docvw/edtwin.cxx +++ b/sw/source/ui/docvw/edtwin.cxx @@ -1644,17 +1644,15 @@ void SwEditWin::KeyInput(const KeyEvent &rKEvt) switch( rKeyCode.GetModifier() | rKeyCode.GetCode() ) { case KEY_RIGHT | KEY_MOD2: - case KEY_RIGHT | KEY_SHIFT: eKeyState = KS_ColRightBig; eFlyState = KS_Fly_Change; - nDir = rKeyCode.GetModifier() & KEY_SHIFT ? MOVE_RIGHT_HUGE : MOVE_RIGHT_SMALL; + nDir = MOVE_RIGHT_SMALL; goto KEYINPUT_CHECKTABLE; case KEY_LEFT | KEY_MOD2: - case KEY_LEFT | KEY_SHIFT: eKeyState = KS_ColRightSmall; eFlyState = KS_Fly_Change; - nDir = rKeyCode.GetModifier() & KEY_SHIFT ? MOVE_LEFT_HUGE : MOVE_LEFT_SMALL; + nDir = MOVE_LEFT_SMALL; goto KEYINPUT_CHECKTABLE; case KEY_RIGHT | KEY_MOD2 | KEY_SHIFT: @@ -1682,17 +1680,15 @@ void SwEditWin::KeyInput(const KeyEvent &rKEvt) goto KEYINPUT_CHECKTABLE; case KEY_UP | KEY_MOD2: - case KEY_UP | KEY_SHIFT: eKeyState = KS_ColBottomSmall; eFlyState = KS_Fly_Change; - nDir = rKeyCode.GetModifier() & KEY_SHIFT ? MOVE_UP_HUGE : MOVE_UP_SMALL; + nDir = MOVE_UP_SMALL; goto KEYINPUT_CHECKTABLE; case KEY_DOWN | KEY_MOD2: - case KEY_DOWN | KEY_SHIFT: eKeyState = KS_ColBottomBig; eFlyState = KS_Fly_Change; - nDir = rKeyCode.GetModifier() & KEY_SHIFT ? MOVE_DOWN_HUGE : MOVE_DOWN_SMALL; + nDir = MOVE_DOWN_SMALL; goto KEYINPUT_CHECKTABLE; case KEY_UP | KEY_MOD2 | KEY_MOD1: @@ -1729,6 +1725,28 @@ KEYINPUT_CHECKTABLE: } break; + // huge object move + case KEY_RIGHT | KEY_SHIFT: + case KEY_LEFT | KEY_SHIFT: + case KEY_UP | KEY_SHIFT: + case KEY_DOWN | KEY_SHIFT: + { + if ( pFlyFmt + || ( (rSh.GetSelectionType() & (nsSelectionType::SEL_DRW|nsSelectionType::SEL_DRW_FORM)) + && rSh.GetDrawView()->AreObjectsMarked() ) ) + { + eKeyState = pFlyFmt ? KS_Fly_Change : KS_Draw_Change; + switch ( rKeyCode.GetCode() ) + { + case KEY_RIGHT: nDir = MOVE_RIGHT_HUGE; break; + case KEY_LEFT: nDir = MOVE_LEFT_HUGE; break; + case KEY_UP: nDir = MOVE_UP_HUGE; break; + case KEY_DOWN: nDir = MOVE_DOWN_HUGE; break; + } + } + break; + } + case KEY_LEFT: case KEY_LEFT | KEY_MOD1: { |