incubator-ooo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dam...@apache.org
Subject svn commit: r1404506 - /incubator/ooo/trunk/main/basic/source/sbx/sbxscan.cxx
Date Thu, 01 Nov 2012 08:59:36 GMT
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++ ) {}



Mime
View raw message