diff --git a/src/sp-polygon.cpp b/src/sp-polygon.cpp
index 56cbfefdebe3d6582717c3ed65d223e001f4d9cf..1fb43c03673de3f895c7723518a23bae8f3cd1a2 100644 (file)
--- a/src/sp-polygon.cpp
+++ b/src/sp-polygon.cpp
#include "libnr/n-art-bpath.h"
#include "svg/stringstream.h"
#include "xml/repr.h"
+#include "document.h"
static void sp_polygon_class_init(SPPolygonClass *pc);
static void sp_polygon_init(SPPolygon *polygon);
item_class->description = sp_polygon_description;
}
-static void sp_polygon_init(SPPolygon *polygon)
+static void sp_polygon_init(SPPolygon */*polygon*/)
{
/* Nothing here */
}
@@ -120,7 +121,8 @@ static Inkscape::XML::Node *sp_polygon_write(SPObject *object, Inkscape::XML::No
sp_shape_set_shape(shape);
if ((flags & SP_OBJECT_WRITE_BUILD) && !repr) {
- repr = sp_repr_new("svg:polygon");
+ Inkscape::XML::Document *xml_doc = sp_document_repr_doc(SP_OBJECT_DOCUMENT(object));
+ repr = xml_doc->createElement("svg:polygon");
}
/* We can safely write points here, because all subclasses require it too (Lauris) */
@@ -228,7 +230,7 @@ static void sp_polygon_set(SPObject *object, unsigned int key, const gchar *valu
}
}
-static gchar *sp_polygon_description(SPItem *item)
+static gchar *sp_polygon_description(SPItem */*item*/)
{
return g_strdup(_("<b>Polygon</b>"));
}