sw/source/core/doc/DocumentContentOperationsManager.cxx | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-)
New commits: commit 19f2054c6063177d08c818c5b7eeba7ab9178249 Author: Michael Stahl <michael.st...@allotropia.de> AuthorDate: Tue Dec 14 19:34:36 2021 +0100 Commit: Michael Stahl <michael.st...@allotropia.de> CommitDate: Tue Dec 14 20:43:35 2021 +0100 tdf#141175 sw_redlinehide: fix crash in lcl_DeleteRedlines() The GetNext() returns itself if it's alone in the Ring. (regression from 27aa4b16bf704d0246595750daf57b57ff2577b3) Change-Id: Idf92ce5362c4a4acf1582f463fe7bafc8553b400 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126844 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.st...@allotropia.de> diff --git a/sw/source/core/doc/DocumentContentOperationsManager.cxx b/sw/source/core/doc/DocumentContentOperationsManager.cxx index 75a365908d53..3ddcf13c698e 100644 --- a/sw/source/core/doc/DocumentContentOperationsManager.cxx +++ b/sw/source/core/doc/DocumentContentOperationsManager.cxx @@ -408,7 +408,8 @@ namespace *pDelPam->GetPoint(), nDelCount ); } - if (pDelPam->GetNext() && *pDelPam->GetNext()->End() == *pDelPam->Start()) + if (pDelPam->GetNext() != pDelPam.get() + && *pDelPam->GetNext()->End() == *pDelPam->Start()) { *pDelPam->GetNext()->End() = *pDelPam->End(); pDelPam.reset(pDelPam->GetNext()); commit d16c5f47600d236e911ae50d0e58a3f2256f5a61 Author: Michael Stahl <michael.st...@allotropia.de> AuthorDate: Tue Dec 14 17:32:28 2021 +0100 Commit: Michael Stahl <michael.st...@allotropia.de> CommitDate: Tue Dec 14 20:43:25 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> diff --git a/sw/source/core/doc/DocumentContentOperationsManager.cxx b/sw/source/core/doc/DocumentContentOperationsManager.cxx index ab3bd4ca9cd8..75a365908d53 100644 --- a/sw/source/core/doc/DocumentContentOperationsManager.cxx +++ b/sw/source/core/doc/DocumentContentOperationsManager.cxx @@ -4595,8 +4595,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;