diff options
author | Heiko Tietze <tietze.heiko@gmail.com> | 2022-05-24 10:35:04 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.com> | 2022-05-25 09:38:09 +0200 |
commit | ba2c5e05319181aa00357d66ba2fbaba20231bd3 (patch) | |
tree | 57b725bb145fff9f1c0ac33104a8a8128962a3dc | |
parent | 37a5d60df7631cca8ce597905d09748a48ff2a86 (diff) |
Resolves tdf#146762 - Consistency for list indent and level shortcuts
Previously:
* Shift + Tab on the first item decreases the indention
* Tab on first item increases the indention
* Shift + Tab on any item but the first does nothing
* Tab on any item but the first demotes the list level
* Ctrl + Tab on any item including the first inserts a literal tab
New:
* Tab on any item demotes the list item (move right)
* Shift + Tab on any item demotes the list item (move left)
* Ctrl + Tab on any item indents the whole list
* Ctrl + Shift + Tab on any item outdents the whole list
Change-Id: If64a5103a271d30c10fc903a306c9271e61cae49
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134856
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
-rw-r--r-- | sw/source/uibase/docvw/edtwin.cxx | 34 |
1 files changed, 15 insertions, 19 deletions
diff --git a/sw/source/uibase/docvw/edtwin.cxx b/sw/source/uibase/docvw/edtwin.cxx index 69dc6f7aa509..1c29953c30c6 100644 --- a/sw/source/uibase/docvw/edtwin.cxx +++ b/sw/source/uibase/docvw/edtwin.cxx @@ -2051,20 +2051,13 @@ KEYINPUT_CHECKTABLE_INSDEL: && rSh.IsSttOfPara() && !rSh.HasReadonlySel() ) { - if ( !rSh.IsMultiSelection() - && rSh.IsFirstOfNumRuleAtCursorPos() - && numfunc::ChangeIndentOnTabAtFirstPosOfFirstListItem() ) - eKeyState = SwKeyState::NumIndentInc; + if (numfunc::NumDownChangesIndent(rSh)) + { + eKeyState = SwKeyState::NumDown; + } else { - if (numfunc::NumDownChangesIndent(rSh)) - { - eKeyState = SwKeyState::NumDown; - } - else - { - eKeyState = SwKeyState::InsTab; - } + eKeyState = SwKeyState::InsTab; } } else if (rSh.GetSelectionType() & @@ -2116,12 +2109,7 @@ KEYINPUT_CHECKTABLE_INSDEL: && rSh.IsSttOfPara() && !rSh.HasReadonlySel() ) { - if ( !rSh.IsMultiSelection() - && rSh.IsFirstOfNumRuleAtCursorPos() - && numfunc::ChangeIndentOnTabAtFirstPosOfFirstListItem() ) - eKeyState = SwKeyState::NumIndentDec; - else - eKeyState = SwKeyState::NumUp; + eKeyState = SwKeyState::NumUp; } else if (rSh.GetSelectionType() & (SelectionType::Graphic | @@ -2176,7 +2164,9 @@ KEYINPUT_CHECKTABLE_INSDEL: eKeyState = SwKeyState::EnterDrawHandleMode; else { - eKeyState = SwKeyState::InsTab; + if ( !rSh.IsMultiSelection() + && numfunc::ChangeIndentOnTabAtFirstPosOfFirstListItem() ) + eKeyState = SwKeyState::NumIndentInc; } } break; @@ -2197,6 +2187,12 @@ KEYINPUT_CHECKTABLE_INSDEL: { eKeyState = SwKeyState::EnterDrawHandleMode; } + else + { + if ( !rSh.IsMultiSelection() + && numfunc::ChangeIndentOnTabAtFirstPosOfFirstListItem() ) + eKeyState = SwKeyState::NumIndentDec; + } } break; case KEY_F2 : |