Commit 870c9d3e authored by Jody Goldberg's avatar Jody Goldberg Committed by Jody Goldberg

Fix some typos

2001-02-03  Jody Goldberg <jgoldberg@home.com>

	* src/xml-io.c (xml_workbook_read) : bump xml version to 6.
	(xml_read_style_region) : V6 uses set_range rather than the older
	  apply_range.  We now save/restore fully qualified styles.
parent 4c1b017a
2001-02-03 Jody Goldberg <jgoldberg@home.com>
* src/xml-io.c (xml_workbook_read) : bump xml version to 6.
(xml_read_style_region) : V6 uses set_range rather than the older
apply_range. We now save/restore fully qualified styles.
2001-02-03 Jody Goldberg <jgoldberg@home.com>
* src/sheet-object.c (sheet_objects_max_extent) : new routine.
......
2001-02-03 Jody Goldberg <jgoldberg@home.com>
* src/xml-io.c (xml_workbook_read) : bump xml version to 6.
(xml_read_style_region) : V6 uses set_range rather than the older
apply_range. We now save/restore fully qualified styles.
2001-02-03 Jody Goldberg <jgoldberg@home.com>
* src/sheet-object.c (sheet_objects_max_extent) : new routine.
......
2001-02-03 Jody Goldberg <jgoldberg@home.com>
* src/xml-io.c (xml_workbook_read) : bump xml version to 6.
(xml_read_style_region) : V6 uses set_range rather than the older
apply_range. We now save/restore fully qualified styles.
2001-02-03 Jody Goldberg <jgoldberg@home.com>
* src/sheet-object.c (sheet_objects_max_extent) : new routine.
......
2001-02-03 Jody Goldberg <jgoldberg@home.com>
* src/xml-io.c (xml_workbook_read) : bump xml version to 6.
(xml_read_style_region) : V6 uses set_range rather than the older
apply_range. We now save/restore fully qualified styles.
2001-02-03 Jody Goldberg <jgoldberg@home.com>
* src/sheet-object.c (sheet_objects_max_extent) : new routine.
......
2001-02-03 Jody Goldberg <jgoldberg@home.com>
* src/xml-io.c (xml_workbook_read) : bump xml version to 6.
(xml_read_style_region) : V6 uses set_range rather than the older
apply_range. We now save/restore fully qualified styles.
2001-02-03 Jody Goldberg <jgoldberg@home.com>
* src/sheet-object.c (sheet_objects_max_extent) : new routine.
......
......@@ -100,6 +100,34 @@ sheet_object_unrealize (SheetObject *so)
gtk_object_destroy (GTK_OBJECT (so->realized_list->data));
}
/**
* sheet_objects_max_extent :
* @sheet :
*
* Utility routine to calculate the maximum extent of objects in this sheet.
*/
static void
sheet_objects_max_extent (Sheet *sheet)
{
CellPos max_pos = { 0, 0 };
GList *ptr;
for (ptr = sheet->sheet_objects; ptr != NULL ; ptr = ptr->next ) {
SheetObject *so = SHEET_OBJECT (ptr->data);
if (max_pos.col < so->cell_bound.end.col)
max_pos.col = so->cell_bound.end.col;
if (max_pos.row < so->cell_bound.end.row)
max_pos.row = so->cell_bound.end.row;
}
if (sheet->max_object_extent.col != max_pos.col ||
sheet->max_object_extent.row != max_pos.row) {
sheet->max_object_extent = max_pos;
sheet_scrollbar_config (sheet);
}
}
static void
sheet_object_destroy (GtkObject *object)
{
......@@ -217,34 +245,6 @@ sheet_object_position (SheetObject *so, CellPos const *pos)
}
}
/**
* sheet_objects_max_extent :
* @sheet :
*
* Utility routine to calculate the maximum extent of objects in this sheet.
*/
static void
sheet_objects_max_extent (Sheet *sheet)
{
CellPos max_pos = { 0, 0 };
GList *ptr;
for (ptr = sheet->sheet_objects; ptr != NULL ; ptr = ptr->next ) {
SheetObject *so = SHEET_OBJECT (ptr->data);
if (max_pos.col < so->cell_bound.end.col)
max_pos.col = so->cell_bound.end.col;
if (max_pos.row < so->cell_bound.end.row)
max_pos.row = so->cell_bound.end.row;
}
if (sheet->max_object_extent.col != max_pos.col ||
sheet->max_object_extent.row != max_pos.row) {
sheet->max_object_extent = max_pos;
sheet_scrollbar_config (sheet);
}
}
/**
* sheet_object_set_sheet :
* @so :
......
......@@ -87,7 +87,7 @@ xml_parse_ctx_new (xmlDocPtr doc,
xmlNsPtr ns)
{
return xml_parse_ctx_new_full (
doc, ns, GNUM_XML_V5, NULL, NULL, NULL);
doc, ns, GNUM_XML_V6, NULL, NULL, NULL);
}
void
......@@ -1594,8 +1594,12 @@ xml_read_style_region (XmlParseContext *ctxt, xmlNodePtr tree)
style = xml_read_style_region_ex (ctxt, tree, &range);
if (style)
sheet_style_apply_range (ctxt->sheet, &range, style);
if (style != NULL) {
if (ctxt->version >= GNUM_XML_V6)
sheet_style_set_range (ctxt->sheet, &range, style);
else
sheet_style_apply_range (ctxt->sheet, &range, style);
}
}
/*
......@@ -2799,7 +2803,7 @@ xml_workbook_write (XmlParseContext *ctxt, WorkbookView *wb_view)
if (cur == NULL)
return NULL;
if (ctxt->ns == NULL) {
gmr = xmlNewNs (cur, "http://www.gnome.org/gnumeric/v5", "gmr");
gmr = xmlNewNs (cur, "http://www.gnome.org/gnumeric/v6", "gmr");
xmlSetNs(cur, gmr);
ctxt->ns = gmr;
}
......@@ -3001,6 +3005,7 @@ static const struct {
char const * const id;
GnumericXMLVersion const version;
} GnumericVersions [] = {
{ "http://www.gnome.org/gnumeric/v6", GNUM_XML_V6 },
{ "http://www.gnome.org/gnumeric/v5", GNUM_XML_V5 },
{ "http://www.gnome.org/gnumeric/v4", GNUM_XML_V4 },
{ "http://www.gnome.org/gnumeric/v3", GNUM_XML_V3 },
......
......@@ -21,6 +21,7 @@ typedef enum
GNUM_XML_V3, /* >= 0.52 */
GNUM_XML_V4, /* >= 0.57 */
GNUM_XML_V5, /* >= 0.58 */
GNUM_XML_V6, /* >= 0.62 */
} GnumericXMLVersion;
typedef struct _XmlParseContext XmlParseContext;
......
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