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
commitb6ea51bd625595ff923a1695b2137e476aaa0d52 (patch)
treea9967ca551301ae552f262f3b10ade4d7d91b4af
parentc74ef5767ef2f670aab7401bb331bf8a0ba83c17 (diff)
parente89b22dab8ee99c494150d5ccd1f78ba0c8fe502 (diff)
-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 cbd55fd5f..d2cbca2c4 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