sw/source/uibase/docvw/edtwin.cxx | 34 ++++++++++++++++++---------------- 1 file changed, 18 insertions(+), 16 deletions(-)
New commits: commit 437d5a446733aca0a485218f29d8d7dcea4d3999 Author: Jim Raykowski <[email protected]> AuthorDate: Wed Nov 17 20:20:25 2021 -0900 Commit: Mike Kaganski <[email protected]> CommitDate: Sun Nov 21 09:47:57 2021 +0100 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 <[email protected]> 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;
