xmloff/source/style/xmlnumfi.cxx | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-)
New commits: commit 15d00363bbf13f26f5de02f958923a80a4f652eb Author: Laurent Balland-Poirier <laurent.balland-poir...@laposte.net> Date: Tue Mar 31 20:33:15 2015 +0200 Engineering notation: Slight optimisation Update of commit Ia18f9e150ca32aa9bbe133c082c3f9330e949f11 Change-Id: I5118619f2ab669f90e0377d9cabdba4778179581 Reviewed-on: https://gerrit.libreoffice.org/15100 Tested-by: Jenkins <c...@libreoffice.org> Reviewed-by: Eike Rathke <er...@redhat.com> Tested-by: Eike Rathke <er...@redhat.com> diff --git a/xmloff/source/style/xmlnumfi.cxx b/xmloff/source/style/xmlnumfi.cxx index f0f67c4..f7b9e82 100644 --- a/xmloff/source/style/xmlnumfi.cxx +++ b/xmloff/source/style/xmlnumfi.cxx @@ -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, '#' ); } } _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits