svgio/inc/svgtoken.hxx                     |    1 +
 svgio/qa/cppunit/data/ClipPathAndStyle.svg |    4 ++--
 svgio/source/svgreader/svganode.cxx        |    1 +
 svgio/source/svgreader/svggradientnode.cxx |    1 +
 svgio/source/svgreader/svgimagenode.cxx    |    1 +
 svgio/source/svgreader/svgpatternnode.cxx  |    1 +
 svgio/source/svgreader/svgtextpathnode.cxx |    1 +
 svgio/source/svgreader/svgtoken.cxx        |    2 ++
 svgio/source/svgreader/svgtrefnode.cxx     |    1 +
 svgio/source/svgreader/svgusenode.cxx      |    1 +
 10 files changed, 12 insertions(+), 2 deletions(-)

New commits:
commit 417836d5d77d6c90d2117d73f4bc4c7bfc9287f7
Author:     Xisco Fauli <xiscofa...@libreoffice.org>
AuthorDate: Wed Jul 13 17:03:55 2022 +0200
Commit:     Michael Stahl <michael.st...@allotropia.de>
CommitDate: Fri Jul 15 10:53:11 2022 +0200

    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 <xiscofa...@libreoffice.org>
    (cherry picked from commit 64d80a62fe39c66d2f95979d75bd06da2bc01213)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136992
    Reviewed-by: Michael Stahl <michael.st...@allotropia.de>

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());

Reply via email to