Commit 24e3ec57 authored by Jody Goldberg's avatar Jody Goldberg Committed by Jody Goldberg

NA has no args


2002-07-15  Jody Goldberg <jody@gnome.org>

	* lotus-formula.c : NA has no args
parent 42dcee5a
2002-07-15 Jody Goldberg <jody@gnome.org>
* lotus-formula.c : NA has no args
2002-07-15 Jody Goldberg <jody@gnome.org> 2002-07-15 Jody Goldberg <jody@gnome.org>
* lotus.c (read_workbook) : use cell_set_expr_and_value for formulas. * lotus.c (read_workbook) : use cell_set_expr_and_value for formulas.
......
...@@ -43,7 +43,7 @@ const func_struct_t functions[] = { ...@@ -43,7 +43,7 @@ const func_struct_t functions[] = {
{ 2, 0x15, "bit-or", BINOP, OPER_OR }, FIXME */ { 2, 0x15, "bit-or", BINOP, OPER_OR }, FIXME */
{ 1, 0x16, "NOT", NORMAL, 0 }, { 1, 0x16, "NOT", NORMAL, 0 },
{ 1, 0x17, "+", UNARY, GNM_EXPR_OP_UNARY_PLUS }, { 1, 0x17, "+", UNARY, GNM_EXPR_OP_UNARY_PLUS },
{ 1, 0x1F, "NA", NORMAL, 0 }, { 0, 0x1F, "NA", NORMAL, 0 },
{ 1, 0x20, "ERR", NORMAL, 0 }, { 1, 0x20, "ERR", NORMAL, 0 },
{ 1, 0x21, "abs", NORMAL, 0 }, { 1, 0x21, "abs", NORMAL, 0 },
{ 1, 0x22, "floor", NORMAL, 0 }, { 1, 0x22, "floor", NORMAL, 0 },
......
...@@ -287,24 +287,32 @@ read_workbook (Workbook *wb, GsfInput *input) ...@@ -287,24 +287,32 @@ read_workbook (Workbook *wb, GsfInput *input)
if (r->len >= 15) { if (r->len >= 15) {
int col = gnumeric_get_le_uint16 (r->data + 1); int col = gnumeric_get_le_uint16 (r->data + 1);
int row = gnumeric_get_le_uint16 (r->data + 3); int row = gnumeric_get_le_uint16 (r->data + 3);
guint16 const magic = gnumeric_get_le_uint16 (r->data + 11) & 0x7ff8;
int len = gnumeric_get_le_int16 (r->data + 13); int len = gnumeric_get_le_int16 (r->data + 13);
GnmExpr const *expr; GnmExpr const *expr;
fmt = r->data[0]; fmt = r->data[0];
#if DEBUG
puts (cell_coord_name (col, row)); puts (cell_coord_name (col, row));
gsf_mem_dump (r->data+5,8); gsf_mem_dump (r->data+5,8);
#endif
if (r->len < (15+len)) if (r->len < (15+len))
break; break;
expr = lotus_parse_formula (sheet, col, row, expr = lotus_parse_formula (sheet, col, row,
r->data + 15, len); r->data + 15, len);
v = NULL; v = NULL;
if (0x7ff0 == (gnumeric_get_le_uint16 (r->data + 11) & 0x7ff8) && if (0x7ff0 == (gnumeric_get_le_uint16 (r->data + 11) & 0x7ff8)) {
LOTUS_STRING == record_peek_next (r)) { /* I can not find normative definition
record_next (r); * for when this is an error, an when
v = value_new_string (r->data + 5); * a string, so we cheat, and peek
* at the next record.
*/
if (LOTUS_STRING == record_peek_next (r)) {
record_next (r);
v = value_new_string (r->data + 5);
} else
v = value_new_error (NULL, gnumeric_err_VALUE);
} else } else
v = value_new_float (gnumeric_get_le_double (r->data + 5)); v = value_new_float (gnumeric_get_le_double (r->data + 5));
cell = sheet_cell_fetch (sheet, col, row), cell = sheet_cell_fetch (sheet, col, row),
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment