summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorXisco Fauli <xiscofauli@libreoffice.org>2022-07-13 17:03:55 +0200
committerMichael Stahl <michael.stahl@allotropia.de>2022-07-15 10:53:11 +0200
commit417836d5d77d6c90d2117d73f4bc4c7bfc9287f7 (patch)
treecc7c5f2fcfb8b615a11f499b5acc4d80d49bb558
parenttdf#149978 sw: ODF import: fix nondeterministic automatic styles (diff)
downloadcore-417836d5d77d6c90d2117d73f4bc4c7bfc9287f7.tar.gz
core-417836d5d77d6c90d2117d73f4bc4c7bfc9287f7.zip
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> (cherry picked from commit 64d80a62fe39c66d2f95979d75bd06da2bc01213) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136992 Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
-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 6520c4066b81..56026fb40e1e 100644
--- a/svgio/source/svgreader/svggradientnode.cxx
+++ b/svgio/source/svgreader/svggradientnode.cxx
@@ -210,6 +210,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 2390f74dac03..2305b31bc2a8 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 e0fa2214be0f..7024e58c6cad 100644
--- a/svgio/source/svgreader/svgpatternnode.cxx
+++ b/svgio/source/svgreader/svgpatternnode.cxx
@@ -166,6 +166,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 925bfc4d1944..44c1d9cca019 100644
--- a/svgio/source/svgreader/svgtextpathnode.cxx
+++ b/svgio/source/svgreader/svgtextpathnode.cxx
@@ -291,6 +291,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());