summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/attributes.cpp1
-rw-r--r--src/attributes.h1
-rw-r--r--src/color-profile.cpp2
-rw-r--r--src/filters/image.cpp2
-rw-r--r--src/sp-anchor.cpp2
-rw-r--r--src/sp-filter.cpp2
-rw-r--r--src/sp-gradient.cpp2
-rw-r--r--src/sp-hatch.cpp2
-rw-r--r--src/sp-image.cpp2
-rw-r--r--src/sp-pattern.cpp2
-rw-r--r--src/sp-script.cpp2
-rw-r--r--src/sp-tag-use.cpp5
-rw-r--r--src/sp-tref.cpp3
-rw-r--r--src/sp-tspan.cpp2
-rw-r--r--src/sp-use.cpp5
15 files changed, 32 insertions, 3 deletions
diff --git a/src/attributes.cpp b/src/attributes.cpp
index 646c2ab0c..223ce5803 100644
--- a/src/attributes.cpp
+++ b/src/attributes.cpp
@@ -44,6 +44,7 @@ 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 f5544d0a1..52884e193 100644
--- a/src/attributes.h
+++ b/src/attributes.h
@@ -44,6 +44,7 @@ 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 bcefe994a..99c62ecb3 100644
--- a/src/color-profile.cpp
+++ b/src/color-profile.cpp
@@ -271,6 +271,7 @@ 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" );
@@ -289,6 +290,7 @@ 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 62e8b76b9..50ae5b38f 100644
--- a/src/filters/image.cpp
+++ b/src/filters/image.cpp
@@ -53,6 +53,7 @@ void SPFeImage::build(SPDocument *document, Inkscape::XML::Node *repr)
this->readAttr( "preserveAspectRatio" );
this->readAttr( "xlink:href" );
+ this->readAttr( "href" );
}
/**
@@ -95,6 +96,7 @@ 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 78ba10c13..39bba610e 100644
--- a/src/sp-anchor.cpp
+++ b/src/sp-anchor.cpp
@@ -38,6 +38,7 @@ 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" );
}
@@ -53,6 +54,7 @@ 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 c17c67fc5..4d9aed9c8 100644
--- a/src/sp-filter.cpp
+++ b/src/sp-filter.cpp
@@ -79,6 +79,7 @@ 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);
@@ -173,6 +174,7 @@ 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 854d53dc4..b0a996ab1 100644
--- a/src/sp-gradient.cpp
+++ b/src/sp-gradient.cpp
@@ -287,6 +287,7 @@ 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
@@ -375,6 +376,7 @@ 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 2d938618c..274b73e86 100644
--- a/src/sp-hatch.cpp
+++ b/src/sp-hatch.cpp
@@ -73,6 +73,7 @@ void SPHatch::build(SPDocument* doc, Inkscape::XML::Node* repr)
readAttr("pitch");
readAttr("rotate");
readAttr("xlink:href");
+ readAttr("href");
readAttr( "style" );
// Register ourselves
@@ -196,6 +197,7 @@ 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 bf5b9ebcd..efa70ffdf 100644
--- a/src/sp-image.cpp
+++ b/src/sp-image.cpp
@@ -137,6 +137,7 @@ 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" );
@@ -179,6 +180,7 @@ 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 55110f3c5..721df31f4 100644
--- a/src/sp-pattern.cpp
+++ b/src/sp-pattern.cpp
@@ -75,6 +75,7 @@ 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);
@@ -182,6 +183,7 @@ 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 f1ea9c9bd..78a6544b3 100644
--- a/src/sp-script.cpp
+++ b/src/sp-script.cpp
@@ -28,6 +28,7 @@ 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);
}
@@ -58,6 +59,7 @@ 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 935f7429e..b891c8fa0 100644
--- a/src/sp-tag-use.cpp
+++ b/src/sp-tag-use.cpp
@@ -55,6 +55,7 @@ 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,
@@ -85,7 +86,9 @@ SPTagUse::set(unsigned key, gchar const *value)
{
switch (key) {
- case SP_ATTR_XLINK_HREF: {
+ case SP_ATTR_XLINK_HREF:
+ case SP_ATTR_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 ba592058b..7dd00eba5 100644
--- a/src/sp-tref.cpp
+++ b/src/sp-tref.cpp
@@ -67,6 +67,7 @@ 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" );
@@ -94,7 +95,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) { // xlink:href
+ } else if (key == SP_ATTR_XLINK_HREF || key == SP_ATTR_HREF ) { // xlink:href
if ( !value ) {
// No value
g_free(this->href);
diff --git a/src/sp-tspan.cpp b/src/sp-tspan.cpp
index 05f8430ba..d4fbddffb 100644
--- a/src/sp-tspan.cpp
+++ b/src/sp-tspan.cpp
@@ -245,6 +245,7 @@ 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;
@@ -283,6 +284,7 @@ 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 c8a0830c1..bf91d52b7 100644
--- a/src/sp-use.cpp
+++ b/src/sp-use.cpp
@@ -82,6 +82,7 @@ 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,
@@ -128,7 +129,9 @@ void SPUse::set(unsigned int key, const gchar* value) {
this->requestDisplayUpdate(SP_OBJECT_MODIFIED_FLAG);
break;
- case SP_ATTR_XLINK_HREF: {
+ case SP_ATTR_XLINK_HREF:
+ case SP_ATTR_HREF:
+ {
if ( value && this->href && ( strcmp(value, this->href) == 0 ) ) {
/* No change, do nothing. */
} else {