From 938881340e9203d3b265596b8c7359bb27560912 Mon Sep 17 00:00:00 2001 From: Laurent Balland-Poirier Date: Thu, 10 Oct 2013 20:16:07 +0200 Subject: fdo#69762 Scientific number AutoCorrect as ordinal In French, ordinal number autocorrection transforms 2e-3 in 2^e-3 which is annoying in Calc. This patch avoids autocorrection with [digit][e|E]- Change-Id: Iaaff4f8d6e667fc84a68d7c11e1a96da13594a18 Reviewed-on: https://gerrit.libreoffice.org/6204 Reviewed-by: Eike Rathke Tested-by: Eike Rathke --- editeng/source/misc/svxacorr.cxx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/editeng/source/misc/svxacorr.cxx b/editeng/source/misc/svxacorr.cxx index 2777137eea95..4479705cb11c 100644 --- a/editeng/source/misc/svxacorr.cxx +++ b/editeng/source/misc/svxacorr.cxx @@ -1387,6 +1387,8 @@ SvxAutoCorrect::DoAutoCorrect( SvxAutoCorrDoc& rDoc, const OUString& rTxt, } if( ( IsAutoCorrFlag( nRet = ChgOrdinalNumber ) && + (nInsPos >= 2 ) && // fdo#69762 avoid autocorrect for 2e-3 + ( '-' != cChar || 'E' != toupper(rTxt[nInsPos-1]) || '0' > rTxt[nInsPos-2] || '9' < rTxt[nInsPos-2] ) && FnChgOrdinalNumber( rDoc, rTxt, nCapLttrPos, nInsPos, eLang ) ) || ( IsAutoCorrFlag( nRet = SetINetAttr ) && ( ' ' == cChar || '\t' == cChar || 0x0a == cChar || !cChar ) && -- cgit v1.2.3