Commit 34004cdb authored by Jody Goldberg's avatar Jody Goldberg
Browse files

Correct the handling of '%'

Fix some typos in the default formats.
parent ab7a29bb
1999-08-12 Jody Goldberg <jgoldberg@home.com>
* ms-formula-read.c (ms_excel_parse_formula) :
FORMULA_PTG_PERCENT is expr/100 not expr*100.
(excel_builtin_formats) : Correct typo.
1999-08-09 Miguel de Icaza <miguel@gnu.org>
* boot.c (excel_load): Changed calling conventions.
......
......@@ -553,10 +553,10 @@ char *excel_builtin_formats[EXCEL_BUILTIN_FORMAT_LEN] = {
/* 0x02 */ "0.00",
/* 0x03 */ "#,##0",
/* 0x04 */ "#,##0.00",
/* 0x05 */ "($#,##0_);($#,##0)",
/* 0x06 */ "($#,##0_);[Red]($#,##0)",
/* 0x07 */ "($#,##0.00_);($#,##0.00)",
/* 0x08 */ "($#,##0.00_);[Red]($#,##0.00)",
/* 0x05 */ "$#,##0_);($#,##0)",
/* 0x06 */ "$#,##0_);[Red]($#,##0)",
/* 0x07 */ "$#,##0.00_);($#,##0.00)",
/* 0x08 */ "$#,##0.00_);[Red]($#,##0.00)",
/* 0x09 */ "0%",
/* 0x0a */ "0.00%",
/* 0x0b */ "0.00E+00",
......
......@@ -1119,12 +1119,13 @@ ms_excel_parse_formula (ExcelWorkbook *wb, ExcelSheet *sheet, guint8 const *mem,
case FORMULA_PTG_PERCENT:
{
/* FIXME FIXME FIXME : is this correct ? */
/* FIXME : We need to revisit this when operator % is
* available */
ExprTree * hundred =
expr_tree_new_constant (value_new_int (100));
parse_list_push (&stack,
expr_tree_new_binary (parse_list_pop (&stack),
OPER_MULT,
OPER_DIV,
hundred));
break;
}
......
Supports Markdown
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