summaryrefslogtreecommitdiffstats
path: root/src/document.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/document.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/document.cpp')
-rw-r--r--src/document.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/document.cpp b/src/document.cpp
index 8731ee71c..9fc6dc4da 100644
--- a/src/document.cpp
+++ b/src/document.cpp
@@ -277,7 +277,7 @@ sp_document_create(Inkscape::XML::Document *rdoc,
// see if there's a template with id="base" in the preferences
if (!r) {
// if there's none, create an empty element
- rnew = sp_repr_new("sodipodi:namedview");
+ rnew = rdoc->createElement("sodipodi:namedview");
rnew->setAttribute("id", "base");
} else {
// otherwise, take from preferences
@@ -292,7 +292,7 @@ sp_document_create(Inkscape::XML::Document *rdoc,
/* Defs */
if (!SP_ROOT(document->root)->defs) {
Inkscape::XML::Node *r;
- r = sp_repr_new("svg:defs");
+ r = rdoc->createElement("svg:defs");
rroot->addChild(r, NULL);
Inkscape::GC::release(r);
g_assert(SP_ROOT(document->root)->defs);