diff --git a/src/document.cpp b/src/document.cpp
index 8731ee71c798919a1fe9be694837a17b18629d46..9fc6dc4dae13491a348cbecf999dbe60164a39e8 100644 (file)
--- a/src/document.cpp
+++ b/src/document.cpp
// 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
/* 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);