[Libreoffice-commits] core.git: Branch 'distro/lhm/libreoffice-6-4+backports' - sw/source

Michael Stahl (via logerrit) logerrit at kemper.freedesktop.org
Thu Oct 15 11:41:55 UTC 2020


 sw/source/core/doc/DocumentContentOperationsManager.cxx |   10 ----------
 sw/source/uibase/wrtsh/wrtsh1.cxx                       |    4 ++++
 2 files changed, 4 insertions(+), 10 deletions(-)

New commits:
commit bc6e4fc8caf95b3b4a6cbfcfe906bd3084afdf30
Author:     Michael Stahl <Michael.Stahl at cib.de>
AuthorDate: Wed Oct 14 12:42:54 2020 +0200
Commit:     Michael Stahl <michael.stahl at cib.de>
CommitDate: Thu Oct 15 13:41:20 2020 +0200

    tdf#135260 sw_redlinehide: fix insert-with-delete differently
    
    The problem with the fix for tdf#127635 is that now the cursor doesn't
    move left on backspace if change tracking is on.
    
    (regression from 398ba26077f9029bdf6f7378bfc9ce8376b6f02d)
    
    Revert that and fix the autocorrect position in SwWrtShell::Insert()
    instead.
    
    Change-Id: I5989a589b654fc6e5ba3dd66922af15eff758ecc
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104280
    Tested-by: Jenkins
    Reviewed-by: Michael Stahl <michael.stahl at cib.de>
    (cherry picked from commit be4616d6b49b8c9cf1a90b212b24ead3dabcab6c)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104299
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    (cherry picked from commit 10c638e520096a0cc282d91ac2a447509f674a6f)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104332
    Tested-by: Michael Stahl <michael.stahl at cib.de>

diff --git a/sw/source/core/doc/DocumentContentOperationsManager.cxx b/sw/source/core/doc/DocumentContentOperationsManager.cxx
index ecebb3d000b6..909c88632f5e 100644
--- a/sw/source/core/doc/DocumentContentOperationsManager.cxx
+++ b/sw/source/core/doc/DocumentContentOperationsManager.cxx
@@ -2007,11 +2007,6 @@ void DocumentContentOperationsManager::DeleteRange( SwPaM & rPam )
 {
     lcl_DoWithBreaks( *this, rPam, &DocumentContentOperationsManager::DeleteRangeImpl );
 
-    if (m_rDoc.getIDocumentRedlineAccess().IsRedlineOn())
-    {
-        rPam.Normalize(false); // tdf#127635 put point at the end of deletion
-    }
-
     if (!m_rDoc.getIDocumentRedlineAccess().IsIgnoreRedline()
         && !m_rDoc.getIDocumentRedlineAccess().GetRedlineTable().empty())
     {
@@ -2188,11 +2183,6 @@ bool DocumentContentOperationsManager::DeleteAndJoin( SwPaM & rPam,
                 : &DocumentContentOperationsManager::DeleteAndJoinImpl,
                 bForceJoinNext );
 
-    if (m_rDoc.getIDocumentRedlineAccess().IsRedlineOn())
-    {
-        rPam.Normalize(false); // tdf#127635 put point at the end of deletion
-    }
-
     return ret;
 }
 
diff --git a/sw/source/uibase/wrtsh/wrtsh1.cxx b/sw/source/uibase/wrtsh/wrtsh1.cxx
index 9eb00d361b9a..0840ed3cd407 100644
--- a/sw/source/uibase/wrtsh/wrtsh1.cxx
+++ b/sw/source/uibase/wrtsh/wrtsh1.cxx
@@ -243,7 +243,11 @@ void SwWrtShell::Insert( const OUString &rStr )
 
         StartUndo(SwUndoId::REPLACE, &aRewriter);
         bStarted = true;
+        Push();
         bDeleted = DelRight();
+        Pop(SwCursorShell::PopMode::DeleteCurrent); // Restore selection (if tracking changes)
+        NormalizePam(false); // tdf#127635 put point at the end of deletion
+        ClearMark();
     }
 
     bCallIns ?


More information about the Libreoffice-commits mailing list