You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openoffice.apache.org by da...@apache.org on 2012/11/01 09:59:36 UTC

svn commit: r1404506 - /incubator/ooo/trunk/main/basic/source/sbx/sbxscan.cxx

Author: damjan
Date: Thu Nov  1 08:59:35 2012
New Revision: 1404506

URL: http://svn.apache.org/viewvc?rev=1404506&view=rev
Log:
#i76852#  Basic : incorrect conversions Single to String and Double to String

Call myftoa() with nExpWidth=4 even when nNum=dMaxNumWithoutExp.

Found by: bmarcelly
Patch by: Damjan Jovanovic
Review by: Oliver-Rainer Wittmann


Modified:
    incubator/ooo/trunk/main/basic/source/sbx/sbxscan.cxx

Modified: incubator/ooo/trunk/main/basic/source/sbx/sbxscan.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/basic/source/sbx/sbxscan.cxx?rev=1404506&r1=1404505&r2=1404506&view=diff
==============================================================================
--- incubator/ooo/trunk/main/basic/source/sbx/sbxscan.cxx (original)
+++ incubator/ooo/trunk/main/basic/source/sbx/sbxscan.cxx Thu Nov  1 08:59:35 2012
@@ -402,7 +402,7 @@ void ImpCvtNum( double nNum, short nPrec
 		*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,
         sal_False, sal_True, cDecimalSep );
 	// Trailing Zeroes weg:
 	for( p = cBuf; *p &&( *p != 'E' ); p++ ) {}