summaryrefslogtreecommitdiff
path: root/sw/source
diff options
context:
space:
mode:
authorNoel Grandin <noelgrandin@gmail.com>2022-10-09 13:46:45 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2022-10-09 21:04:40 +0200
commit221d76260096b9e6b4c4479b1b89c95af8b05774 (patch)
tree63f8119da6f6da92d1b5e52693da219b33b07638 /sw/source
parentb484e5d9e0d22b794c2d1c73741191836158a4ad (diff)
simplify assignment
pSttPos and pSpellArgs->pStartPos point at the same thing (and similarly for pEndPos), so no need to assign to them twice. Change-Id: I45a99187d07b24afa0667154e121e32557a389d3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141142 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sw/source')
-rw-r--r--sw/source/core/doc/docedt.cxx7
1 files changed, 2 insertions, 5 deletions
diff --git a/sw/source/core/doc/docedt.cxx b/sw/source/core/doc/docedt.cxx
index d2bb92dd4058..55c43a041f93 100644
--- a/sw/source/core/doc/docedt.cxx
+++ b/sw/source/core/doc/docedt.cxx
@@ -652,11 +652,8 @@ uno::Any SwDoc::Spell( SwPaM& rPaM,
aRet <<= aResult;
//put the cursor to the current error
const linguistic2::SingleProofreadingError &rError = aResult.aErrors[0];
- nCurrNd = pNd->GetIndex();
- pSttPos->Assign(nCurrNd);
- pEndPos->Assign(nCurrNd);
- pSpellArgs->pStartPos->Assign(*pNd->GetTextNode(), aConversionMap.ConvertToModelPosition( rError.nErrorStart ).mnPos );
- pSpellArgs->pEndPos->Assign(*pNd->GetTextNode(), aConversionMap.ConvertToModelPosition( rError.nErrorStart + rError.nErrorLength ).mnPos );
+ pSttPos->Assign(*pNd->GetTextNode(), aConversionMap.ConvertToModelPosition( rError.nErrorStart ).mnPos );
+ pEndPos->Assign(*pNd->GetTextNode(), aConversionMap.ConvertToModelPosition( rError.nErrorStart + rError.nErrorLength ).mnPos );
nCurrNd = nEndNd;
}
}