summaryrefslogtreecommitdiffstats
path: root/src/dialogs/xml-tree.cpp
diff options
context:
space:
mode:
authorMenTaLguY <mental@rydia.net>2007-01-21 19:03:03 +0000
committermental <mental@users.sourceforge.net>2007-01-21 19:03:03 +0000
commit63731301866e7b9cb231a43658a7c51ec2d70690 (patch)
tree91b475a32308003e60e40ac0f318dc00be019a6e /src/dialogs/xml-tree.cpp
parentDeprecate sp_repr_new* functions (diff)
downloadinkscape-63731301866e7b9cb231a43658a7c51ec2d70690.tar.gz
inkscape-63731301866e7b9cb231a43658a7c51ec2d70690.zip
start switching sp_repr_new* over to XML::Document::create*, and rename create methods to match DOM
(bzr r2253)
Diffstat (limited to 'src/dialogs/xml-tree.cpp')
-rw-r--r--src/dialogs/xml-tree.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/dialogs/xml-tree.cpp b/src/dialogs/xml-tree.cpp
index 3402e72b5..9ad3c0586 100644
--- a/src/dialogs/xml-tree.cpp
+++ b/src/dialogs/xml-tree.cpp
@@ -1368,8 +1368,9 @@ void cmd_new_element_node(GtkObject *object, gpointer data)
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);
@@ -1387,7 +1388,8 @@ void cmd_new_text_node(GtkObject *object, gpointer data)
{
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,