diff options
author | Tamás Zolnai <tamas.zolnai@collabora.com> | 2021-01-12 16:00:46 +0100 |
---|---|---|
committer | Xisco Fauli <xiscofauli@libreoffice.org> | 2021-01-14 09:28:19 +0100 |
commit | d21b5b132976474338e57506fb04a2e9b294db9d (patch) | |
tree | a46b40e695b270890d44eb83b7de483246880760 | |
parent | 0774d315d3151c2cf8b6c01ab1f8c76a52fbb742 (diff) |
tdf#139566: Fix select all (table + text) when document window looses focus.
Without setting mbSelectAll properly the selection cursor
is converted to a SwShellTableCursor, which can't handle
if a selection is extended outside of the table.
Change-Id: Ibd43097ac782b9fc02ff818d3911ebcd20efbd21
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109185
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109205
Tested-by: Jenkins
(cherry picked from commit 68b1ae7b493eea4d77f36a0c8566ca0224f04798)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109123
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
-rw-r--r-- | sw/source/core/crsr/crsrsh.cxx | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/sw/source/core/crsr/crsrsh.cxx b/sw/source/core/crsr/crsrsh.cxx index 1aba8c3ac22f..701e2f16a7e9 100644 --- a/sw/source/core/crsr/crsrsh.cxx +++ b/sw/source/core/crsr/crsrsh.cxx @@ -2430,6 +2430,8 @@ void SwCursorShell::ShellLoseFocus() void SwCursorShell::ShellGetFocus() { + comphelper::FlagRestorationGuard g(mbSelectAll, StartsWithTable() && ExtendedSelectedAll()); + m_bHasFocus = true; if( !m_bBasicHideCursor && VisArea().Width() ) { |