[Libreoffice-commits] core.git: Branch 'libreoffice-7-0' - sw/source

Michael Stahl (via logerrit) logerrit at kemper.freedesktop.org
Thu Aug 20 16:23:21 UTC 2020


 sw/source/uibase/shells/textsh1.cxx |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

New commits:
commit 0089f37fcfb166040326aedb99a11f7ce659fdb9
Author:     Michael Stahl <Michael.Stahl at cib.de>
AuthorDate: Wed Aug 19 18:55:27 2020 +0200
Commit:     Caolán McNamara <caolanm at redhat.com>
CommitDate: Thu Aug 20 18:22:39 2020 +0200

    tdf#135721 sw: fix spell check context menu deleting flys
    
    Kind of similar to e1629c210ad78310e3d48c0756723134a27b89df
    but the problem is at a higher level: SwTextShell::Execute() with
    SID_SPELLCHECK_APPLY_SUGGESTION should not DelLeft() + Insert() but
    just Replace().
    
    (regression from 28b77c89dfcafae82cf2a6d85731b643ff9290e5)
    
    Change-Id: I78487c7841ba22ccc6751240a8e55e08a86fba32
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101014
    Tested-by: Jenkins
    Reviewed-by: Michael Stahl <michael.stahl at cib.de>
    (cherry picked from commit ec579354af954867b829e7d08e4d752518c83728)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101059
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/sw/source/uibase/shells/textsh1.cxx b/sw/source/uibase/shells/textsh1.cxx
index c9e74390289a..f24e8127f6bb 100644
--- a/sw/source/uibase/shells/textsh1.cxx
+++ b/sw/source/uibase/shells/textsh1.cxx
@@ -1563,9 +1563,8 @@ void SwTextShell::Execute(SfxRequest &rReq)
 
         rWrtSh.StartUndo(SwUndoId::UI_REPLACE, &aRewriter);
         rWrtSh.StartAction();
-        rWrtSh.DelLeft();
 
-        rWrtSh.Insert( aTmp );
+        rWrtSh.Replace(aTmp, false);
 
         /* #102505# EndAction/EndUndo moved down since insertion
            of temporary auto correction is now undoable two and


More information about the Libreoffice-commits mailing list