summaryrefslogtreecommitdiff
path: root/svl
diff options
context:
space:
mode:
Diffstat (limited to 'svl')
-rw-r--r--svl/source/numbers/zformat.cxx4
1 files changed, 3 insertions, 1 deletions
diff --git a/svl/source/numbers/zformat.cxx b/svl/source/numbers/zformat.cxx
index 707b2362f0ed..2d0909c8782b 100644
--- a/svl/source/numbers/zformat.cxx
+++ b/svl/source/numbers/zformat.cxx
@@ -2086,7 +2086,9 @@ BOOL SvNumberformat::GetOutputString(double fNumber,
if (!nLen)
return false;
- if (nLen > 11)
+ // #i112250# With the 10-decimal limit, small numbers are formatted as "0".
+ // Switch to scientific in that case, too:
+ if (nLen > 11 || (OutString.EqualsAscii("0") && fNumber != 0.0))
{
sal_uInt16 nStandardPrec = rScan.GetStandardPrec();
nStandardPrec = ::std::min(nStandardPrec, static_cast<sal_uInt16>(14)); // limits to 14 decimals