Kaydet (Commit) cd5cc12d authored tarafından Caolán McNamara's avatar Caolán McNamara

nLog10Divisor is 1

Change-Id: I8820d435e2f26d04ac3eccb710383399d050e020
üst 56f81d96
......@@ -845,23 +845,17 @@ static void appendFixedInt( sal_Int32 nValue, OStringBuffer& rBuffer )
rBuffer.append( '-' );
nValue = -nValue;
}
sal_Int32 nFactor = 1, nDiv = nLog10Divisor;
while( nDiv-- )
nFactor *= 10;
sal_Int32 nInt = nValue / nFactor;
sal_Int32 nFactor = 10;
sal_Int32 nInt = nValue / nFactor;
rBuffer.append( nInt );
if( nFactor > 1 )
sal_Int32 nDecimal = nValue % nFactor;
if( nDecimal )
{
sal_Int32 nDecimal = nValue % nFactor;
if( nDecimal )
{
rBuffer.append( '.' );
// omit trailing zeros
while( (nDecimal % 10) == 0 )
nDecimal /= 10;
rBuffer.append( nDecimal );
}
rBuffer.append( '.' );
// omit trailing zeros
while( (nDecimal % 10) == 0 )
nDecimal /= 10;
rBuffer.append( nDecimal );
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment