$NetBSD: patch-aa,v 1.1 2002/07/15 16:51:32 mycroft Exp $

--- plugins/psiconv/psiconv-read.c.orig	Sun Jul 14 13:19:07 2002
+++ plugins/psiconv/psiconv-read.c	Sun Jul 14 13:22:50 2002
@@ -420,7 +420,7 @@
 
 	formula = psiconv_get_formula (psi_formulas, psi_cell->ref_formula);
 
-	return (formula != NULL) ?  return parse_subexpr (formula) : NULL;
+	return (formula != NULL) ? parse_subexpr (formula) : NULL;
 }
 
 static void
@@ -429,14 +429,13 @@
 {
 	Cell *cell;
 	Value *val;
-	ExprTree *tree;
-	psiconv_formula psi_formula;
+	ExprTree *expr;
 
 	cell = sheet_cell_fetch (sheet, psi_cell->column, psi_cell->row);
 	if (!cell)
 		return;
 
-	val = value_new_from_psi_cell (psi_cell);
+	val = value_new_from_psi_cell (cell, psi_cell);
 
 	if (psi_cell->calculated)
 		expr = expr_new_from_formula (psi_cell, psi_formulas);
@@ -445,11 +444,11 @@
 		/* TODO : is there a notion of parse format ?
 		 * How does it store a user entered date ?
 		 */
-		if (value != NULL)
+		if (val != NULL)
 			cell_set_expr_and_value (cell, expr, val, NULL, TRUE);
 		else
 			cell_set_expr (cell, expr, NULL);
-	} else if (value != NULL) {
+	} else if (val != NULL) {
 		/* TODO : is there a notion of parse format ?
 		 * How does it store a user entered date ?
 		 */
