[Libreoffice-commits] core.git: Branch 'libreoffice-7-0' - sw/source
Justin Luth (via logerrit)
logerrit at kemper.freedesktop.org
Tue Jul 14 17:19:37 UTC 2020
sw/source/uibase/shells/textsh1.cxx | 4 ++++
1 file changed, 4 insertions(+)
New commits:
commit 8901f44746f3df147d327e95125cbd4a08049843
Author: Justin Luth <justin_luth at sil.org>
AuthorDate: Tue Jul 14 14:18:36 2020 +0300
Commit: Justin Luth <justin_luth at sil.org>
CommitDate: Tue Jul 14 19:19:03 2020 +0200
tdf#134654 sw: Alt-X - end keyboard selection too
The selection itself was cancelled, but not the fact that
a keyboard selection was "in progress".
EndSelect is slightly heavy, so wrap it in a
very lightweight if statement.
ClearMark also checks HasMark, so real purpose
in first checking it.
Change-Id: I969a694c46d92201f3c3f2121e3fa3a2af27253c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98719
Tested-by: Jenkins
Reviewed-by: Justin Luth <justin_luth at sil.org>
Reviewed-by: Mike Kaganski <mike.kaganski at collabora.com>
(cherry picked from commit cef5a2d780ad01105dae860f6293f6f137603027)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98649
diff --git a/sw/source/uibase/shells/textsh1.cxx b/sw/source/uibase/shells/textsh1.cxx
index 9567067f13e7..a7eef3d5cf6f 100644
--- a/sw/source/uibase/shells/textsh1.cxx
+++ b/sw/source/uibase/shells/textsh1.cxx
@@ -365,7 +365,11 @@ void SwTextShell::Execute(SfxRequest &rReq)
aRewriter.AddRule( UndoArg3, sReplacement );
rWrtSh.StartUndo(SwUndoId::REPLACE, &aRewriter);
rWrtSh.GetCursor()->Normalize(false);
+
rWrtSh.ClearMark();
+ if( rWrtSh.IsInSelect() ) // cancel any in-progress keyboard selection as well
+ rWrtSh.EndSelect();
+
for( sal_uInt32 i=aToggle.CharsToDelete(); i > 0; --i )
rWrtSh.DelLeft();
rWrtSh.Insert2( sReplacement );
More information about the Libreoffice-commits
mailing list