Kaydet (Commit) 15d00363 authored tarafından Laurent Balland-Poirier's avatar Laurent Balland-Poirier Kaydeden (comit) Eike Rathke

Engineering notation: Slight optimisation

Update of commit Ia18f9e150ca32aa9bbe133c082c3f9330e949f11

Change-Id: I5118619f2ab669f90e0377d9cabdba4778179581
Reviewed-on: https://gerrit.libreoffice.org/15100Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarEike Rathke <erack@redhat.com>
Tested-by: 's avatarEike Rathke <erack@redhat.com>
üst 853d5f27
......@@ -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,14 +1825,12 @@ void SvXMLNumFormatContext::AddNumber( const SvXMLNumberInfo& rInfo )
else
nIndex = -1;
}
if( rInfo.nExpInterval > nDigits )
{
for (sal_Int32 i=0; i<rInfo.nExpInterval-nDigits; i++)
while ( rInfo.nExpInterval > nDigits )
{
nDigits++;
aNumStr.insert( 0, '#' );
}
}
}
if ( nEmbeddedCount )
{
......
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