sw/source/core/doc/docedt.cxx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
New commits: commit bb97bfe3168916ec54404a35f1f0d66d8c06c50d Author: László Németh <nem...@numbertext.org> AuthorDate: Mon Mar 27 17:59:15 2023 +0200 Commit: László Németh <nem...@numbertext.org> CommitDate: Tue Mar 28 07:30:41 2023 +0000 tdf#153628 sw: fix locked spell checking in spelling dialog Which resulted incomplete spell checking finished before checking the document. Regression from commit b484e5d9e0d22b794c2d1c73741191836158a4ad "use more SwPosition::Assign". Follow-up to commit 2780b026f912a103aea3f8dc19319b998d19a43a "tdf#152738 sw: fix lost SwPosition in spelling dialog" and commit 221d76260096b9e6b4c4479b1b89c95af8b05774 "simplify assignment". Change-Id: Ib66903596847016ddaf68da42813dd3a839adb59 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149633 Tested-by: Jenkins Reviewed-by: László Németh <nem...@numbertext.org> diff --git a/sw/source/core/doc/docedt.cxx b/sw/source/core/doc/docedt.cxx index 5d1e296e0b07..a93000b679fc 100644 --- a/sw/source/core/doc/docedt.cxx +++ b/sw/source/core/doc/docedt.cxx @@ -652,8 +652,10 @@ uno::Any SwDoc::Spell( SwPaM& rPaM, aRet <<= aResult; //put the cursor to the current error const linguistic2::SingleProofreadingError &rError = aResult.aErrors[0]; - pSttPos->Assign(*pNd->GetTextNode(), aConversionMap.ConvertToModelPosition( rError.nErrorStart ).mnPos ); - pEndPos->Assign(*pNd->GetTextNode(), aConversionMap.ConvertToModelPosition( rError.nErrorStart + rError.nErrorLength ).mnPos ); + pSttPos->Assign(nCurrNd, pSttPos->GetContentIndex()); + pEndPos->Assign(nCurrNd, pEndPos->GetContentIndex()); + pSpellArgs->pStartPos->Assign(*pNd->GetTextNode(), aConversionMap.ConvertToModelPosition( rError.nErrorStart ).mnPos ); + pSpellArgs->pEndPos->Assign(*pNd->GetTextNode(), aConversionMap.ConvertToModelPosition( rError.nErrorStart + rError.nErrorLength ).mnPos ); nCurrNd = nEndNd; } }