diff options
author | Laurent Balland-Poirier <laurent.balland-poirier@laposte.net> | 2013-10-10 20:16:07 +0200 |
---|---|---|
committer | Eike Rathke <erack@redhat.com> | 2013-11-03 09:43:43 -0600 |
commit | 938881340e9203d3b265596b8c7359bb27560912 (patch) | |
tree | 2879c3db3667c14eed83a48db7f25f196625358e | |
parent | b1f5986c57445588d513eefff9c4e8ceb6f0f75a (diff) |
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 <erack@redhat.com>
Tested-by: Eike Rathke <erack@redhat.com>
-rw-r--r-- | editeng/source/misc/svxacorr.cxx | 2 |
1 files changed, 2 insertions, 0 deletions
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 ) && |