[gnumeric] Sheet objects: drop dom parsing code.
- From: Morten Welinder <mortenw src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [gnumeric] Sheet objects: drop dom parsing code.
- Date: Wed, 23 Sep 2009 01:37:56 +0000 (UTC)
commit ffe42deeb027e33aa869cc30f162e05657e719fa
Author: Morten Welinder <terra gnome org>
Date: Tue Sep 22 21:37:22 2009 -0400
Sheet objects: drop dom parsing code.
ChangeLog | 2 +
src/gnm-cell-combo.c | 1 -
src/gnm-so-filled.c | 33 ---------
src/gnm-so-line.c | 26 -------
src/gnm-so-polygon.c | 22 ------
src/gui-clipboard.c | 1 -
src/sheet-control-gui.c | 1 -
src/sheet-filter.c | 1 -
src/sheet-object-cell-comment.c | 21 ------
src/sheet-object-graph.c | 17 -----
src/sheet-object-image.c | 28 --------
src/sheet-object-impl.h | 4 -
src/sheet-object-widget.c | 142 +--------------------------------------
src/xml-io.c | 2 +
src/xml-sax-read.c | 1 -
src/xml-sax-write.c | 1 -
16 files changed, 5 insertions(+), 298 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 2f107b8..f9a1228 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,7 @@
2009-09-22 Morten Welinder <terra gnome org>
+ * src/sheet-object*.[ch]: drop dom parsing code.
+
* src/xml-sax-read.c (xml_cellregion_read): Re-implement in SaX
land. Callers changed to supply extra io_context argument needed.
(gnm_xml_in_doc_add_subset): New function.
diff --git a/src/gnm-cell-combo.c b/src/gnm-cell-combo.c
index 674f413..2aeb250 100644
--- a/src/gnm-cell-combo.c
+++ b/src/gnm-cell-combo.c
@@ -114,7 +114,6 @@ gnm_cell_combo_class_init (GObjectClass *gobject_class)
gobject_class->finalize = gnm_cell_combo_finalize;
gobject_class->get_property = gnm_cell_combo_get_property;
gobject_class->set_property = gnm_cell_combo_set_property;
- so_class->read_xml_dom = NULL;
so_class->write_xml_sax = NULL;
so_class->prep_sax_parser = NULL;
so_class->copy = NULL;
diff --git a/src/gnm-so-filled.c b/src/gnm-so-filled.c
index 0e9a802..e610c39 100644
--- a/src/gnm-so-filled.c
+++ b/src/gnm-so-filled.c
@@ -24,7 +24,6 @@
#include "gnumeric.h"
#include "gnm-so-filled.h"
#include "sheet-object-impl.h"
-#include "xml-io.h"
#include "xml-sax.h"
#include <goffice/goffice.h>
@@ -281,37 +280,6 @@ gnm_so_filled_draw_cairo (SheetObject const *so, cairo_t *cr,
}
}
-static gboolean
-gnm_so_filled_read_xml_dom (SheetObject *so, char const *typename,
- XmlParseContext const *ctxt,
- xmlNodePtr node)
-{
- GnmSOFilled *sof = GNM_SO_FILLED (so);
- double width;
- xmlChar *label;
- int type;
- xmlNode *child;
-
- if (NULL != (label = xmlGetProp (node, (xmlChar *)"Label"))) {
- g_object_set (G_OBJECT (sof), "text", label, NULL);
- xmlFree (label);
- }
-
- if (go_xml_node_get_int (node, "Type", &type))
- sof->is_oval = (type == 102);
-
- if (NULL != (child = go_xml_get_child_by_name (node, "Style"))) /* new version */
- return !go_persist_dom_load (GO_PERSIST (sof->style), child);
-
- /* Old 1.0 and 1.2 */
- go_xml_node_get_gocolor (node, "OutlineColor", &sof->style->line.color);
- go_xml_node_get_gocolor (node, "FillColor", &sof->style->fill.pattern.back);
- if (go_xml_node_get_double (node, "Width", &width))
- sof->style->line.width = width;
-
- return FALSE;
-}
-
static void
gnm_so_filled_write_xml_sax (SheetObject const *so, GsfXMLOut *output,
GnmConventions const *convs)
@@ -492,7 +460,6 @@ gnm_so_filled_class_init (GObjectClass *gobject_class)
gobject_class->finalize = gnm_so_filled_finalize;
gobject_class->set_property = gnm_so_filled_set_property;
gobject_class->get_property = gnm_so_filled_get_property;
- so_class->read_xml_dom = gnm_so_filled_read_xml_dom;
so_class->write_xml_sax = gnm_so_filled_write_xml_sax;
so_class->prep_sax_parser = gnm_so_filled_prep_sax_parser;
so_class->copy = gnm_so_filled_copy;
diff --git a/src/gnm-so-line.c b/src/gnm-so-line.c
index 47d5203..5ab3f94 100644
--- a/src/gnm-so-line.c
+++ b/src/gnm-so-line.c
@@ -24,7 +24,6 @@
#include "gnumeric.h"
#include "gnm-so-line.h"
#include "sheet-object-impl.h"
-#include "xml-io.h"
#include "xml-sax.h"
#include <goffice/goffice.h>
@@ -262,30 +261,6 @@ gnm_so_line_draw_cairo (SheetObject const *so, cairo_t *cr,
cairo_stroke (cr);
}
-static gboolean
-gnm_so_line_read_xml_dom (SheetObject *so, char const *typename,
- XmlParseContext const *ctxt,
- xmlNodePtr node)
-{
- GnmSOLine *sol = GNM_SO_LINE (so);
- double width, a, b, c;
- xmlNode *child;
-
- if (go_xml_node_get_double (node, "ArrowShapeA", &a) &&
- go_xml_node_get_double (node, "ArrowShapeB", &b) &&
- go_xml_node_get_double (node, "ArrowShapeC", &c))
- go_arrow_init (&sol->end_arrow, a, b, c);
-
- if (NULL != (child = go_xml_get_child_by_name (node, "Style"))) /* new version */
- return !go_persist_dom_load (GO_PERSIST (sol->style), child);
- /* Old 1.0 and 1.2 */
- go_xml_node_get_gocolor (node, "FillColor", &sol->style->line.color);
- if (go_xml_node_get_double (node, "Width", &width))
- sol->style->line.width = width;
-
- return FALSE;
-}
-
static void
gnm_so_line_write_xml_sax (SheetObject const *so, GsfXMLOut *output,
GnmConventions const *convs)
@@ -434,7 +409,6 @@ gnm_so_line_class_init (GObjectClass *gobject_class)
gobject_class->finalize = gnm_so_line_finalize;
gobject_class->set_property = gnm_so_line_set_property;
gobject_class->get_property = gnm_so_line_get_property;
- so_class->read_xml_dom = gnm_so_line_read_xml_dom;
so_class->write_xml_sax = gnm_so_line_write_xml_sax;
so_class->prep_sax_parser = gnm_so_line_prep_sax_parser;
so_class->copy = gnm_so_line_copy;
diff --git a/src/gnm-so-polygon.c b/src/gnm-so-polygon.c
index 8734e56..5f7f10f 100644
--- a/src/gnm-so-polygon.c
+++ b/src/gnm-so-polygon.c
@@ -24,7 +24,6 @@
#include "gnumeric.h"
#include "gnm-so-polygon.h"
#include "sheet-object-impl.h"
-#include "xml-io.h"
#include "parse-util.h"
#include <goffice/goffice.h>
@@ -175,26 +174,6 @@ gnm_so_polygon_draw_cairo (SheetObject const *so, cairo_t *cr,
{
}
-static gboolean
-gnm_so_polygon_read_xml_dom (SheetObject *so, char const *typename,
- XmlParseContext const *ctxt, xmlNodePtr node)
-{
- GnmSOPolygon *sop = GNM_SO_POLYGON (so);
- xmlNodePtr ptr;
- double vals[2];
-
- g_array_set_size (sop->points, 0);
- for (ptr = node->xmlChildrenNode; ptr != NULL ; ptr = ptr->next)
- if (!xmlIsBlankNode (ptr) && ptr->name &&
- attr_eq (ptr->name, "Point") &&
- go_xml_node_get_double (ptr, "x", vals + 0) &&
- go_xml_node_get_double (ptr, "y", vals + 1))
- g_array_append_vals (sop->points, vals, 2);
-
- return gnm_so_polygon_parent_class->
- read_xml_dom (so, typename, ctxt, node);
-}
-
static void
gnm_so_polygon_write_xml_sax (SheetObject const *so, GsfXMLOut *output,
GnmConventions const *convs)
@@ -305,7 +284,6 @@ gnm_so_polygon_class_init (GObjectClass *gobject_class)
gobject_class->finalize = gnm_so_polygon_finalize;
gobject_class->set_property = gnm_so_polygon_set_property;
gobject_class->get_property = gnm_so_polygon_get_property;
- so_class->read_xml_dom = gnm_so_polygon_read_xml_dom;
so_class->write_xml_sax = gnm_so_polygon_write_xml_sax;
so_class->copy = gnm_so_polygon_copy;
so_class->rubber_band_directly = FALSE;
diff --git a/src/gui-clipboard.c b/src/gui-clipboard.c
index 4a6c39f..4ed84b6 100644
--- a/src/gui-clipboard.c
+++ b/src/gui-clipboard.c
@@ -34,7 +34,6 @@
#include "gnm-format.h"
#include "gnumeric-gconf.h"
#include "xml-sax.h"
-#include "xml-io.h"
#include <goffice/goffice.h>
#include <gsf/gsf-input-memory.h>
diff --git a/src/sheet-control-gui.c b/src/sheet-control-gui.c
index 4124492..5c951c6 100644
--- a/src/sheet-control-gui.c
+++ b/src/sheet-control-gui.c
@@ -53,7 +53,6 @@
#include "sheet-merge.h"
#include "ranges.h"
#include "xml-sax.h"
-#include "xml-io.h"
#include "style-color.h"
#include "gnumeric-gconf.h"
diff --git a/src/sheet-filter.c b/src/sheet-filter.c
index fa1baa8..7300a4a 100644
--- a/src/sheet-filter.c
+++ b/src/sheet-filter.c
@@ -525,7 +525,6 @@ gnm_filter_combo_class_init (GObjectClass *gobject_class)
/* SheetObject class method overrides */
so_class->new_view = gnm_filter_combo_view_new;
- so_class->read_xml_dom = NULL;
so_class->write_xml_sax = NULL;
so_class->prep_sax_parser = NULL;
so_class->copy = NULL;
diff --git a/src/sheet-object-cell-comment.c b/src/sheet-object-cell-comment.c
index 6e8817e..af03be2 100644
--- a/src/sheet-object-cell-comment.c
+++ b/src/sheet-object-cell-comment.c
@@ -263,26 +263,6 @@ cell_comment_new_view (SheetObject *so, SheetObjectViewContainer *container)
return gnm_pane_object_register (so, view, FALSE);
}
-static gboolean
-cell_comment_read_xml_dom (SheetObject *so, char const *typename,
- XmlParseContext const *ctxt, xmlNodePtr tree)
-{
- GnmComment *cc = CELL_COMMENT (so);
- xmlChar *author = xmlGetProp (tree, (xmlChar *)"Author");
- xmlChar *text = xmlGetProp (tree, (xmlChar *)"Text");
-
- if (author != NULL) {
- cell_comment_author_set (cc, (char *)author);
- xmlFree (author);
- }
- if (text != NULL) {
- cell_comment_text_set (cc, (char *)text);
- xmlFree (text);
- }
-
- return FALSE;
-}
-
static void
cell_comment_write_xml_sax (SheetObject const *so, GsfXMLOut *output,
GnmConventions const *convs)
@@ -359,7 +339,6 @@ cell_comment_class_init (GObjectClass *gobject_class)
/* SheetObject class method overrides */
sheet_object_class->new_view = &cell_comment_new_view;
- sheet_object_class->read_xml_dom = &cell_comment_read_xml_dom;
sheet_object_class->write_xml_sax = &cell_comment_write_xml_sax;
sheet_object_class->prep_sax_parser = &cell_comment_prep_sax_parser;
sheet_object_class->copy = &cell_comment_copy;
diff --git a/src/sheet-object-graph.c b/src/sheet-object-graph.c
index fa4c9a4..ce6fe79 100644
--- a/src/sheet-object-graph.c
+++ b/src/sheet-object-graph.c
@@ -34,7 +34,6 @@
#include "wbc-gtk.h"
#include "commands.h"
#include "application.h"
-#include "xml-io.h"
#include "sheet.h"
#include <graph.h>
@@ -325,21 +324,6 @@ gnm_sog_populate_menu (SheetObject *so, GPtrArray *actions)
}
-static gboolean
-gnm_sog_read_xml_dom (SheetObject *so, char const *typename,
- XmlParseContext const *ctxt, xmlNodePtr tree)
-{
- xmlNodePtr child = go_xml_get_child_by_name (tree, "GogObject");
-
- if (child != NULL) {
- GogObject *graph = gog_object_new_from_xml
- (NULL, child, (gpointer)gnm_conventions_default);
- sheet_object_graph_set_gog (so, GOG_GRAPH (graph));
- g_object_unref (graph);
- }
- return FALSE;
-}
-
static void
gnm_sog_write_xml_sax (SheetObject const *so, GsfXMLOut *output,
GnmConventions const *convs)
@@ -490,7 +474,6 @@ gnm_sog_class_init (GObjectClass *klass)
so_class->new_view = gnm_sog_new_view;
so_class->bounds_changed = gnm_sog_bounds_changed;
so_class->populate_menu = gnm_sog_populate_menu;
- so_class->read_xml_dom = gnm_sog_read_xml_dom;
so_class->write_xml_sax = gnm_sog_write_xml_sax;
so_class->prep_sax_parser = gnm_sog_prep_sax_parser;
so_class->copy = gnm_sog_copy;
diff --git a/src/sheet-object-image.c b/src/sheet-object-image.c
index a1dd841..c9edc40 100644
--- a/src/sheet-object-image.c
+++ b/src/sheet-object-image.c
@@ -17,7 +17,6 @@
#include "sheet-control-gui.h"
#include "gui-file.h"
#include "application.h"
-#include "xml-io.h"
#include "xml-sax.h"
#include <goffice/goffice.h>
@@ -455,32 +454,6 @@ gnm_soi_populate_menu (SheetObject *so, GPtrArray *actions)
go_ptr_array_insert (actions, (gpointer) &soi_action, 1);
}
-static gboolean
-gnm_soi_read_xml_dom (SheetObject *so, char const *typename,
- XmlParseContext const *ctxt, xmlNodePtr tree)
-{
- SheetObjectImage *soi = SHEET_OBJECT_IMAGE (so);
- xmlNodePtr child;
- xmlChar *type, *content;
-
- child = go_xml_get_child_by_name (tree, "Content");
- type = xmlGetProp (child, CC2XML ("image-type"));
- if (type == NULL)
- return FALSE;
- content = xmlNodeGetContent (child);
- if (content == NULL) {
- xmlFree (type);
- return FALSE;
- }
- soi->type = g_strdup (CXML2C (type));
- soi->bytes.len = gsf_base64_decode_simple (content, strlen (CXML2C (content)));
- soi->bytes.data = g_memdup (content, soi->bytes.len);
- xmlFree (type);
- xmlFree (content);
-
- return FALSE;
-}
-
static void
content_start (GsfXMLIn *xin, xmlChar const **attrs)
{
@@ -659,7 +632,6 @@ gnm_soi_class_init (GObjectClass *object_class)
so_class = SHEET_OBJECT_CLASS (object_class);
so_class->new_view = gnm_soi_new_view;
so_class->populate_menu = gnm_soi_populate_menu;
- so_class->read_xml_dom = gnm_soi_read_xml_dom;
so_class->write_xml_sax = gnm_soi_write_xml_sax;
so_class->prep_sax_parser = gnm_soi_prep_sax_parser;
so_class->copy = gnm_soi_copy;
diff --git a/src/sheet-object-impl.h b/src/sheet-object-impl.h
index 037ed07..87fee8b 100644
--- a/src/sheet-object-impl.h
+++ b/src/sheet-object-impl.h
@@ -57,10 +57,6 @@ typedef struct {
GPtrArray *actions);
void (*user_config) (SheetObject *sheet_object,
SheetControl *s_control);
- gboolean (*read_xml_dom) (SheetObject *so,
- char const *type_name, /* for versioning */
- XmlParseContext const *ctxt,
- xmlNodePtr tree);
void (*prep_sax_parser) (SheetObject *so,
GsfXMLIn *xin, xmlChar const **attrs,
GnmConventions const *convs);
diff --git a/src/sheet-object-widget.c b/src/sheet-object-widget.c
index 75240a6..6cd9302 100644
--- a/src/sheet-object-widget.c
+++ b/src/sheet-object-widget.c
@@ -44,7 +44,6 @@
#include "gnumeric-expr-entry.h"
#include "dialogs.h"
#include "dialogs/help.h"
-#include "xml-io.h"
#include "xml-sax.h"
#include "commands.h"
#include "gnm-format.h"
@@ -174,7 +173,7 @@ static GSF_CLASS (SOWidgetView, so_widget_view,
#define SOW_CLASS(so) (SHEET_OBJECT_WIDGET_CLASS (G_OBJECT_GET_CLASS(so)))
#define SOW_MAKE_TYPE(n1, n2, fn_config, fn_set_sheet, fn_clear_sheet, fn_foreach_dep, \
- fn_copy, fn_read_dom, fn_write_sax, fn_prep_sax_parser, \
+ fn_copy, fn_write_sax, fn_prep_sax_parser, \
fn_get_property, fn_set_property, class_init_code) \
static void \
sheet_widget_ ## n1 ## _class_init (GObjectClass *object_class) \
@@ -190,7 +189,6 @@ sheet_widget_ ## n1 ## _class_init (GObjectClass *object_class) \
so_class->remove_from_sheet = fn_clear_sheet; \
so_class->foreach_dep = fn_foreach_dep; \
so_class->copy = fn_copy; \
- so_class->read_xml_dom = fn_read_dom; \
so_class->write_xml_sax = fn_write_sax; \
so_class->prep_sax_parser = fn_prep_sax_parser; \
sow_class->create_widget = &sheet_widget_ ## n1 ## _create_widget; \
@@ -253,25 +251,6 @@ sax_read_dep (xmlChar const * const *attrs, char const *name,
return TRUE;
}
-static void
-read_dep (GnmDependent *dep, char const *name,
- xmlNodePtr tree, XmlParseContext const *context)
-{
- xmlChar *txt = xmlGetProp (tree, CC2XML (name));
-
- dep->sheet = NULL;
- dep->texpr = NULL;
- if (txt != NULL && *txt != '\0') {
- GnmParsePos pos;
-
- parse_pos_init_sheet (&pos, context->sheet);
- dep->texpr = gnm_expr_parse_str
- (CC2XML (txt), &pos, GNM_EXPR_PARSE_DEFAULT,
- sheet_get_conventions (pos.sheet), NULL);
- xmlFree (txt);
- }
-}
-
static SheetObjectView *
sheet_object_widget_new_view (SheetObject *so, SheetObjectViewContainer *container)
{
@@ -393,26 +372,6 @@ sheet_widget_frame_prep_sax_parser (SheetObject *so, GsfXMLIn *xin,
}
}
-static gboolean
-sheet_widget_frame_read_xml_dom (SheetObject *so, char const *typename,
- XmlParseContext const *context,
- xmlNodePtr tree)
-{
- SheetWidgetFrame *swf = SHEET_WIDGET_FRAME (so);
- xmlChar *label = xmlGetProp (tree, CC2XML ("Label"));
-
- if (!label) {
- g_warning ("Could not read a SheetWidgetFrame because it lacks a label property.");
- return TRUE;
- }
-
- g_free (swf->label);
- swf->label = g_strdup (CC2XML (label));
- xmlFree (label);
-
- return FALSE;
-}
-
typedef struct {
GladeXML *gui;
GtkWidget *dialog;
@@ -557,7 +516,6 @@ SOW_MAKE_TYPE (frame, Frame,
NULL,
NULL,
&sheet_widget_frame_copy,
- &sheet_widget_frame_read_xml_dom,
&sheet_widget_frame_write_xml_sax,
&sheet_widget_frame_prep_sax_parser,
NULL,
@@ -644,26 +602,6 @@ sheet_widget_button_prep_sax_parser (SheetObject *so, GsfXMLIn *xin,
g_object_set (G_OBJECT (swb), "text", attrs[1], NULL);
}
-static gboolean
-sheet_widget_button_read_xml_dom (SheetObject *so, char const *typename,
- XmlParseContext const *context,
- xmlNodePtr tree)
-{
- /* FIXME: markup */
- SheetWidgetButton *swb = SHEET_WIDGET_BUTTON (so);
- xmlChar *label = xmlGetProp (tree, CC2XML ("Label"));
-
- if (!label) {
- g_warning ("Could not read a SheetWidgetButton because it lacks a label property.");
- return TRUE;
- }
-
- swb->label = g_strdup (CC2XML (label));
- xmlFree (label);
-
- return FALSE;
-}
-
void
sheet_widget_button_set_label (SheetObject *so, char const *str)
{
@@ -758,7 +696,6 @@ SOW_MAKE_TYPE (button, Button,
NULL,
NULL,
sheet_widget_button_copy,
- sheet_widget_button_read_xml_dom,
sheet_widget_button_write_xml_sax,
sheet_widget_button_prep_sax_parser,
sheet_widget_button_get_property,
@@ -1288,41 +1225,6 @@ sheet_widget_adjustment_prep_sax_parser (SheetObject *so, GsfXMLIn *xin,
gtk_adjustment_changed (swa->adjustment);
}
-static gboolean
-sheet_widget_adjustment_read_xml_dom (SheetObject *so, char const *typename,
- XmlParseContext const *context,
- xmlNodePtr tree)
-{
- SheetWidgetAdjustment *swa = SHEET_WIDGET_ADJUSTMENT (so);
- SheetWidgetAdjustmentClass *swa_class = SWA_CLASS (so);
- double tmp;
- gboolean b;
-
- swa->horizontal = (swa_class->vtype == G_TYPE_NONE);
-
- read_dep (&swa->dep, "Input", tree, context);
- swa->dep.flags = adjustment_get_dep_type ();
-
- if (go_xml_node_get_double (tree, "Min", &tmp))
- swa->adjustment->lower = tmp;
- if (go_xml_node_get_double (tree, "Max", &tmp))
- swa->adjustment->upper = tmp; /* allow scrolling to max */
- if (go_xml_node_get_double (tree, "Inc", &tmp))
- swa->adjustment->step_increment = tmp;
- if (go_xml_node_get_double (tree, "Page", &tmp))
- swa->adjustment->page_increment = tmp;
- if (go_xml_node_get_double (tree, "Value", &tmp))
- swa->adjustment->value = tmp;
- if (swa_class->htype != G_TYPE_NONE &&
- swa_class->vtype != G_TYPE_NONE &&
- go_xml_node_get_bool (tree, "Horizontal", &b))
- swa->horizontal = b;
-
- gtk_adjustment_changed (swa->adjustment);
-
- return FALSE;
-}
-
void
sheet_widget_adjustment_set_details (SheetObject *so, GnmExprTop const *tlink,
int value, int min, int max,
@@ -1355,7 +1257,6 @@ SOW_MAKE_TYPE (adjustment, Adjustment,
so_clear_sheet,
sheet_widget_adjustment_foreach_dep,
sheet_widget_adjustment_copy,
- sheet_widget_adjustment_read_xml_dom,
sheet_widget_adjustment_write_xml_sax,
sheet_widget_adjustment_prep_sax_parser,
sheet_widget_adjustment_get_property,
@@ -1919,29 +1820,6 @@ sheet_widget_checkbox_prep_sax_parser (SheetObject *so, GsfXMLIn *xin,
; /* ??? */
}
-static gboolean
-sheet_widget_checkbox_read_xml_dom (SheetObject *so, char const *typename,
- XmlParseContext const *context,
- xmlNodePtr tree)
-{
- SheetWidgetCheckbox *swc = SHEET_WIDGET_CHECKBOX (so);
- xmlChar *label = xmlGetProp (tree, CC2XML ("Label"));
-
- if (!label) {
- g_warning ("Could not read a CheckBoxWidget object because it lacks a label property");
- return TRUE;
- }
-
- swc->label = g_strdup (CC2XML (label));
- xmlFree (label);
-
- read_dep (&swc->dep, "Input", tree, context);
- swc->dep.flags = checkbox_get_dep_type ();
- go_xml_node_get_int (tree, "Value", &swc->value);
-
- return FALSE;
-}
-
void
sheet_widget_checkbox_set_link (SheetObject *so, GnmExprTop const *texpr)
{
@@ -1991,7 +1869,6 @@ SOW_MAKE_TYPE (checkbox, Checkbox,
so_clear_sheet,
sheet_widget_checkbox_foreach_dep,
sheet_widget_checkbox_copy,
- sheet_widget_checkbox_read_xml_dom,
sheet_widget_checkbox_write_xml_sax,
sheet_widget_checkbox_prep_sax_parser,
sheet_widget_checkbox_get_property,
@@ -2220,7 +2097,6 @@ SOW_MAKE_TYPE (radio_button, RadioButton,
NULL,
NULL,
NULL,
- NULL,
sheet_widget_radio_button_get_property,
sheet_widget_radio_button_set_property,
{
@@ -2446,21 +2322,6 @@ sheet_widget_list_base_prep_sax_parser (SheetObject *so, GsfXMLIn *xin,
else if (sax_read_dep (attrs, "Output", &swl->output_dep, xin, convs)) ;
}
-static gboolean
-sheet_widget_list_base_read_xml_dom (SheetObject *so, char const *typename,
- XmlParseContext const *context,
- xmlNodePtr tree)
-{
- SheetWidgetListBase *swl = SHEET_WIDGET_LIST_BASE (so);
-
- read_dep (&swl->content_dep, "Content", tree, context);
- swl->content_dep.flags = list_content_get_dep_type ();
- read_dep (&swl->output_dep, "Output", tree, context);
- swl->output_dep.flags = list_output_get_dep_type ();
-
- return FALSE;
-}
-
static GtkWidget *
sheet_widget_list_base_create_widget (SheetObjectWidget *sow)
{
@@ -2474,7 +2335,6 @@ SOW_MAKE_TYPE (list_base, ListBase,
so_clear_sheet,
sheet_widget_list_base_foreach_dep,
NULL,
- sheet_widget_list_base_read_xml_dom,
sheet_widget_list_base_write_xml_sax,
sheet_widget_list_base_prep_sax_parser,
NULL,
diff --git a/src/xml-io.c b/src/xml-io.c
index 065988d..ed33aa8 100644
--- a/src/xml-io.c
+++ b/src/xml-io.c
@@ -1675,11 +1675,13 @@ xml_read_sheet_object (XmlParseContext const *ctxt, xmlNodePtr tree,
klass = SHEET_OBJECT_CLASS (G_OBJECT_GET_CLASS(so));
+#if 0
if (klass->read_xml_dom &&
(klass->read_xml_dom) (so, tree->name, ctxt, tree)) {
g_object_unref (G_OBJECT (so));
return NULL;
}
+#endif
tmp = (char *) xmlGetProp (tree, (xmlChar *)"ObjectBound");
if (tmp != NULL) {
diff --git a/src/xml-sax-read.c b/src/xml-sax-read.c
index f002855..ced880d 100644
--- a/src/xml-sax-read.c
+++ b/src/xml-sax-read.c
@@ -58,7 +58,6 @@
#include "gnm-format.h"
#include "sheet-object-graph.h"
#include "application.h"
-#include "xml-io.h"
#include "gutils.h"
#include "clipboard.h"
diff --git a/src/xml-sax-write.c b/src/xml-sax-write.c
index 3a3a392..12f4959 100644
--- a/src/xml-sax-write.c
+++ b/src/xml-sax-write.c
@@ -51,7 +51,6 @@
#include <sheet-filter.h>
#include <sheet-object-impl.h>
#include <print-info.h>
-#include <xml-io.h>
#include <gutils.h>
#include <clipboard.h>
#include <tools/scenarios.h>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]