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

New commits:
commit 9d66c93dba0e91e8023d549d9eb5521d7829cb3f
Author:     Michael Stahl <michael.st...@allotropia.de>
AuthorDate: Tue Dec 14 17:32:28 2021 +0100
Commit:     Michael Stahl <michael.st...@allotropia.de>
CommitDate: Fri Dec 17 11:24:39 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>
    (cherry picked from commit 6af4500fffe0d0db03b4d4a7e77cf627124aefc1)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126953
    Tested-by: Michael Stahl <michael.st...@allotropia.de>

diff --git a/sw/source/core/doc/DocumentContentOperationsManager.cxx 
b/sw/source/core/doc/DocumentContentOperationsManager.cxx
index 5afadfff3de8..c3e5298c81da 100644
--- a/sw/source/core/doc/DocumentContentOperationsManager.cxx
+++ b/sw/source/core/doc/DocumentContentOperationsManager.cxx
@@ -4406,8 +4406,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