From 7a9b77df373b64df154cda680152eb70a49d68b5 Mon Sep 17 00:00:00 2001 From: MenTaLguY Date: Wed, 11 Jun 2008 15:56:11 +0000 Subject: plumb XML::Documents in everywhere (bzr r5884) --- src/sp-polygon.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'src/sp-polygon.cpp') diff --git a/src/sp-polygon.cpp b/src/sp-polygon.cpp index d90f829b9..9b9c91c55 100644 --- a/src/sp-polygon.cpp +++ b/src/sp-polygon.cpp @@ -27,7 +27,7 @@ static void sp_polygon_class_init(SPPolygonClass *pc); static void sp_polygon_init(SPPolygon *polygon); static void sp_polygon_build(SPObject *object, SPDocument *document, Inkscape::XML::Node *repr); -static Inkscape::XML::Node *sp_polygon_write(SPObject *object, Inkscape::XML::Node *repr, guint flags); +static Inkscape::XML::Node *sp_polygon_write(SPObject *object, Inkscape::XML::Document *doc, Inkscape::XML::Node *repr, guint flags); static gchar *sp_polygon_description(SPItem *item); @@ -114,7 +114,7 @@ static gchar *sp_svg_write_polygon(const NArtBpath *bpath) return g_strdup(os.str().c_str()); } -static Inkscape::XML::Node *sp_polygon_write(SPObject *object, Inkscape::XML::Node *repr, guint flags) +static Inkscape::XML::Node *sp_polygon_write(SPObject *object, Inkscape::XML::Document *xml_doc, Inkscape::XML::Node *repr, guint flags) { SPShape *shape = SP_SHAPE(object); // Tolerable workaround: we need to update the object's curve before we set points= @@ -122,7 +122,6 @@ static Inkscape::XML::Node *sp_polygon_write(SPObject *object, Inkscape::XML::No sp_shape_set_shape(shape); if ((flags & SP_OBJECT_WRITE_BUILD) && !repr) { - Inkscape::XML::Document *xml_doc = sp_document_repr_doc(SP_OBJECT_DOCUMENT(object)); repr = xml_doc->createElement("svg:polygon"); } @@ -133,7 +132,7 @@ static Inkscape::XML::Node *sp_polygon_write(SPObject *object, Inkscape::XML::No g_free(str); if (((SPObjectClass *) (parent_class))->write) { - ((SPObjectClass *) (parent_class))->write(object, repr, flags); + ((SPObjectClass *) (parent_class))->write(object, xml_doc, repr, flags); } return repr; -- cgit v1.2.3