index 3402e72b5cc0a0b147a55c794b1734771d26f14f..dd5371460f7c21a552f5a3f58a1f147f709bb002 100644 (file)
--- a/src/dialogs/xml-tree.cpp
+++ b/src/dialogs/xml-tree.cpp
g_assert(selected_repr != NULL);
if (name.text) {
+ Inkscape::XML::Document *xml_doc = sp_document_repr_doc(current_document);
Inkscape::XML::Node *new_repr;
- new_repr = sp_repr_new(name.text);
+ new_repr = xml_doc->createElement(name.text);
g_free(name.text);
selected_repr->appendChild(new_repr);
set_tree_select(new_repr);
{
g_assert(selected_repr != NULL);
- Inkscape::XML::Node *text = sp_repr_new_text("");
+ Inkscape::XML::Document *xml_doc = sp_document_repr_doc(current_document);
+ Inkscape::XML::Node *text = xml_doc->createTextNode("");
selected_repr->appendChild(text);
sp_document_done(current_document, SP_VERB_DIALOG_XML_EDITOR,
g_assert(selected_repr != NULL);
Inkscape::XML::Node *parent = sp_repr_parent(selected_repr);
- Inkscape::XML::Node *dup = selected_repr->duplicate();
+ Inkscape::XML::Node *dup = selected_repr->duplicate(parent->document());
parent->addChild(dup, selected_repr);
sp_document_done(current_document, SP_VERB_DIALOG_XML_EDITOR,