summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 1b60341)
raw | patch | inline | side by side (parent: 1b60341)
author | joncruz <joncruz@users.sourceforge.net> | |
Tue, 9 Jun 2009 08:41:43 +0000 (08:41 +0000) | ||
committer | joncruz <joncruz@users.sourceforge.net> | |
Tue, 9 Jun 2009 08:41:43 +0000 (08:41 +0000) |
diff --git a/src/attributes.cpp b/src/attributes.cpp
index a0801920ebfbe4e32ebb2d360322a6d04190a19b..69b11fae9cf06afcc018b88f4e3f3024b0435dea 100644 (file)
--- a/src/attributes.cpp
+++ b/src/attributes.cpp
{SP_ATTR_HEIGHT, "height"},
{SP_ATTR_VIEWBOX, "viewBox"},
{SP_ATTR_PRESERVEASPECTRATIO, "preserveAspectRatio"},
- {SP_ATTR_SODIPODI_VERSION, "sodipodi:version"},
{SP_ATTR_INKSCAPE_VERSION, "inkscape:version"},
{SP_ATTR_ONLOAD, "onload"},
/* SPNamedView */
diff --git a/src/attributes.h b/src/attributes.h
index 08ece3483efa2c2beb1048abc162789e772a96a3..52f71b203a298bc7d0ac03f7ac537cb3bca7597c 100644 (file)
--- a/src/attributes.h
+++ b/src/attributes.h
SP_ATTR_HEIGHT,
SP_ATTR_VIEWBOX,
SP_ATTR_PRESERVEASPECTRATIO,
- SP_ATTR_SODIPODI_VERSION,
SP_ATTR_INKSCAPE_VERSION,
SP_ATTR_ONLOAD,
/* SPNamedView */
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.
diff --git a/src/sp-ellipse.cpp b/src/sp-ellipse.cpp
index 251620b6c96eb7c323a58844af7e8505c1864855..ff2e3904437961c62e8f6481a4cb7e12ad9c323e 100644 (file)
--- a/src/sp-ellipse.cpp
+++ b/src/sp-ellipse.cpp
if (((SPObjectClass *) arc_parent_class)->build)
(* ((SPObjectClass *) arc_parent_class)->build) (object, document, repr);
- Inkscape::Version version = sp_object_get_sodipodi_version(object);
-
sp_object_read_attr(object, "sodipodi:cx");
sp_object_read_attr(object, "sodipodi:cy");
sp_object_read_attr(object, "sodipodi:rx");
diff --git a/src/sp-object.cpp b/src/sp-object.cpp
index 9037d45a976800f0685033e29d1343473c444a87..85e8a4e9ab4ad8898967f1de925bd74da2dbcb97 100644 (file)
--- a/src/sp-object.cpp
+++ b/src/sp-object.cpp
}
}
-/**
- * Return sodipodi version of first root ancestor or (0,0).
- */
-Inkscape::Version
-sp_object_get_sodipodi_version(SPObject *object)
-{
- static Inkscape::Version const zero_version(0, 0);
-
- while (object) {
- if (SP_IS_ROOT(object)) {
- return SP_ROOT(object)->version.sodipodi;
- }
- object = SP_OBJECT_PARENT(object);
- }
-
- return zero_version;
-}
-
/**
* Returns previous object in sibling list or NULL.
*/
diff --git a/src/sp-object.h b/src/sp-object.h
index 095494a6f67a913ec0a1bb6369d74a036b9653d0..bbb8ecbd0a2d096e14baa0ccffaad3c75dec5f6c 100644 (file)
--- a/src/sp-object.h
+++ b/src/sp-object.h
@@ -554,8 +554,6 @@ void sp_object_removeAttribute(SPObject *object, gchar const *key, SPException *
gchar const *sp_object_get_style_property(SPObject const *object,
gchar const *key, gchar const *def);
-Inkscape::Version sp_object_get_sodipodi_version(SPObject *object);
-
int sp_object_compare_position(SPObject const *first, SPObject const *second);
SPObject *sp_object_prev(SPObject *child);
diff --git a/src/sp-root.cpp b/src/sp-root.cpp
index 26845356f008e68ac186cd39780022bf5532d227..bd935074dec47dfba5663dbf6a68aebcdf5348c5 100644 (file)
--- a/src/sp-root.cpp
+++ b/src/sp-root.cpp
static Inkscape::Version const zero_version(0, 0);
sp_version_from_string(SVG_VERSION, &root->original.svg);
- root->version.svg = root->original.svg;
- root->version.inkscape = root->original.inkscape =
- root->version.sodipodi = root->original.sodipodi = zero_version;
+ root->version.svg = zero_version;
+ root->original.svg = zero_version;
+ root->version.inkscape = zero_version;
+ root->original.inkscape = zero_version;
root->x.unset();
root->y.unset();
@@ -145,18 +146,11 @@ sp_root_build(SPObject *object, SPDocument *document, Inkscape::XML::Node *repr)
SPGroup *group = (SPGroup *) object;
SPRoot *root = (SPRoot *) object;
- if (repr->attribute("sodipodi:docname") || repr->attribute("SP-DOCNAME")) {
- /* so we have a nonzero initial version */
- root->original.sodipodi.major = 0;
- root->original.sodipodi.minor = 1;
- }
-
if ( !object->repr->attribute("version") ) {
- repr->setAttribute("version", SVG_VERSION);
- }
+ repr->setAttribute("version", SVG_VERSION);
+ }
sp_object_read_attr(object, "version");
- sp_object_read_attr(object, "sodipodi:version");
sp_object_read_attr(object, "inkscape:version");
/* It is important to parse these here, so objects will have viewport build-time */
sp_object_read_attr(object, "x");
root->version.svg = root->original.svg;
}
break;
- case SP_ATTR_SODIPODI_VERSION:
- if (!sp_version_from_string(value, &root->version.sodipodi)) {
- root->version.sodipodi = root->original.sodipodi;
- }
case SP_ATTR_INKSCAPE_VERSION:
if (!sp_version_from_string(value, &root->version.inkscape)) {
root->version.inkscape = root->original.inkscape;
@@ -593,7 +583,6 @@ sp_root_write(SPObject *object, Inkscape::XML::Document *xml_doc, Inkscape::XML:
}
if (flags & SP_OBJECT_WRITE_EXT) {
- repr->setAttribute("sodipodi:version", SODIPODI_VERSION);
repr->setAttribute("inkscape:version", Inkscape::version_string);
}
diff --git a/src/sp-root.h b/src/sp-root.h
index 655bc3caf1146d918fe61e609462e7dc18001ede..7976eb2f4eb46f7b073f9d4edf918284d855b620 100644 (file)
--- a/src/sp-root.h
+++ b/src/sp-root.h
struct SPRoot : public SPGroup {
struct {
Inkscape::Version svg;
- Inkscape::Version sodipodi;
Inkscape::Version inkscape;
} version, original;
diff --git a/src/version.h b/src/version.h
index 98b6139144592a02ecacde8a5f5c90804deff9cd..c620631237c27791cdcfe3b772c5b3051b4659f1 100644 (file)
--- a/src/version.h
+++ b/src/version.h
#include <glib/gtypes.h>
#define SVG_VERSION "1.1"
-#define SODIPODI_VERSION "0.32"
namespace Inkscape {