Code

Filter effects dialog:
[inkscape.git] / src / marker.cpp
index 68b630920fa6a56a1f01af9127c66bc0626520f1..1fb7584623320724c76b0c964349b8347e55d10d 100644 (file)
@@ -1,12 +1,14 @@
-#define __SP_MARKER_C__
+#define __MARKER_C__
 
 /*
  * SVG <marker> implementation
  *
  * Authors:
  *   Lauris Kaplinski <lauris@kaplinski.com>
+ *   Bryce Harrington <bryce@bryceharrington.org>
  *
  * Copyright (C) 1999-2003 Lauris Kaplinski
+ *               2004-2006 Bryce Harrington
  *
  * Released under GNU GPL, read the file 'COPYING' for more information
  */
@@ -23,6 +25,7 @@
 #include "xml/repr.h"
 #include "attributes.h"
 #include "marker.h"
+#include "document.h"
 
 struct SPMarkerView {
        SPMarkerView *next;
@@ -487,7 +490,8 @@ sp_marker_write (SPObject *object, Inkscape::XML::Node *repr, guint flags)
        marker = SP_MARKER (object);
 
        if ((flags & SP_OBJECT_WRITE_BUILD) && !repr) {
-               repr = sp_repr_new ("svg:marker");
+               Inkscape::XML::Document *xml_doc = sp_document_repr_doc(SP_OBJECT_DOCUMENT(object));
+               repr = xml_doc->createElement("svg:marker");
        }
 
        if (marker->markerUnits_set) {