sw/source/core/doc/DocumentContentOperationsManager.cxx |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 6af4500fffe0d0db03b4d4a7e77cf627124aefc1
Author:     Michael Stahl <michael.st...@allotropia.de>
AuthorDate: Tue Dec 14 17:32:28 2021 +0100
Commit:     Thorsten Behrens <thorsten.behr...@allotropia.de>
CommitDate: Wed Dec 15 08:40:47 2021 +0100

    tdf#136855 sw: fix ReplaceRangeImpl() restoring of rPam
    
    This broke in CWS swrefactormarks2 (commit
    df6d312ca537402463e4eb0530f22b956600fc02) but for spell-checking the
    ReplaceRange() wasn't used until commit
    e1629c210ad78310e3d48c0756723134a27b89df.
    
    Change-Id: I4a6256b65b89e21e9e87ff45d0c5e6c4577a5846
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126842
    Tested-by: Jenkins
    Reviewed-by: Michael Stahl <michael.st...@allotropia.de>
    (cherry picked from commit d16c5f47600d236e911ae50d0e58a3f2256f5a61)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126822
    Reviewed-by: Thorsten Behrens <thorsten.behr...@allotropia.de>

diff --git a/sw/source/core/doc/DocumentContentOperationsManager.cxx 
b/sw/source/core/doc/DocumentContentOperationsManager.cxx
index 4d0891a725fe..457e5aa61555 100644
--- a/sw/source/core/doc/DocumentContentOperationsManager.cxx
+++ b/sw/source/core/doc/DocumentContentOperationsManager.cxx
@@ -4477,8 +4477,8 @@ bool DocumentContentOperationsManager::ReplaceRangeImpl( 
SwPaM& rPam, const OUSt
                 m_rDoc.getIDocumentRedlineAccess().SetRedlineFlags( eOld );
 
                 *rPam.GetPoint() = pBkmk->GetMarkPos();
-                if(pBkmk->IsExpanded())
-                    *rPam.GetMark() = pBkmk->GetOtherMarkPos();
+                *rPam.GetMark() = pBkmk->IsExpanded() ? 
pBkmk->GetOtherMarkPos() : pBkmk->GetMarkPos();
+
                 m_rDoc.getIDocumentMarkAccess()->deleteMark(pBkmk);
             }
             bJoinText = false;

Reply via email to