summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXisco Fauli <xiscofauli@libreoffice.org>2022-07-13 17:03:55 +0200
committerXisco Fauli <xiscofauli@libreoffice.org>2022-07-13 20:04:57 +0200
commit5169378d2a0f0a25013c8a4387a6e3cb1a4a55e9 (patch)
tree23f11cbad808004c5b60361f4c5df21660d9d486
parentac2a6ee9618e377806e529ed641f67e88684f7e7 (diff)
svgio: use href along with xlink:href
xlink:href has been deprecated. See https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/xlink:href Change-Id: I622cd975c0bcc1a819831d7b9c867312ff59affa Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137035 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
-rw-r--r--svgio/inc/svgtoken.hxx1
-rw-r--r--svgio/qa/cppunit/data/ClipPathAndStyle.svg4
-rw-r--r--svgio/source/svgreader/svganode.cxx1
-rw-r--r--svgio/source/svgreader/svggradientnode.cxx1
-rw-r--r--svgio/source/svgreader/svgimagenode.cxx1
-rw-r--r--svgio/source/svgreader/svgpatternnode.cxx1
-rw-r--r--svgio/source/svgreader/svgtextpathnode.cxx1
-rw-r--r--svgio/source/svgreader/svgtoken.cxx2
-rw-r--r--svgio/source/svgreader/svgtrefnode.cxx1
-rw-r--r--svgio/source/svgreader/svgusenode.cxx1
10 files changed, 12 insertions, 2 deletions
diff --git a/svgio/inc/svgtoken.hxx b/svgio/inc/svgtoken.hxx
index 16b7aad5f696..0a24d272be5f 100644
--- a/svgio/inc/svgtoken.hxx
+++ b/svgio/inc/svgtoken.hxx
@@ -153,6 +153,7 @@ namespace svgio::svgreader
GradientUnits,
GradientTransform,
SpreadMethod,
+ Href,
XlinkHref,
StopColor,
StopOpacity,
diff --git a/svgio/qa/cppunit/data/ClipPathAndStyle.svg b/svgio/qa/cppunit/data/ClipPathAndStyle.svg
index 29814fadbb86..f3b1777fa5fa 100644
--- a/svgio/qa/cppunit/data/ClipPathAndStyle.svg
+++ b/svgio/qa/cppunit/data/ClipPathAndStyle.svg
@@ -8,6 +8,6 @@
fill : #ccccff;"/>
</clipPath>
- <use xlink:href="#c1" style="fill:red" stroke-width="5px" stroke="black"/>
+ <use href="#c1" style="fill:red" stroke-width="5px" stroke="black"/>
-</svg> \ No newline at end of file
+</svg>
diff --git a/svgio/source/svgreader/svganode.cxx b/svgio/source/svgreader/svganode.cxx
index aa473eb9187f..d634be369441 100644
--- a/svgio/source/svgreader/svganode.cxx
+++ b/svgio/source/svgreader/svganode.cxx
@@ -64,6 +64,7 @@ namespace svgio::svgreader
}
break;
}
+ case SVGToken::Href:
case SVGToken::XlinkHref:
//TODO: add support for xlink:href
break;
diff --git a/svgio/source/svgreader/svggradientnode.cxx b/svgio/source/svgreader/svggradientnode.cxx
index db80e8a5c1ae..a6f99f7e5009 100644
--- a/svgio/source/svgreader/svggradientnode.cxx
+++ b/svgio/source/svgreader/svggradientnode.cxx
@@ -212,6 +212,7 @@ namespace svgio::svgreader
}
break;
}
+ case SVGToken::Href:
case SVGToken::XlinkHref:
{
const sal_Int32 nLen(aContent.getLength());
diff --git a/svgio/source/svgreader/svgimagenode.cxx b/svgio/source/svgreader/svgimagenode.cxx
index 2e8c05b0c9f5..1d6fd654bc61 100644
--- a/svgio/source/svgreader/svgimagenode.cxx
+++ b/svgio/source/svgreader/svgimagenode.cxx
@@ -134,6 +134,7 @@ namespace svgio::svgreader
}
break;
}
+ case SVGToken::Href:
case SVGToken::XlinkHref:
{
const sal_Int32 nLen(aContent.getLength());
diff --git a/svgio/source/svgreader/svgpatternnode.cxx b/svgio/source/svgreader/svgpatternnode.cxx
index 1e53cc8b2337..c8dad353713f 100644
--- a/svgio/source/svgreader/svgpatternnode.cxx
+++ b/svgio/source/svgreader/svgpatternnode.cxx
@@ -167,6 +167,7 @@ namespace svgio::svgreader
}
break;
}
+ case SVGToken::Href:
case SVGToken::XlinkHref:
{
const sal_Int32 nLen(aContent.getLength());
diff --git a/svgio/source/svgreader/svgtextpathnode.cxx b/svgio/source/svgreader/svgtextpathnode.cxx
index 129b2c280b88..43fccfa4308f 100644
--- a/svgio/source/svgreader/svgtextpathnode.cxx
+++ b/svgio/source/svgreader/svgtextpathnode.cxx
@@ -292,6 +292,7 @@ namespace svgio::svgreader
{
break;
}
+ case SVGToken::Href:
case SVGToken::XlinkHref:
{
const sal_Int32 nLen(aContent.getLength());
diff --git a/svgio/source/svgreader/svgtoken.cxx b/svgio/source/svgreader/svgtoken.cxx
index e3c4f85f1436..0b03e2c3f0cd 100644
--- a/svgio/source/svgreader/svgtoken.cxx
+++ b/svgio/source/svgreader/svgtoken.cxx
@@ -141,6 +141,7 @@ namespace svgio::svgreader
const char aSVGStrGradientUnits[] = "gradientUnits";
const char aSVGStrGradientTransform[] = "gradientTransform";
const char aSVGStrSpreadMethod[] = "spreadMethod";
+ const char aSVGStrHref[] = "href";
const char aSVGStrXlinkHref[] = "xlink:href";
const char aSVGStrStopColor[] = "stop-color";
const char aSVGStrStopOpacity[] = "stop-opacity";
@@ -287,6 +288,7 @@ namespace svgio::svgreader
{ aSVGStrGradientUnits, SVGToken::GradientUnits },
{ aSVGStrGradientTransform, SVGToken::GradientTransform },
{ aSVGStrSpreadMethod, SVGToken::SpreadMethod },
+ { aSVGStrHref, SVGToken::Href },
{ aSVGStrXlinkHref, SVGToken::XlinkHref },
{ aSVGStrStopColor, SVGToken::StopColor },
{ aSVGStrStopOpacity, SVGToken::StopOpacity },
diff --git a/svgio/source/svgreader/svgtrefnode.cxx b/svgio/source/svgreader/svgtrefnode.cxx
index 44b34a0cf3db..274ceb3972ce 100644
--- a/svgio/source/svgreader/svgtrefnode.cxx
+++ b/svgio/source/svgreader/svgtrefnode.cxx
@@ -55,6 +55,7 @@ namespace svgio::svgreader
readLocalCssStyle(aContent);
break;
}
+ case SVGToken::Href:
case SVGToken::XlinkHref:
{
const sal_Int32 nLen(aContent.getLength());
diff --git a/svgio/source/svgreader/svgusenode.cxx b/svgio/source/svgreader/svgusenode.cxx
index b3db75df0d4e..d3d4331b7abb 100644
--- a/svgio/source/svgreader/svgusenode.cxx
+++ b/svgio/source/svgreader/svgusenode.cxx
@@ -113,6 +113,7 @@ namespace svgio::svgreader
}
break;
}
+ case SVGToken::Href:
case SVGToken::XlinkHref:
{
const sal_Int32 nLen(aContent.getLength());