diff --git a/src/sp-defs.cpp b/src/sp-defs.cpp
index cf9f5a28f75ff89264448a38691f510e18b5d6c3..aa0cb0be7643f285f71af3c052fa78cb4596c24e 100644 (file)
--- a/src/sp-defs.cpp
+++ b/src/sp-defs.cpp
#include "sp-defs.h"
#include "xml/repr.h"
+#include "document.h"
static void sp_defs_class_init(SPDefsClass *dc);
static void sp_defs_init(SPDefs *defs);
static void sp_defs_release(SPObject *object);
static void sp_defs_update(SPObject *object, SPCtx *ctx, guint flags);
static void sp_defs_modified(SPObject *object, guint flags);
-static Inkscape::XML::Node *sp_defs_write(SPObject *object, Inkscape::XML::Node *repr, guint flags);
+static Inkscape::XML::Node *sp_defs_write(SPObject *object, Inkscape::XML::Document *doc, Inkscape::XML::Node *repr, guint flags);
static SPObjectClass *parent_class;
sp_object_class->write = sp_defs_write;
}
-static void sp_defs_init(SPDefs *defs)
+static void sp_defs_init(SPDefs */*defs*/)
{
}
}
}
-static Inkscape::XML::Node *sp_defs_write(SPObject *object, Inkscape::XML::Node *repr, guint flags)
+static Inkscape::XML::Node *sp_defs_write(SPObject *object, Inkscape::XML::Document *xml_doc, Inkscape::XML::Node *repr, guint flags)
{
if (flags & SP_OBJECT_WRITE_BUILD) {
if (!repr) {
- repr = sp_repr_new("svg:defs");
+ repr = xml_doc->createElement("svg:defs");
}
GSList *l = NULL;
for ( SPObject *child = sp_object_first_child(object) ; child != NULL; child = SP_OBJECT_NEXT(child) ) {
- Inkscape::XML::Node *crepr = child->updateRepr(NULL, flags);
+ Inkscape::XML::Node *crepr = child->updateRepr(xml_doc, NULL, flags);
if (crepr) l = g_slist_prepend(l, crepr);
}
}
if (((SPObjectClass *) (parent_class))->write) {
- (* ((SPObjectClass *) (parent_class))->write)(object, repr, flags);
+ (* ((SPObjectClass *) (parent_class))->write)(object, xml_doc, repr, flags);
}
return repr;