diff options
author | Julien Nabet <serval2412@yahoo.fr> | 2021-03-07 10:40:42 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2021-03-29 15:19:13 +0200 |
commit | ca9e8a3d2315b44f9f3eb59ab825fc1ede7e10df (patch) | |
tree | 937e2742b8d0bc555415b2c613984a2b48f4404f | |
parent | 8ff2119a06df1fae0447b21507878fbd34149488 (diff) |
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/+/112792
Tested-by: Jenkins
Reviewed-by: László Németh <nemeth@numbertext.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
-rw-r--r-- | sw/source/core/edit/autofmt.cxx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sw/source/core/edit/autofmt.cxx b/sw/source/core/edit/autofmt.cxx index 5c3e22aaed4a..5e806d73ea38 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); |