diff options
| author | Tavmjong Bah <tavmjong@free.fr> | 2016-04-29 16:12:37 +0000 |
|---|---|---|
| committer | tavmjong-free <tavmjong@free.fr> | 2016-04-29 16:12:37 +0000 |
| commit | a6a6de5c06d3183329d73fa39ae0ba02bbd838e1 (patch) | |
| tree | 2df07d7bfcccfc5a746a0613e30cdeb9a46ac3e1 /src | |
| parent | SVG 2 allows 'href' without 'xlink:'. For now just read plain 'href'. (diff) | |
| download | inkscape-a6a6de5c06d3183329d73fa39ae0ba02bbd838e1.tar.gz inkscape-a6a6de5c06d3183329d73fa39ae0ba02bbd838e1.zip | |
Backout last commit as it introduced subtle errors.
(bzr r14864)
Diffstat (limited to 'src')
| -rw-r--r-- | src/attributes.cpp | 1 | ||||
| -rw-r--r-- | src/attributes.h | 1 | ||||
| -rw-r--r-- | src/color-profile.cpp | 2 | ||||
| -rw-r--r-- | src/filters/image.cpp | 2 | ||||
| -rw-r--r-- | src/sp-anchor.cpp | 2 | ||||
| -rw-r--r-- | src/sp-filter.cpp | 2 | ||||
| -rw-r--r-- | src/sp-gradient.cpp | 2 | ||||
| -rw-r--r-- | src/sp-hatch.cpp | 2 | ||||
| -rw-r--r-- | src/sp-image.cpp | 2 | ||||
| -rw-r--r-- | src/sp-pattern.cpp | 2 | ||||
| -rw-r--r-- | src/sp-script.cpp | 2 | ||||
| -rw-r--r-- | src/sp-tag-use.cpp | 5 | ||||
| -rw-r--r-- | src/sp-tref.cpp | 3 | ||||
| -rw-r--r-- | src/sp-tspan.cpp | 2 | ||||
| -rw-r--r-- | src/sp-use.cpp | 5 |
15 files changed, 3 insertions, 32 deletions
diff --git a/src/attributes.cpp b/src/attributes.cpp index 223ce5803..646c2ab0c 100644 --- a/src/attributes.cpp +++ b/src/attributes.cpp @@ -44,7 +44,6 @@ static SPStyleProp const props[] = { {SP_ATTR_INKSCAPE_SPRAY_ORIGIN, "inkscape:spray-origin"}, /* SPAnchor */ {SP_ATTR_XLINK_HREF, "xlink:href"}, - {SP_ATTR_HREF, "href"}, {SP_ATTR_XLINK_TYPE, "xlink:type"}, {SP_ATTR_XLINK_ROLE, "xlink:role"}, {SP_ATTR_XLINK_ARCROLE, "xlink:arcrole"}, diff --git a/src/attributes.h b/src/attributes.h index 52884e193..f5544d0a1 100644 --- a/src/attributes.h +++ b/src/attributes.h @@ -44,7 +44,6 @@ enum SPAttributeEnum { SP_ATTR_INKSCAPE_SPRAY_ORIGIN, /* SPAnchor */ SP_ATTR_XLINK_HREF, - SP_ATTR_HREF, // SVG2 allows href without xlink SP_ATTR_XLINK_TYPE, SP_ATTR_XLINK_ROLE, SP_ATTR_XLINK_ARCROLE, diff --git a/src/color-profile.cpp b/src/color-profile.cpp index 99c62ecb3..bcefe994a 100644 --- a/src/color-profile.cpp +++ b/src/color-profile.cpp @@ -271,7 +271,6 @@ void ColorProfile::build(SPDocument *document, Inkscape::XML::Node *repr) { SPObject::build(document, repr); this->readAttr( "xlink:href" ); - this->readAttr( "href" ); this->readAttr( "id" ); this->readAttr( "local" ); this->readAttr( "name" ); @@ -290,7 +289,6 @@ void ColorProfile::build(SPDocument *document, Inkscape::XML::Node *repr) { void ColorProfile::set(unsigned key, gchar const *value) { switch (key) { case SP_ATTR_XLINK_HREF: - case SP_ATTR_HREF: if ( this->href ) { g_free( this->href ); this->href = 0; diff --git a/src/filters/image.cpp b/src/filters/image.cpp index 50ae5b38f..62e8b76b9 100644 --- a/src/filters/image.cpp +++ b/src/filters/image.cpp @@ -53,7 +53,6 @@ void SPFeImage::build(SPDocument *document, Inkscape::XML::Node *repr) this->readAttr( "preserveAspectRatio" ); this->readAttr( "xlink:href" ); - this->readAttr( "href" ); } /** @@ -96,7 +95,6 @@ void SPFeImage::set(unsigned int key, gchar const *value) { switch(key) { /*DEAL WITH SETTING ATTRIBUTES HERE*/ case SP_ATTR_XLINK_HREF: - case SP_ATTR_HREF: if (this->href) { g_free(this->href); } diff --git a/src/sp-anchor.cpp b/src/sp-anchor.cpp index 39bba610e..78ba10c13 100644 --- a/src/sp-anchor.cpp +++ b/src/sp-anchor.cpp @@ -38,7 +38,6 @@ void SPAnchor::build(SPDocument *document, Inkscape::XML::Node *repr) { this->readAttr( "xlink:show" ); this->readAttr( "xlink:actuate" ); this->readAttr( "xlink:href" ); - this->readAttr( "xlink" ); this->readAttr( "target" ); } @@ -54,7 +53,6 @@ void SPAnchor::release() { void SPAnchor::set(unsigned int key, const gchar* value) { switch (key) { case SP_ATTR_XLINK_HREF: - case SP_ATTR_HREF: g_free(this->href); this->href = g_strdup(value); this->requestModified(SP_OBJECT_MODIFIED_FLAG); diff --git a/src/sp-filter.cpp b/src/sp-filter.cpp index 4d9aed9c8..c17c67fc5 100644 --- a/src/sp-filter.cpp +++ b/src/sp-filter.cpp @@ -79,7 +79,6 @@ void SPFilter::build(SPDocument *document, Inkscape::XML::Node *repr) { this->readAttr( "height" ); this->readAttr( "filterRes" ); this->readAttr( "xlink:href" ); - this->readAttr( "href" ); this->_refcount = 0; SPObject::build(document, repr); @@ -174,7 +173,6 @@ void SPFilter::set(unsigned int key, gchar const *value) { this->requestModified(SP_OBJECT_MODIFIED_FLAG); break; case SP_ATTR_XLINK_HREF: - case SP_ATTR_HREF: if (value) { try { this->href->attach(Inkscape::URI(value)); diff --git a/src/sp-gradient.cpp b/src/sp-gradient.cpp index b0a996ab1..854d53dc4 100644 --- a/src/sp-gradient.cpp +++ b/src/sp-gradient.cpp @@ -287,7 +287,6 @@ void SPGradient::build(SPDocument *document, Inkscape::XML::Node *repr) this->readAttr( "gradientTransform" ); this->readAttr( "spreadMethod" ); this->readAttr( "xlink:href" ); - this->readAttr( "href" ); this->readAttr( "osb:paint" ); // Register ourselves @@ -376,7 +375,6 @@ void SPGradient::set(unsigned key, gchar const *value) break; case SP_ATTR_XLINK_HREF: - case SP_ATTR_HREF: if (value) { try { this->ref->attach(Inkscape::URI(value)); diff --git a/src/sp-hatch.cpp b/src/sp-hatch.cpp index 274b73e86..2d938618c 100644 --- a/src/sp-hatch.cpp +++ b/src/sp-hatch.cpp @@ -73,7 +73,6 @@ void SPHatch::build(SPDocument* doc, Inkscape::XML::Node* repr) readAttr("pitch"); readAttr("rotate"); readAttr("xlink:href"); - readAttr("href"); readAttr( "style" ); // Register ourselves @@ -197,7 +196,6 @@ void SPHatch::set(unsigned int key, const gchar* value) break; case SP_ATTR_XLINK_HREF: - case SP_ATTR_HREF: if (value && href == value) { // Href unchanged, do nothing. } else { diff --git a/src/sp-image.cpp b/src/sp-image.cpp index efa70ffdf..bf5b9ebcd 100644 --- a/src/sp-image.cpp +++ b/src/sp-image.cpp @@ -137,7 +137,6 @@ void SPImage::build(SPDocument *document, Inkscape::XML::Node *repr) { SPItem::build(document, repr); this->readAttr( "xlink:href" ); - this->readAttr( "href" ); this->readAttr( "x" ); this->readAttr( "y" ); this->readAttr( "width" ); @@ -180,7 +179,6 @@ void SPImage::release() { void SPImage::set(unsigned int key, const gchar* value) { switch (key) { case SP_ATTR_XLINK_HREF: - case SP_ATTR_HREF: g_free (this->href); this->href = (value) ? g_strdup (value) : NULL; this->requestDisplayUpdate(SP_OBJECT_MODIFIED_FLAG | SP_IMAGE_HREF_MODIFIED_FLAG); diff --git a/src/sp-pattern.cpp b/src/sp-pattern.cpp index 721df31f4..55110f3c5 100644 --- a/src/sp-pattern.cpp +++ b/src/sp-pattern.cpp @@ -75,7 +75,6 @@ void SPPattern::build(SPDocument *doc, Inkscape::XML::Node *repr) this->readAttr("viewBox"); this->readAttr("preserveAspectRatio"); this->readAttr("xlink:href"); - this->readAttr("href"); /* Register ourselves */ doc->addResource("pattern", this); @@ -183,7 +182,6 @@ void SPPattern::set(unsigned int key, const gchar *value) break; case SP_ATTR_XLINK_HREF: - case SP_ATTR_HREF: if (value && this->href == value) { /* Href unchanged, do nothing. */ } diff --git a/src/sp-script.cpp b/src/sp-script.cpp index 78a6544b3..f1ea9c9bd 100644 --- a/src/sp-script.cpp +++ b/src/sp-script.cpp @@ -28,7 +28,6 @@ void SPScript::build(SPDocument* doc, Inkscape::XML::Node* repr) { //Read values of key attributes from XML nodes into object. this->readAttr( "xlink:href" ); - this->readAttr( "href" ); doc->addResource("script", this); } @@ -59,7 +58,6 @@ void SPScript::modified(unsigned int /*flags*/) { void SPScript::set(unsigned int key, const gchar* value) { switch (key) { case SP_ATTR_XLINK_HREF: - case SP_ATTR_HREF: if (this->xlinkhref) { g_free(this->xlinkhref); } diff --git a/src/sp-tag-use.cpp b/src/sp-tag-use.cpp index b891c8fa0..935f7429e 100644 --- a/src/sp-tag-use.cpp +++ b/src/sp-tag-use.cpp @@ -55,7 +55,6 @@ SPTagUse::build(SPDocument *document, Inkscape::XML::Node *repr) { SPObject::build(document, repr); readAttr( "xlink:href" ); - readAttr( "href" ); // We don't need to create child here: // reading xlink:href will attach ref, and that will cause the changed signal to be emitted, @@ -86,9 +85,7 @@ SPTagUse::set(unsigned key, gchar const *value) { switch (key) { - case SP_ATTR_XLINK_HREF: - case SP_ATTR_HREF: - { + case SP_ATTR_XLINK_HREF: { if ( value && href && ( strcmp(value, href) == 0 ) ) { /* No change, do nothing. */ } else { diff --git a/src/sp-tref.cpp b/src/sp-tref.cpp index 7dd00eba5..ba592058b 100644 --- a/src/sp-tref.cpp +++ b/src/sp-tref.cpp @@ -67,7 +67,6 @@ void SPTRef::build(SPDocument *document, Inkscape::XML::Node *repr) { SPItem::build(document, repr); this->readAttr( "xlink:href" ); - this->readAttr( "href" ); this->readAttr( "x" ); this->readAttr( "y" ); this->readAttr( "dx" ); @@ -95,7 +94,7 @@ void SPTRef::set(unsigned int key, const gchar* value) { if (this->attributes.readSingleAttribute(key, value, style, &viewport)) { // x, y, dx, dy, rotate this->requestDisplayUpdate(SP_OBJECT_MODIFIED_FLAG); - } else if (key == SP_ATTR_XLINK_HREF || key == SP_ATTR_HREF ) { // xlink:href + } else if (key == SP_ATTR_XLINK_HREF) { // xlink:href if ( !value ) { // No value g_free(this->href); diff --git a/src/sp-tspan.cpp b/src/sp-tspan.cpp index d4fbddffb..05f8430ba 100644 --- a/src/sp-tspan.cpp +++ b/src/sp-tspan.cpp @@ -245,7 +245,6 @@ void SPTextPath::build(SPDocument *doc, Inkscape::XML::Node *repr) { this->readAttr( "rotate" ); this->readAttr( "startOffset" ); this->readAttr( "xlink:href" ); - this->readAttr( "href" ); bool no_content = true; @@ -284,7 +283,6 @@ void SPTextPath::set(unsigned int key, const gchar* value) { } else { switch (key) { case SP_ATTR_XLINK_HREF: - case SP_ATTR_HREF: this->sourcePath->link((char*)value); break; case SP_ATTR_STARTOFFSET: diff --git a/src/sp-use.cpp b/src/sp-use.cpp index bf91d52b7..c8a0830c1 100644 --- a/src/sp-use.cpp +++ b/src/sp-use.cpp @@ -82,7 +82,6 @@ void SPUse::build(SPDocument *document, Inkscape::XML::Node *repr) { this->readAttr( "width" ); this->readAttr( "height" ); this->readAttr( "xlink:href" ); - this->readAttr( "href" ); // We don't need to create child here: // reading xlink:href will attach ref, and that will cause the changed signal to be emitted, @@ -129,9 +128,7 @@ void SPUse::set(unsigned int key, const gchar* value) { this->requestDisplayUpdate(SP_OBJECT_MODIFIED_FLAG); break; - case SP_ATTR_XLINK_HREF: - case SP_ATTR_HREF: - { + case SP_ATTR_XLINK_HREF: { if ( value && this->href && ( strcmp(value, this->href) == 0 ) ) { /* No change, do nothing. */ } else { |
