summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJon A. Cruz <jon@joncruz.org>2009-06-09 08:41:43 +0000
committerjoncruz <joncruz@users.sourceforge.net>2009-06-09 08:41:43 +0000
commit2597a73d85f8416072e2d95c4813662b2f0cd503 (patch)
tree17f75c442ddfa9ab159754705d967d2ef449ea8b /src
parentCorrect handling of version and set to 1.1 for default. Fixes bug #168180. (diff)
downloadinkscape-2597a73d85f8416072e2d95c4813662b2f0cd503.tar.gz
inkscape-2597a73d85f8416072e2d95c4813662b2f0cd503.zip
Removed sodipodi:version
(bzr r8029)
Diffstat (limited to 'src')
-rw-r--r--src/attributes.cpp1
-rw-r--r--src/attributes.h1
-rw-r--r--src/document.cpp12
-rw-r--r--src/sp-ellipse.cpp2
-rw-r--r--src/sp-object.cpp18
-rw-r--r--src/sp-object.h2
-rw-r--r--src/sp-root.cpp23
-rw-r--r--src/sp-root.h1
-rw-r--r--src/version.h1
9 files changed, 10 insertions, 51 deletions
diff --git a/src/attributes.cpp b/src/attributes.cpp
index a0801920e..69b11fae9 100644
--- a/src/attributes.cpp
+++ b/src/attributes.cpp
@@ -57,7 +57,6 @@ static SPStyleProp const props[] = {
{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 08ece3483..52f71b203 100644
--- a/src/attributes.h
+++ b/src/attributes.h
@@ -57,7 +57,6 @@ enum SPAttributeEnum {
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 7c43b475c..288e52c6d 100644
--- a/src/document.cpp
+++ b/src/document.cpp
@@ -263,7 +263,6 @@ sp_document_create(Inkscape::XML::Document *rdoc,
{
SPDocument *document;
Inkscape::XML::Node *rroot;
- Inkscape::Version sodipodi_version;
Inkscape::Preferences *prefs = Inkscape::Preferences::get();
rroot = rdoc->root();
@@ -293,10 +292,7 @@ sp_document_create(Inkscape::XML::Document *rdoc,
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) */
@@ -313,7 +309,7 @@ sp_document_create(Inkscape::XML::Document *rdoc,
/* 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);
@@ -321,7 +317,7 @@ sp_document_create(Inkscape::XML::Document *rdoc,
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");
@@ -351,7 +347,7 @@ sp_document_create(Inkscape::XML::Document *rdoc,
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
@@ -672,7 +668,7 @@ void sp_document_set_uri(SPDocument *document, gchar const *filename)
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 251620b6c..ff2e39044 100644
--- a/src/sp-ellipse.cpp
+++ b/src/sp-ellipse.cpp
@@ -694,8 +694,6 @@ sp_arc_build(SPObject *object, SPDocument *document, Inkscape::XML::Node *repr)
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 9037d45a9..85e8a4e9a 100644
--- a/src/sp-object.cpp
+++ b/src/sp-object.cpp
@@ -1554,24 +1554,6 @@ SPObject::_requireSVGVersion(Inkscape::Version version) {
}
/**
- * 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.
*/
SPObject *
diff --git a/src/sp-object.h b/src/sp-object.h
index 095494a6f..bbb8ecbd0 100644
--- 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 26845356f..bd935074d 100644
--- a/src/sp-root.cpp
+++ b/src/sp-root.cpp
@@ -117,9 +117,10 @@ sp_root_init(SPRoot *root)
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");
@@ -210,10 +204,6 @@ sp_root_set(SPObject *object, unsigned int key, gchar const *value)
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 655bc3caf..7976eb2f4 100644
--- a/src/sp-root.h
+++ b/src/sp-root.h
@@ -29,7 +29,6 @@
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 98b613914..c62063123 100644
--- a/src/version.h
+++ b/src/version.h
@@ -13,7 +13,6 @@
#include <glib/gtypes.h>
#define SVG_VERSION "1.1"
-#define SODIPODI_VERSION "0.32"
namespace Inkscape {