summaryrefslogtreecommitdiff
path: root/svgio
diff options
context:
space:
mode:
authorXisco Fauli <xiscofauli@libreoffice.org>2023-08-02 13:35:53 +0200
committerXisco Fauli <xiscofauli@libreoffice.org>2023-08-02 18:04:49 +0200
commit76f50549f4898313ef4a18ce32d1f0a625ce766d (patch)
tree44f2ae9504c331b89f495e65cf5655cfbe2ed7eb /svgio
parent5f6c337bbb3bdfbea05484ad0cc6ff58d575a39b (diff)
tdf#156579: treat switch element as a group
Regression from commit 13a41e7a12598c7896d6dc8d34aba6af5b80b83c Author: Xisco Fauli <xiscofauli@libreoffice.org> Date: Mon Jul 3 14:11:43 2023 +0200 tdf#150124: do nothing when parent is of unkown type because 'switch' is not a known token. For now it, treat it as a group No need to have a unittest for this Change-Id: I4cae92a010e45cd729db475a7abccab19a5d5403 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155250 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Diffstat (limited to 'svgio')
-rw-r--r--svgio/inc/svgtoken.hxx1
-rw-r--r--svgio/source/svgreader/svgdocumenthandler.cxx2
-rw-r--r--svgio/source/svgreader/svgtoken.cxx2
3 files changed, 5 insertions, 0 deletions
diff --git a/svgio/inc/svgtoken.hxx b/svgio/inc/svgtoken.hxx
index cec89241903a..175297fa67e5 100644
--- a/svgio/inc/svgtoken.hxx
+++ b/svgio/inc/svgtoken.hxx
@@ -135,6 +135,7 @@ namespace svgio::svgreader
G,
Svg,
Symbol,
+ Switch,
Use,
A,
diff --git a/svgio/source/svgreader/svgdocumenthandler.cxx b/svgio/source/svgreader/svgdocumenthandler.cxx
index be80d1b828df..5c600a86dce1 100644
--- a/svgio/source/svgreader/svgdocumenthandler.cxx
+++ b/svgio/source/svgreader/svgdocumenthandler.cxx
@@ -203,6 +203,7 @@ namespace
mpTarget->parseAttributes(xAttribs);
break;
}
+ case SVGToken::Switch: //TODO: Support switch element
case SVGToken::Defs:
case SVGToken::G:
{
@@ -487,6 +488,7 @@ namespace
case SVGToken::G:
case SVGToken::Svg:
case SVGToken::Symbol:
+ case SVGToken::Switch:
case SVGToken::Use:
case SVGToken::A:
diff --git a/svgio/source/svgreader/svgtoken.cxx b/svgio/source/svgreader/svgtoken.cxx
index d5222a2df125..24e24a5a31f7 100644
--- a/svgio/source/svgreader/svgtoken.cxx
+++ b/svgio/source/svgreader/svgtoken.cxx
@@ -129,6 +129,7 @@ constexpr auto aSVGTokenMapperList = frozen::make_unordered_map<std::u16string_v
{ u"g", SVGToken::G },
{ u"svg", SVGToken::Svg },
{ u"symbol", SVGToken::Symbol },
+ { u"switch", SVGToken::Switch },
{ u"use", SVGToken::Use },
{ u"a", SVGToken::A },
@@ -286,6 +287,7 @@ constexpr auto aSVGLowerCaseTokenMapperList = frozen::make_unordered_map<std::u
{ u"g", SVGToken::G },
{ u"svg", SVGToken::Svg },
{ u"symbol", SVGToken::Symbol },
+ { u"switch", SVGToken::Switch },
{ u"use", SVGToken::Use },
{ u"a", SVGToken::A },