gnumeric r17221 - trunk/plugins/openoffice
- From: mortenw svn gnome org
- To: svn-commits-list gnome org
- Subject: gnumeric r17221 - trunk/plugins/openoffice
- Date: Wed, 18 Mar 2009 13:41:09 +0000 (UTC)
Author: mortenw
Date: Wed Mar 18 13:41:08 2009
New Revision: 17221
URL: http://svn.gnome.org/viewvc/gnumeric?rev=17221&view=rev
Log:
2009-03-18 Morten Welinder <terra gnome org>
* openoffice-read.c (oo_cellref_parse): Handle sheet name #REF!
Modified:
trunk/plugins/openoffice/ChangeLog
trunk/plugins/openoffice/openoffice-read.c
Modified: trunk/plugins/openoffice/openoffice-read.c
==============================================================================
--- trunk/plugins/openoffice/openoffice-read.c (original)
+++ trunk/plugins/openoffice/openoffice-read.c Wed Mar 18 13:41:08 2009
@@ -831,8 +831,13 @@
* been added yet add it. Reorder below. */
ref->sheet = workbook_sheet_by_name (pp->wb, name);
if (ref->sheet == NULL) {
- ref->sheet = sheet_new (pp->wb, name);
- workbook_sheet_attach (pp->wb, ref->sheet);
+ if (strcmp (name, "#REF!") == 0) {
+ g_warning ("Ignoring reference to sheet %s", name);
+ ref->sheet = NULL;
+ } else {
+ ref->sheet = sheet_new (pp->wb, name);
+ workbook_sheet_attach (pp->wb, ref->sheet);
+ }
}
} else {
ptr++; /* local ref */
@@ -3008,6 +3013,24 @@
/* get the sheet in the right order (in case something was
* created out of order implictly) */
state.sheet_order = g_slist_reverse (state.sheet_order);
+#if 0
+ {
+ GSList *l;
+ g_printerr ("Order we desire:\n");
+ for (l = state.sheet_order; l; l = l->next) {
+ Sheet *sheet = l->data;
+ g_printerr ("Sheet %s\n", sheet->name_unquoted);
+ }
+ }
+ {
+ GList *l;
+ g_printerr ("Order we have:\n");
+ for (l = workbook_sheets (state.pos.wb); l; l = l->next) {
+ Sheet *sheet = l->data;
+ g_printerr ("Sheet %s\n", sheet->name_unquoted);
+ }
+ }
+#endif
workbook_sheet_reorder (state.pos.wb, state.sheet_order);
g_slist_free (state.sheet_order);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]