diff options
author | Tamás Zolnai <tamas.zolnai@collabora.com> | 2021-01-12 16:00:46 +0100 |
---|---|---|
committer | Tamás Zolnai <tamas.zolnai@collabora.com> | 2021-01-20 23:02:56 +0100 |
commit | 1423d6e79ebc3d82d1971061273103c55073e358 (patch) | |
tree | 7bcdde55c9cefd192328589929a17a05c32ad308 | |
parent | 761a0eb179938d6dab9a85e86c2a7c5b264599ca (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>
(cherry picked from commit 7f150d63253e171e87c09225291c4e059aaf2476)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109624
-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 3e29c1b83f3b..57c8fe107028 100644 --- a/sw/source/core/crsr/crsrsh.cxx +++ b/sw/source/core/crsr/crsrsh.cxx @@ -2402,6 +2402,8 @@ void SwCursorShell::ShellLoseFocus() void SwCursorShell::ShellGetFocus() { + comphelper::FlagRestorationGuard g(mbSelectAll, StartsWithTable() && ExtendedSelectedAll()); + m_bHasFocus = true; if( !m_bBasicHideCursor && VisArea().Width() ) { |