summaryrefslogtreecommitdiff
path: root/svl/source/numbers/zformat.cxx
diff options
context:
space:
mode:
authorMihaela Kedikova <misheto@openoffice.org>2010-10-14 13:49:43 +0200
committerMihaela Kedikova <misheto@openoffice.org>2010-10-14 13:49:43 +0200
commit281d75599812f39484df4124d5bcf0a5cc91f30b (patch)
tree8434bd52ccad09c7c52b806fe7bd492877160d2a /svl/source/numbers/zformat.cxx
parent5de58a084612c45d20b58ef95159c67b5df422bb (diff)
parent525de6f8eeac6e357167467da0f9a9448433bb25 (diff)
tabcontrol: merge with DEV300_m89
Diffstat (limited to 'svl/source/numbers/zformat.cxx')
-rw-r--r--svl/source/numbers/zformat.cxx6
1 files changed, 4 insertions, 2 deletions
diff --git a/svl/source/numbers/zformat.cxx b/svl/source/numbers/zformat.cxx
index 707b2362f0ed..97f06171a4fc 100644
--- a/svl/source/numbers/zformat.cxx
+++ b/svl/source/numbers/zformat.cxx
@@ -2057,7 +2057,7 @@ BOOL SvNumberformat::GetOutputString(double fNumber,
OutString = rScan.GetFalseString();
return FALSE;
}
- if (eType & NUMBERFORMAT_TEXT && bStandard)
+ if (eType & NUMBERFORMAT_TEXT)
{
ImpGetOutputStandard(fNumber, OutString);
return FALSE;
@@ -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