gnumeric r16330 - in trunk: . src



Author: mortenw
Date: Fri Feb  1 18:11:57 2008
New Revision: 16330
URL: http://svn.gnome.org/viewvc/gnumeric?rev=16330&view=rev

Log:
2008-02-01  Morten Welinder  <terra gnome org>

	* src/expr.c (gnm_expr_eval): Fix FMRs for circular array
	formulas.



Modified:
   trunk/ChangeLog
   trunk/NEWS
   trunk/src/expr.c

Modified: trunk/NEWS
==============================================================================
--- trunk/NEWS	(original)
+++ trunk/NEWS	Fri Feb  1 18:11:57 2008
@@ -20,6 +20,7 @@
 	  [#513317] [#513361] [#513364] [#513551] [#513605] [#513608]
 	* Fix non-ascii export problem.  [#511135]
 	* Band-aid evaluation problem with broken xls.  [#513559]
+	* Fix circular array formula problem.
 
 --------------------------------------------------------------------------
 Gnumeric 1.8.0

Modified: trunk/src/expr.c
==============================================================================
--- trunk/src/expr.c	(original)
+++ trunk/src/expr.c	Fri Feb  1 18:11:57 2008
@@ -1376,14 +1376,14 @@
 		GnmEvalPos range_pos = *pos;
 		range_pos.array = &expr->array_corner;
 
-		/* Release old value if necessary */
-		a = expr->array_corner.value;
-		if (a != NULL)
-			value_release (a);
 		a = gnm_expr_eval (expr->array_corner.expr, &range_pos,
 			flags | GNM_EXPR_EVAL_PERMIT_NON_SCALAR);
+
+		if (expr->array_corner.value)
+			value_release (expr->array_corner.value);
+
 		/* Store real result (cast away const)*/
-		*((GnmValue **)&(expr->array_corner.value)) = a;
+		((GnmExpr*)expr)->array_corner.value = a;
 
 		if (a != NULL &&
 		    (a->type == VALUE_CELLRANGE || a->type == VALUE_ARRAY)) {



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