ooo-build r14240 - in trunk: . patches/dev300



Author: kyoshida
Date: Wed Oct  8 03:54:43 2008
New Revision: 14240
URL: http://svn.gnome.org/viewvc/ooo-build?rev=14240&view=rev

Log:
2008-10-07  Kohei Yoshida  <kyoshida novell com>

	* patches/dev300/calc-formula-datevalue-strip-time.diff: strip the 
	fractional part (time part) of a date-time value when using DATEVALUE
	function, for Excel and OpenFormula compatibility (i#94765).

	* patches/dev300/apply: apply the new patch.


Added:
   trunk/patches/dev300/calc-formula-datevalue-strip-time.diff
Modified:
   trunk/ChangeLog
   trunk/patches/dev300/apply

Modified: trunk/patches/dev300/apply
==============================================================================
--- trunk/patches/dev300/apply	(original)
+++ trunk/patches/dev300/apply	Wed Oct  8 03:54:43 2008
@@ -1793,6 +1793,9 @@
 # to xls.
 chart-subtitle-xls-export.diff, i#92357, kohei
 
+# strip the fraction part of a date-time value when using DATEVALUE.
+calc-formula-datevalue-strip-time, i#94765, kohei
+
 # Implement external range names.
 calc-external-defined-names-sc.diff, i#3740, i#4385, n#355685, kohei
 calc-external-defined-names-offapi.diff, i#3740, i#4385, n#355685, kohei

Added: trunk/patches/dev300/calc-formula-datevalue-strip-time.diff
==============================================================================
--- (empty file)
+++ trunk/patches/dev300/calc-formula-datevalue-strip-time.diff	Wed Oct  8 03:54:43 2008
@@ -0,0 +1,13 @@
+diff --git sc/source/core/tool/interpr2.cxx sc/source/core/tool/interpr2.cxx
+index 3dc3096..c9c00ef 100644
+--- sc/source/core/tool/interpr2.cxx
++++ sc/source/core/tool/interpr2.cxx
+@@ -171,7 +171,7 @@ void ScInterpreter::ScGetDateValue()
+     {
+         short eType = pFormatter->GetType(nFIndex);
+         if (eType == NUMBERFORMAT_DATE || eType == NUMBERFORMAT_DATETIME)
+-            PushDouble(fVal);
++            PushDouble(::rtl::math::approxFloor(fVal));
+         else
+             PushIllegalArgument();
+     }



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]