ooo-build r12563 - in branches/ooo-build-2-4-1: . patches/src680 test/excel



Author: kyoshida
Date: Fri May 16 16:45:43 2008
New Revision: 12563
URL: http://svn.gnome.org/viewvc/ooo-build?rev=12563&view=rev

Log:
2008-05-16  Kohei Yoshida  <kyoshida novell com>

	* patches/src680/sc-string-arg-ref-formula-cell.diff: convert text to
	a number in a referenced formula cell. (n#391330)
	
	* patches/src680/apply: apply this patch.
	
	* test/excel/textNumberTest.xls: include a test case for referenced
	formula cell.


Added:
   branches/ooo-build-2-4-1/patches/src680/sc-string-arg-ref-formula-cell.diff
Modified:
   branches/ooo-build-2-4-1/ChangeLog
   branches/ooo-build-2-4-1/patches/src680/apply
   branches/ooo-build-2-4-1/test/excel/textNumberTest.xls

Modified: branches/ooo-build-2-4-1/patches/src680/apply
==============================================================================
--- branches/ooo-build-2-4-1/patches/src680/apply	(original)
+++ branches/ooo-build-2-4-1/patches/src680/apply	Fri May 16 16:45:43 2008
@@ -665,6 +665,10 @@
 # Excel compatibility for handling of "string numbers".
 sc-string-arg.diff, i#5658, kohei
 
+# Fix for the above string number patch, for cases where a formula cell is
+# being referenced by the origin cell.
+sc-string-arg-ref-formula-cell.diff, n#391330, kohei
+
 # Print_Area/Print_Titles are only relevant for sheet local names, n#191005
 sc-xls-builtin-name-scope.diff, n#191005, n#257422, jonp
 

Added: branches/ooo-build-2-4-1/patches/src680/sc-string-arg-ref-formula-cell.diff
==============================================================================
--- (empty file)
+++ branches/ooo-build-2-4-1/patches/src680/sc-string-arg-ref-formula-cell.diff	Fri May 16 16:45:43 2008
@@ -0,0 +1,20 @@
+diff -urp --exclude=CVS --exclude=unxlngi6.pro --exclude=sc.vpj sc.clean/source/core/tool/interpr4.cxx sc/source/core/tool/interpr4.cxx
+--- sc.clean/source/core/tool/interpr4.cxx	2008-05-16 12:06:11.000000000 -0400
++++ sc/source/core/tool/interpr4.cxx	2008-05-16 12:18:44.000000000 -0400
+@@ -242,8 +242,14 @@ double ScInterpreter::GetCellValueOrZero
+ 					}
+ 					else
+ 					{
+-                        SetError(errCellNoValue);
+-						fValue = 0.0;
++                        String aStr;
++                        pFCell->GetString(aStr);
++                        sal_uInt32 nFIndex = 0;
++                        if (!pFormatter->IsNumberFormat(aStr, nFIndex, fValue))
++                        {
++                            SetError(errCellNoValue);
++                            fValue = 0.0;
++                        }
+ 					}
+ 				}
+ 				else

Modified: branches/ooo-build-2-4-1/test/excel/textNumberTest.xls
==============================================================================
Binary files. No diff available.



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