gnumeric r16521 - in trunk: . plugins/qpro
- From: mortenw svn gnome org
- To: svn-commits-list gnome org
- Subject: gnumeric r16521 - in trunk: . plugins/qpro
- Date: Sun, 27 Apr 2008 17:05:05 +0100 (BST)
Author: mortenw
Date: Sun Apr 27 16:05:05 2008
New Revision: 16521
URL: http://svn.gnome.org/viewvc/gnumeric?rev=16521&view=rev
Log:
2008-04-27 Morten Welinder <terra gnome org>
* qpro-read.c (qpro_get_record): 907 records are big too. Fixes
#530183.
Modified:
trunk/NEWS
trunk/plugins/qpro/ChangeLog
trunk/plugins/qpro/qpro-read.c
trunk/plugins/qpro/qpro.h
Modified: trunk/NEWS
==============================================================================
--- trunk/NEWS (original)
+++ trunk/NEWS Sun Apr 27 16:05:05 2008
@@ -72,6 +72,7 @@
* Fix problems editing times. [#527392]
* Implement IFERROR. [#445591]
* Implement F9 for evaluating a selected subexpression.
+ * Fix problem loading wb1 files. [#530183]
Nick Lamb:
* Honour detachable-toolbar preference. [#321867]
Modified: trunk/plugins/qpro/qpro-read.c
==============================================================================
--- trunk/plugins/qpro/qpro-read.c (original)
+++ trunk/plugins/qpro/qpro-read.c Sun Apr 27 16:05:05 2008
@@ -150,18 +150,22 @@
*len = GSF_LE_GET_GUINT16 (data + 2);
#if 0
- printf ("%hd with %hd\n", *id, *len);
+ g_printerr ("%hd with %hd\n", *id, *len);
#endif
if (*len == 0)
return "";
- /* some sanity checking */
- if (*id != QPRO_UNDOCUMENTED_837) {
+ data = gsf_input_read (state->input, *len, NULL);
+
+ switch (*id) {
+ case QPRO_UNDOCUMENTED_837:
+ case QPRO_UNDOCUMENTED_907:
+ break; /* Nothing. */
+ default:
Q_CHECK_CONDITION (*len < 0x2000);
}
- data = gsf_input_read (state->input, *len, NULL);
Q_CHECK_CONDITION (data != NULL);
return data;
@@ -686,7 +690,7 @@
{
#if 0
unsigned attr_id = GSF_LE_GET_GUINT16 (data) >> 3;
- printf ("Get Attr %u\n", attr_id);
+ g_printerr ("Get Attr %u\n", attr_id);
#endif
return sheet_style_default (state->cur_sheet);
}
@@ -705,7 +709,7 @@
workbook_sheet_attach (state->wb, sheet);
sheet_flag_recompute_spans (sheet);
#if 0
- printf ("----------> start %s\n", def_name);
+ g_printerr ("----------> start %s\n", def_name);
#endif
while (NULL != (data = qpro_get_record (state, &id, &len))) {
switch (id) {
@@ -788,7 +792,8 @@
break;
case QPRO_PAGE_ATTRIBUTE:
- if (validate (QPRO_PAGE_ATTRIBUTE, 30)) {
+ /* Documented at 30. Observed at 34. */
+ if (validate (QPRO_PAGE_ATTRIBUTE, -1)) {
#warning TODO, mostly simple
}
break;
@@ -841,7 +846,7 @@
break;
}
#if 0
- printf ("----------< end\n");
+ g_printerr ("----------< end\n");
#endif
state->cur_sheet = NULL;
}
Modified: trunk/plugins/qpro/qpro.h
==============================================================================
--- trunk/plugins/qpro/qpro.h (original)
+++ trunk/plugins/qpro/qpro.h Sun Apr 27 16:05:05 2008
@@ -181,6 +181,9 @@
QPRO_UNDOCUMENTED_837 = 837, /* Big, variable size. */
+ QPRO_UNDOCUMENTED_901 = 901,
+ QPRO_UNDOCUMENTED_907 = 907, /* Big. */
+
QPRO_UNDOCUMENTED_1009 = 1009,
QPRO_UNDOCUMENTED_1010 = 1010,
QPRO_UNDOCUMENTED_1011 = 1011,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]