[ooo-build-commit] .: patches/dev300
Kohei Yoshida
kohei at kemper.freedesktop.org
Mon Apr 12 12:31:43 PDT 2010
patches/dev300/apply | 3 ++
patches/dev300/calc-autodecimal-ods-fix.diff | 40 +++++++++++++++++++++++++++
2 files changed, 43 insertions(+)
New commits:
commit 86d86bb4ed09b7f847781cead68d844098b1ec97
Author: Kohei Yoshida <kyoshida at novell.com>
Date: Mon Apr 12 15:30:30 2010 -0400
Try not to export negative decimal places value in ODS.
See i#110634 for details.
* patches/dev300/apply:
* patches/dev300/calc-autodecimal-ods-fix.diff:
diff --git a/patches/dev300/apply b/patches/dev300/apply
index ff81070..ab0aab6 100644
--- a/patches/dev300/apply
+++ b/patches/dev300/apply
@@ -3796,6 +3796,9 @@ calc-formula-r1c1-ui-fix.diff, n#595078, n#595080, kohei
# Fix handling of DB functions.
calc-formula-db-function-fix.diff, n#594332, n#595713, kohei
+# Avoid exporting negative decimal places in ods format.
+calc-autodecimal-ods-fix.diff, i#110634, kohei
+
[ GentooExperimental ]
SectionOwner => hmth
# jemalloc, FreeBSD 7 allocator
diff --git a/patches/dev300/calc-autodecimal-ods-fix.diff b/patches/dev300/calc-autodecimal-ods-fix.diff
new file mode 100644
index 0000000..9739fa5
--- /dev/null
+++ b/patches/dev300/calc-autodecimal-ods-fix.diff
@@ -0,0 +1,40 @@
+diff --git sc/source/core/tool/docoptio.cxx sc/source/core/tool/docoptio.cxx
+index bf5fc09..0b66c22 100644
+--- sc/source/core/tool/docoptio.cxx
++++ sc/source/core/tool/docoptio.cxx
+@@ -128,7 +128,7 @@ void ScDocOptions::ResetDocOptions()
+ bIsIter = FALSE;
+ nIterCount = 100;
+ fIterEps = 1.0E-3;
+- nPrecStandardFormat = 2;
++ nPrecStandardFormat = SvNumberFormatter::UNLIMITED_PRECISION;
+ nDay = 30;
+ nMonth = 12;
+ nYear = 1899;
+diff --git sc/source/ui/unoobj/defltuno.cxx sc/source/ui/unoobj/defltuno.cxx
+index a6a4867..bb6f411 100644
+--- sc/source/ui/unoobj/defltuno.cxx
++++ sc/source/ui/unoobj/defltuno.cxx
+@@ -49,6 +49,8 @@
+ #include "unonames.hxx"
+ #include "docoptio.hxx"
+
++#include <limits>
++
+ using namespace ::com::sun::star;
+
+ //------------------------------------------------------------------------
+@@ -253,7 +255,12 @@ uno::Any SAL_CALL ScDocDefaultsObj::getPropertyValue( const rtl::OUString& aProp
+ if (pDoc)
+ {
+ const ScDocOptions& aDocOpt = pDoc->GetDocOptions();
+- aRet <<= static_cast<sal_Int16> (aDocOpt.GetStdPrecision());
++ sal_uInt16 nPrec = aDocOpt.GetStdPrecision();
++ // the max value of unsigned 16-bit integer is used as the flag
++ // value for unlimited precision, c.f.
++ // SvNumberFormatter::UNLIMITED_PRECISION.
++ if (nPrec <= ::std::numeric_limits<sal_Int16>::max())
++ aRet <<= static_cast<sal_Int16> (nPrec);
+ }
+ else
+ throw uno::RuntimeException();
More information about the ooo-build-commit
mailing list