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

New commits:
commit 8d2bf27c3f683e313fea37f8399b4b0be0d16df8
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 11:15:44 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>
    (cherry picked from commit 4fa0664acfd13111d96801bfd643d10ec838bd35)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149610

diff --git a/sw/source/core/doc/docedt.cxx b/sw/source/core/doc/docedt.cxx
index 7898af3b540d..021e100efdc7 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;
                                 }
                             }

Reply via email to