summaryrefslogtreecommitdiffstats
path: root/src/sp-anchor.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/sp-anchor.cpp')
-rw-r--r--src/sp-anchor.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/sp-anchor.cpp b/src/sp-anchor.cpp
index 4b93f7cf0..e16836957 100644
--- a/src/sp-anchor.cpp
+++ b/src/sp-anchor.cpp
@@ -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);