[Libreoffice-commits] core.git: editeng/source

Laurent Balland-Poirier laurent.balland-poirier at laposte.net
Sun Nov 3 16:44:05 CET 2013


 editeng/source/misc/svxacorr.cxx |    2 ++
 1 file changed, 2 insertions(+)

New commits:
commit 938881340e9203d3b265596b8c7359bb27560912
Author: Laurent Balland-Poirier <laurent.balland-poirier at laposte.net>
Date:   Thu Oct 10 20:16:07 2013 +0200

    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 at redhat.com>
    Tested-by: Eike Rathke <erack at redhat.com>

diff --git a/editeng/source/misc/svxacorr.cxx b/editeng/source/misc/svxacorr.cxx
index 2777137..4479705 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 ) &&


More information about the Libreoffice-commits mailing list