[gnumeric] xls: debug improvement.
- From: Morten Welinder <mortenw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnumeric] xls: debug improvement.
- Date: Sun, 12 Apr 2015 03:04:06 +0000 (UTC)
commit 0d2dc0a1f30c2ff56bb93745ab57613b8e38cf0d
Author: Morten Welinder <terra gnome org>
Date: Sat Apr 11 23:03:44 2015 -0400
xls: debug improvement.
plugins/excel/ChangeLog | 3 +++
plugins/excel/ms-excel-read.c | 36 +++++++++++++++++++++++++++---------
2 files changed, 30 insertions(+), 9 deletions(-)
---
diff --git a/plugins/excel/ChangeLog b/plugins/excel/ChangeLog
index 1a2060a..b205ade 100644
--- a/plugins/excel/ChangeLog
+++ b/plugins/excel/ChangeLog
@@ -1,5 +1,8 @@
2015-04-11 Morten Welinder <terra gnome org>
+ * ms-excel-read.c (excel_read_FORMULA): Only print recalc tag in
+ debug mode for V5+.
+
* xlsx-read-color.c (xlsx_draw_color_gamma): Implement.
* xlsx-write.c (xlsx_write_workbook): Plug pivot leak.
diff --git a/plugins/excel/ms-excel-read.c b/plugins/excel/ms-excel-read.c
index b547de2..d1e974f 100644
--- a/plugins/excel/ms-excel-read.c
+++ b/plugins/excel/ms-excel-read.c
@@ -2908,14 +2908,6 @@ excel_read_FORMULA (BiffQuery *q, ExcelReadSheet *esheet)
if (!cell)
return;
- /* TODO : it would be nice to figure out how to allocate recalc tags.
- * that would avoid the scary
- * 'this file was calculated with a different version of XL'
- * warning when exiting without changing. */
- d (1, g_printerr ("Formula in %s!%s has recalc tag 0x%x;\n",
- esheet->sheet->name_quoted, cell_name (cell),
- GSF_LE_GET_GUINT32 (q->data + 16)););
-
/* TODO TODO TODO: Wishlist
* We should make an array of minimum sizes for each BIFF type
* and have this checking done there.
@@ -2924,6 +2916,15 @@ excel_read_FORMULA (BiffQuery *q, ExcelReadSheet *esheet)
XL_CHECK_CONDITION (q->length >= 22);
expr_length = GSF_LE_GET_GUINT16 (q->data + 20);
offset = 22;
+
+ /* TODO : it would be nice to figure out how to allocate recalc tags.
+ * that would avoid the scary
+ * 'this file was calculated with a different version of XL'
+ * warning when exiting without changing. */
+ d (1, g_printerr ("Formula in %s!%s has recalc tag 0x%x;\n",
+ esheet->sheet->name_quoted, cell_name (cell),
+ GSF_LE_GET_GUINT32 (q->data + 16)););
+
} else if (esheet_ver (esheet) >= MS_BIFF_V3) {
XL_CHECK_CONDITION (q->length >= 18);
expr_length = GSF_LE_GET_GUINT16 (q->data + 16);
@@ -7100,6 +7101,22 @@ excel_read_CODEPAGE (BiffQuery *q, GnmXLImporter *importer)
GSF_LE_GET_GUINT16 (q->data));
}
+static void
+excel_read_RECALCID (BiffQuery *q, GnmXLImporter *importer)
+{
+ guint32 engine;
+
+ XL_CHECK_CONDITION (q->length >= 8);
+ engine = GSF_LE_GET_GUINT32 (q->data + 4);
+
+ (void)engine;
+}
+
+static void
+excel_read_UNCALCED (BiffQuery *q, GnmXLImporter *importer)
+{
+}
+
void
excel_read_workbook (GOIOContext *context, WorkbookView *wb_view,
GsfInput *input,
@@ -7276,7 +7293,8 @@ excel_read_workbook (GOIOContext *context, WorkbookView *wb_view,
d (0, g_printerr ("%s\n", "XL 2000 file"););
break;
- case BIFF_RECALCID: break;
+ case BIFF_RECALCID: excel_read_RECALCID (q, importer); break;
+ case BIFF_UNCALCED: excel_read_UNCALCED (q, importer); break;
case BIFF_REFRESHALL: break;
case BIFF_CODENAME: excel_read_CODENAME (q, importer, NULL); break;
case BIFF_PROT4REVPASS: break;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]