Code

Color Matrix Filter:
[inkscape.git] / src / sp-anchor.cpp
index 4b93f7cf03d723640c400c8a84712330d096b579..e168369577eb0bce1c8d2cb87365a9dda09a2f37 100644 (file)
@@ -24,6 +24,7 @@
 #include "attributes.h"
 #include "sp-anchor.h"
 #include "ui/view/view.h"
+#include "document.h"
 
 static void sp_anchor_class_init(SPAnchorClass *ac);
 static void sp_anchor_init(SPAnchor *anchor);
@@ -147,7 +148,8 @@ static Inkscape::XML::Node *sp_anchor_write(SPObject *object, Inkscape::XML::Nod
     SPAnchor *anchor = SP_ANCHOR(object);
 
     if ((flags & SP_OBJECT_WRITE_BUILD) && !repr) {
-        repr = sp_repr_new("svg:a");
+        Inkscape::XML::Document *xml_doc = sp_document_repr_doc(SP_OBJECT_DOCUMENT(object));
+        repr = xml_doc->createElement("svg:a");
     }
 
     repr->setAttribute("xlink:href", anchor->href);