Commit d1b4f46f authored by Jody Goldberg's avatar Jody Goldberg Committed by Jody Goldberg

FORMAT records supercede the internal table.


2000-06-07  Jody Goldberg <jgoldberg@home.com>

	* ms-excel-read.c (biff_format_data_lookup) : FORMAT records supercede
	  the internal table.
parent 143e12b7
2000-06-07 Jody Goldberg <jgoldberg@home.com>
* ms-excel-read.c (biff_format_data_lookup) : FORMAT records supercede
the internal table.
2000-06-05 Michael Meeks <michael@helixcode.com>
s/eBiff_version/MsBiffVersion/g;
......
......@@ -181,12 +181,9 @@ BC_R(ai)(ExcelChartHandler const *handle,
sheet.gnum_sheet = NULL;
sheet.shared_formulae = NULL;
if (length > 0) {
if (length > 0)
expr = ms_excel_parse_formula (s->wb, &sheet, q->data+8, 0, 0,
FALSE, length, NULL);
if (ms_excel_chart_debug > 2)
expr_dump_tree (expr);
}
}
/* Rest are 0 */
......
......@@ -727,30 +727,21 @@ char *excel_builtin_formats[EXCEL_BUILTIN_FORMAT_LEN] = {
/* 0x31 */ "@"
};
/*
* FIXME: This code falsely assumes that the builtin formats are
* fixed. The builtins get translated to local currency formats. E.g.
* Format data : 0x05 == '"kr"\ #,##0;"kr"\ \-#,##0'
*/
StyleFormat *
biff_format_data_lookup (ExcelWorkbook *wb, guint16 idx)
{
char *ans = NULL;
if (idx <= 0x31) {
BiffFormatData *d = g_hash_table_lookup (wb->format_data,
&idx);
if (d)
ans = d->name;
else if (idx <= 0x31) {
ans = excel_builtin_formats[idx];
if (!ans)
printf ("Foreign undocumented format\n");
}
} else
printf ("Unknown format: 0x%x\n", idx);
if (!ans) {
BiffFormatData *d = g_hash_table_lookup (wb->format_data,
&idx);
if (!d) {
printf ("Unknown format: 0x%x\n", idx);
ans = 0;
} else
ans = d->name;
}
if (ans)
return style_format_new (ans);
else
......
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