[Libreoffice-commits] .: basic/source

Noel Power noelp at kemper.freedesktop.org
Thu Nov 4 03:29:08 PDT 2010


 basic/source/sbx/sbxscan.cxx |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit a65154f60f3b5c239af3fe44027f2075f67e26fc
Author: John LeMoyne Castle <jlc at mail2lee.com>
Date:   Wed Nov 3 22:08:26 2010 -0600

    OO Basic Million-to-One bug (#i76852#) fixed
    
    Adds '=' to edge test in sbxscan.cxx ImpCvtNum so exponent prints and 1 million is 1e+6 instead of just 1 for singles.
    Same one char change does similar fix for OO Basic doubles and 1e+14.

diff --git a/basic/source/sbx/sbxscan.cxx b/basic/source/sbx/sbxscan.cxx
index 43d2ddf..aeff9a4 100644
--- a/basic/source/sbx/sbxscan.cxx
+++ b/basic/source/sbx/sbxscan.cxx
@@ -405,7 +405,7 @@ void ImpCvtNum( double nNum, short nPrec, ::rtl::OUString& rRes, BOOL bCoreStrin
         *p++ = '-';
     }
     double dMaxNumWithoutExp = (nPrec == 6) ? 1E6 : 1E14;
-    myftoa( nNum, p, nPrec,( nNum &&( nNum < 1E-1 || nNum > dMaxNumWithoutExp ) ) ? 4:0,
+    myftoa( nNum, p, nPrec,( nNum &&( nNum < 1E-1 || nNum >= dMaxNumWithoutExp ) ) ? 4:0,
         FALSE, TRUE, cDecimalSep );
     // Trailing Zeroes weg:
     for( p = cBuf; *p &&( *p != 'E' ); p++ ) {}


More information about the Libreoffice-commits mailing list