vcl/source/control/field.cxx |    7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)

New commits:
commit 1ee0f3ed48a7268b124cf1ff2faba7c1b26e04f1
Author:     Mike Kaganski <[email protected]>
AuthorDate: Sun Oct 19 14:50:15 2025 +0500
Commit:     Mike Kaganski <[email protected]>
CommitDate: Sun Oct 19 14:00:02 2025 +0200

    Fix code designed for integers, but used with floating-point values
    
    It was always this way, initially in MetricField::ConvertDoubleValue,
    since commit 8ab086b6cc054501bfbf7ef6fa509c393691e860 (initial import,
    2000-09-18).
    
    Change-Id: Ie1643ba4289f7077154292d0222ce114e977ecc1
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/192665
    Reviewed-by: Mike Kaganski <[email protected]>
    Tested-by: Jenkins

diff --git a/vcl/source/control/field.cxx b/vcl/source/control/field.cxx
index c49386ca0cde..1f510ae838c9 100644
--- a/vcl/source/control/field.cxx
+++ b/vcl/source/control/field.cxx
@@ -1101,12 +1101,7 @@ double convertValue( double nValue, tools::Long nDigits, 
FieldUnit eInUnit, Fiel
 {
     if ( nDigits < 0 )
     {
-        while ( nDigits )
-        {
-            nValue += 5;
-            nValue /= 10;
-            nDigits++;
-        }
+        nValue /= ImplPower10(-nDigits);
     }
     else
     {

Reply via email to