summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorobo <obo@openoffice.org>2010-11-12 07:50:26 +0100
committerobo <obo@openoffice.org>2010-11-12 07:50:26 +0100
commit60851227548d3576a92898b13b0e1c15cc719f44 (patch)
tree8597041bcaf14fb7e30f6b311c3d1919578bf124
parent8b4a662f543875825dcadbe95008cbfe12fa8d32 (diff)
parent21f9cf032279da03d551b1e98218cf5832ee8364 (diff)
CWS-TOOLING: integrate CWS calc63
Notes
split repo tag: calc_ooo/OOO330_m15 split repo tag: calc_ooo/OOO330_m16 split repo tag: calc_ooo/OOO330_m17 split repo tag: calc_ooo/OOO330_m18
-rw-r--r--sc/source/core/data/documen4.cxx7
1 files changed, 6 insertions, 1 deletions
diff --git a/sc/source/core/data/documen4.cxx b/sc/source/core/data/documen4.cxx
index 148cc367534c..e8b58b0f71d3 100644
--- a/sc/source/core/data/documen4.cxx
+++ b/sc/source/core/data/documen4.cxx
@@ -505,7 +505,7 @@ double ScDocument::RoundValueAsShown( double fVal, ULONG nFormat )
&& nType != NUMBERFORMAT_TIME && nType != NUMBERFORMAT_DATETIME )
{
short nPrecision;
- if ( nFormat )
+ if ((nFormat % SV_COUNTRY_LANGUAGE_OFFSET) != 0)
{
nPrecision = (short)GetFormatTable()->GetFormatPrecision( nFormat );
switch ( nType )
@@ -524,7 +524,12 @@ double ScDocument::RoundValueAsShown( double fVal, ULONG nFormat )
}
}
else
+ {
nPrecision = (short)GetDocOptions().GetStdPrecision();
+ // #i115512# no rounding for automatic decimals
+ if (nPrecision == static_cast<short>(SvNumberFormatter::UNLIMITED_PRECISION))
+ return fVal;
+ }
double fRound = ::rtl::math::round( fVal, nPrecision );
if ( ::rtl::math::approxEqual( fVal, fRound ) )
return fVal; // durch Rundung hoechstens Fehler