diff options
author | obo <obo@openoffice.org> | 2010-11-12 07:50:26 +0100 |
---|---|---|
committer | obo <obo@openoffice.org> | 2010-11-12 07:50:26 +0100 |
commit | b6ea51bd625595ff923a1695b2137e476aaa0d52 (patch) | |
tree | a9967ca551301ae552f262f3b10ade4d7d91b4af | |
parent | c74ef5767ef2f670aab7401bb331bf8a0ba83c17 (diff) | |
parent | e89b22dab8ee99c494150d5ccd1f78ba0c8fe502 (diff) |
CWS-TOOLING: integrate CWS calc63ooo/OOO330_m18ooo/OOO330_m17ooo/OOO330_m16ooo/OOO330_m15
-rw-r--r-- | sc/source/core/data/documen4.cxx | 7 |
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 |