Code

Filter effects dialog:
[inkscape.git] / src / sp-polyline.cpp
index 265b2b7979dc8652a97d5d3c14f3a4f8604c0f63..33f3286f96e61580ad6e8a54d884dffdca8430e6 100644 (file)
@@ -18,6 +18,7 @@
 #include "display/curve.h"
 #include <glibmm/i18n.h>
 #include "xml/repr.h"
+#include "document.h"
 
 static void sp_polyline_class_init (SPPolyLineClass *klass);
 static void sp_polyline_init (SPPolyLine *polyline);
@@ -101,7 +102,7 @@ sp_polyline_set (SPObject *object, unsigned int key, const gchar *value)
                SPCurve * curve;
                const gchar * cptr;
                char * eptr;
-               bool hascpt;
+               gboolean hascpt;
 
                if (!value) break;
                curve = sp_curve_new ();
@@ -157,7 +158,8 @@ sp_polyline_write (SPObject *object, Inkscape::XML::Node *repr, guint flags)
        polyline = SP_POLYLINE (object);
 
        if ((flags & SP_OBJECT_WRITE_BUILD) && !repr) {
-               repr = sp_repr_new ("svg:polyline");
+               Inkscape::XML::Document *xml_doc = sp_document_repr_doc(SP_OBJECT_DOCUMENT(object));
+               repr = xml_doc->createElement("svg:polyline");
        }
 
        if (repr != SP_OBJECT_REPR (object)) {