diff options
author | Jim Raykowski <raykowj@gmail.com> | 2021-11-17 20:20:25 -0900 |
---|---|---|
committer | Mike Kaganski <mike.kaganski@collabora.com> | 2021-11-21 09:47:57 +0100 |
commit | 437d5a446733aca0a485218f29d8d7dcea4d3999 (patch) | |
tree | 44a5f92d7028b84844d2be42f72edefa12dfa5ff | |
parent | 52b9a1fdbbd829604b483881fb23ce30251f806c (diff) |
tdf#145207 Check for drawing object before Table to handle Tab key
to fix crash that can occur if done the other way
Change-Id: I378aa8444906d56647ab4fdde26d4ff1c9f511f5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125435
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
-rw-r--r-- | sw/source/uibase/docvw/edtwin.cxx | 34 |
1 files changed, 18 insertions, 16 deletions
diff --git a/sw/source/uibase/docvw/edtwin.cxx b/sw/source/uibase/docvw/edtwin.cxx index 52022b1a465a..4c8608c4a5b9 100644 --- a/sw/source/uibase/docvw/edtwin.cxx +++ b/sw/source/uibase/docvw/edtwin.cxx @@ -2041,6 +2041,15 @@ KEYINPUT_CHECKTABLE_INSDEL: } } } + else if (rSh.GetSelectionType() & + (SelectionType::Graphic | + SelectionType::Frame | + SelectionType::Ole | + SelectionType::DrawObject | + SelectionType::DbForm)) + { + eKeyState = SwKeyState::NextObject; + } else if ( rSh.GetTableFormat() ) { if( rSh.HasSelection() || rSh.HasReadonlySel() ) @@ -2051,14 +2060,6 @@ KEYINPUT_CHECKTABLE_INSDEL: eNextKeyState = SwKeyState::NextCell; } } - else if ( rSh.GetSelectionType() & - (SelectionType::Graphic | - SelectionType::Frame | - SelectionType::Ole | - SelectionType::DrawObject | - SelectionType::DbForm)) - - eKeyState = SwKeyState::NextObject; else { eKeyState = SwKeyState::InsTab; @@ -2096,6 +2097,15 @@ KEYINPUT_CHECKTABLE_INSDEL: else eKeyState = SwKeyState::NumUp; } + else if (rSh.GetSelectionType() & + (SelectionType::Graphic | + SelectionType::Frame | + SelectionType::Ole | + SelectionType::DrawObject | + SelectionType::DbForm)) + { + eKeyState = SwKeyState::PrevObject; + } else if ( rSh.GetTableFormat() ) { if( rSh.HasSelection() || rSh.HasReadonlySel() ) @@ -2106,14 +2116,6 @@ KEYINPUT_CHECKTABLE_INSDEL: eNextKeyState = SwKeyState::PrevCell; } } - else if ( rSh.GetSelectionType() & - (SelectionType::Graphic | - SelectionType::Frame | - SelectionType::Ole | - SelectionType::DrawObject | - SelectionType::DbForm)) - - eKeyState = SwKeyState::PrevObject; else { eKeyState = SwKeyState::End; |