diff --git a/src/document.cpp b/src/document.cpp
index 7c43b475c8d8c346d14da40098f029b23f22a076..288e52c6d88844244245381ac56986638d40d7e9 100644 (file)
--- a/src/document.cpp
+++ b/src/document.cpp
{
SPDocument *document;
Inkscape::XML::Node *rroot;
- Inkscape::Version sodipodi_version;
Inkscape::Preferences *prefs = Inkscape::Preferences::get();
rroot = rdoc->root();
document->root = sp_object_repr_build_tree(document, rroot);
- sodipodi_version = SP_ROOT(document->root)->version.sodipodi;
-
/* fixme: Not sure about this, but lets assume ::build updates */
- rroot->setAttribute("sodipodi:version", SODIPODI_VERSION);
rroot->setAttribute("inkscape:version", Inkscape::version_string);
/* fixme: Again, I moved these here to allow version determining in ::build (Lauris) */
/* Eliminate obsolete sodipodi:docbase, for privacy reasons */
rroot->setAttribute("sodipodi:docbase", NULL);
-
+
/* Eliminate any claim to adhere to a profile, as we don't try to */
rroot->setAttribute("baseProfile", NULL);
if (!sp_item_group_get_child_by_name((SPGroup *) document->root, NULL, "sodipodi:namedview")) {
// if there's none in the document already,
Inkscape::XML::Node *rnew = NULL;
-
+
rnew = rdoc->createElement("sodipodi:namedview");
//rnew->setAttribute("id", "base");
prefs->getInt("/template/base/inkscape:window-width", 640));
sp_repr_set_int(rnew, "inkscape:window-height",
prefs->getInt("/template/base/inkscape:window-height", 480));
-
+
// insert into the document
rroot->addChild(rnew, NULL);
// clean up
do_change_uri(document, filename, false);
}
-
+
/**
* Changes the base, name and uri members of \a document, and updates any
* relative hrefs in the document to be relative to the new base.