[ooo-build-commit] Branch 'ooo-build-3-1-1' - patches/dev300
Kohei Yoshida
kohei at kemper.freedesktop.org
Fri Oct 23 19:59:57 PDT 2009
patches/dev300/calc-general-type-auto-decimal-svtools.diff | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
New commits:
commit 7011943819078d380d4a92b64a967c2e645587f8
Author: Kohei Yoshida <kyoshida at novell.com>
Date: Fri Oct 23 22:56:12 2009 -0400
Fixed incorrect pre-decimal digit calculation for values < 1.
* patches/dev300/calc-general-type-auto-decimal-svtools.diff:
values less than 1.0 were incorrectly displayed in scientific
notation where they should have been displayed in decimal
notation.
diff --git a/patches/dev300/calc-general-type-auto-decimal-svtools.diff b/patches/dev300/calc-general-type-auto-decimal-svtools.diff
index 4de3095..d97dd27 100644
--- a/patches/dev300/calc-general-type-auto-decimal-svtools.diff
+++ b/patches/dev300/calc-general-type-auto-decimal-svtools.diff
@@ -214,7 +214,7 @@ index 368fb16..2be8168 100644
}
void SvNumberformat::ImpGetOutputInputLine(double fNumber, String& OutString)
-@@ -1958,6 +1979,62 @@ ULONG SvNumberformat::ImpGGTRound(ULONG x, ULONG y)
+@@ -1958,6 +1979,65 @@ ULONG SvNumberformat::ImpGGTRound(ULONG x, ULONG y)
}
}
@@ -251,7 +251,10 @@ index 368fb16..2be8168 100644
+ if (bSign)
+ fTestNum = -fTestNum;
+
-+ sal_uInt16 nDigitPre = static_cast<sal_uInt16>(ceil(log10(fTestNum)));
++ double fExp = log10(fTestNum);
++ // Values < 1.0 always have one digit before the decimal point.
++ sal_uInt16 nDigitPre = fExp >= 0.0 ? static_cast<sal_uInt16>(ceil(fExp)) : 1;
++
+ if (nDigitPre > 15)
+ {
+ lcl_GetOutputStringScientific(fNumber, nCharCount, GetFormatter(), rOutString);
More information about the ooo-build-commit
mailing list