Commit d58a16f3 authored by Michael Meeks's avatar Michael Meeks

Fixed up Summary read, was dead broken,

Implemented Names read ( found bug :-)
parent 6fc402c5
1999-07-25 Michael Meeks <michael@edenproject.org>
* src/xml-io.c (xml_read_summary): Fix some massive cock-ups, how
did this ever work.
(xml_read_names): ditto.
(xml_workbook_read): Shifted read_names down to where we actualy
have the inter-sheet reference names in place.
* src/expr.c (expr_tree_invalidate_references): Debugging that
needs cleaning to new PP stuff #if-def'd out.
(expr_tree_fixup_references): ditto.
......
1999-07-25 Michael Meeks <michael@edenproject.org>
* src/xml-io.c (xml_read_summary): Fix some massive cock-ups, how
did this ever work.
(xml_read_names): ditto.
(xml_workbook_read): Shifted read_names down to where we actualy
have the inter-sheet reference names in place.
* src/expr.c (expr_tree_invalidate_references): Debugging that
needs cleaning to new PP stuff #if-def'd out.
(expr_tree_fixup_references): ditto.
......
......@@ -707,12 +707,12 @@ xml_read_names (parse_xml_context_t *ctxt, xmlNodePtr tree, Workbook *wb)
child = tree->childs;
while (child) {
char *name = NULL;
if (child->name && !strcmp (child->name, "Name")) {
xmlNodePtr bits;
bits = child->childs;
while (bits) {
char *name = NULL;
if (!strcmp (bits->name, "name")) {
name = xmlNodeGetContent (bits);
......@@ -730,6 +730,7 @@ xml_read_names (parse_xml_context_t *ctxt, xmlNodePtr tree, Workbook *wb)
g_free (txt);
}
bits = bits->next;
}
}
child = child->next;
......@@ -795,13 +796,13 @@ xml_read_summary (parse_xml_context_t *ctxt, xmlNodePtr tree, SummaryInfo *sin)
child = tree->childs;
while (child) {
char *name = NULL;
if (child->name && !strcmp (child->name, "Item")) {
xmlNodePtr bits;
bits = child->childs;
while (bits) {
SummaryItem *sit = NULL;
char *name = NULL;
if (!strcmp (bits->name, "name")) {
name = xmlNodeGetContent (bits);
......@@ -821,6 +822,7 @@ xml_read_summary (parse_xml_context_t *ctxt, xmlNodePtr tree, SummaryInfo *sin)
summary_info_add (sin, sit);
g_free (txt);
}
bits = bits->next;
}
}
child = child->next;
......@@ -1749,12 +1751,6 @@ xml_workbook_read (parse_xml_context_t *ctxt, xmlNodePtr tree)
if (child)
xml_read_summary (ctxt, child, ret->sin);
#if 0
child = xml_search_child (tree, "Names");
if (child)
xml_read_names (ctxt, child, ret);
#endif
child = xml_search_child (tree, "Geometry");
if (child){
int width, height;
......@@ -1782,7 +1778,16 @@ xml_workbook_read (parse_xml_context_t *ctxt, xmlNodePtr tree)
xml_sheet_create (ctxt, c);
c = c->next;
}
/*
* Now read names which can have inter-sheet references
* to these sheet titles
*/
child = xml_search_child (tree, "Names");
if (child)
xml_read_names (ctxt, child, ret);
child = xml_search_child (tree, "Sheets");
/*
* Pass 2: read the contents
*/
......
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