Engineering notation: Slight optimisation

Update of commit Ia18f9e150ca32aa9bbe133c082c3f9330e949f11

Change-Id: I5118619f2ab669f90e0377d9cabdba4778179581
Reviewed-on: https://gerrit.libreoffice.org/15100
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Eike Rathke <erack@redhat.com>
Tested-by: Eike Rathke <erack@redhat.com>
This commit is contained in:
Laurent Balland-Poirier
2015-03-31 20:33:15 +02:00
committed by Eike Rathke
parent 853d5f27d6
commit 15d00363bb

View File

@@ -1230,7 +1230,7 @@ void SvXMLNumFmtElementContext::EndElement()
// exponential interval for engineering notation
if( !aNumInfo.bGrouping && aNumInfo.nExpInterval > aNumInfo.nInteger )
{
for (sal_Int32 i=0; i<aNumInfo.nExpInterval-aNumInfo.nInteger; i++)
for (sal_Int32 i=aNumInfo.nInteger; i<aNumInfo.nExpInterval; i++)
{
rParent.AddToCode( '#' );
}
@@ -1825,12 +1825,10 @@ void SvXMLNumFormatContext::AddNumber( const SvXMLNumberInfo& rInfo )
else
nIndex = -1;
}
if( rInfo.nExpInterval > nDigits )
while ( rInfo.nExpInterval > nDigits )
{
for (sal_Int32 i=0; i<rInfo.nExpInterval-nDigits; i++)
{
aNumStr.insert( 0, '#' );
}
nDigits++;
aNumStr.insert( 0, '#' );
}
}