sw/source/core/edit/autofmt.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
New commits: commit 0dba9eddafc7ba2c22554538a1324ee75ddb565e Author: Julien Nabet <serval2...@yahoo.fr> AuthorDate: Sun Mar 7 10:40:42 2021 +0100 Commit: Michael Stahl <michael.st...@allotropia.de> CommitDate: Tue Mar 30 11:32:54 2021 +0200 sw fr_FR AutoCorrect: fix crash using "Apply and Edit changes" Bad calling of SvxAutoCorrect::FnAddNonBrkSpace() in French documents, see tdf#140849 for a similar problem. Change-Id: I19b964fb8fe437c7f98342a873a456ffded75d82 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112120 (cherry picked from commit df41967a29c4f8243d1df2d9b23d7c41d4a13819) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112731 Tested-by: Michael Stahl <michael.st...@allotropia.de> Reviewed-by: Michael Stahl <michael.st...@allotropia.de> diff --git a/sw/source/core/edit/autofmt.cxx b/sw/source/core/edit/autofmt.cxx index 2a40b90d448f..060e8b2889b4 100644 --- a/sw/source/core/edit/autofmt.cxx +++ b/sw/source/core/edit/autofmt.cxx @@ -2184,7 +2184,7 @@ void SwAutoFormat::AutoCorrect(TextFrameIndex nPos) continue; // do not check further } - if ( m_aFlags.bAddNonBrkSpace ) + if ( m_aFlags.bAddNonBrkSpace && nPos < TextFrameIndex(pText->getLength()) ) { SetRedlineText( STR_AUTOFMTREDL_NON_BREAK_SPACE ); pATst->FnAddNonBrkSpace(aACorrDoc, *pText, sal_Int32(nPos), eLang, bNbspRunNext); _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits