diff options
author | Xisco Fauli <xiscofauli@libreoffice.org> | 2023-08-02 13:35:53 +0200 |
---|---|---|
committer | Xisco Fauli <xiscofauli@libreoffice.org> | 2023-08-03 10:03:59 +0200 |
commit | b4ebb3159e00087ac94cd3494da22a5fa4c3e38f (patch) | |
tree | 498290145bdde5304ea73016df47b674dddd1790 /svgio | |
parent | 142e8c023575e2aabc7f60110137da85e5a06770 (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>
(cherry picked from commit b5e44241c2b68a77c5bf299f1c2d912c49ea1a9e)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155236
Diffstat (limited to 'svgio')
-rw-r--r-- | svgio/inc/svgtoken.hxx | 1 | ||||
-rw-r--r-- | svgio/source/svgreader/svgdocumenthandler.cxx | 2 | ||||
-rw-r--r-- | svgio/source/svgreader/svgtoken.cxx | 6 |
3 files changed, 7 insertions, 2 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 7fc95dd8f36d..1f92c11d20cf 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 0d77ca901ee8..77303e65b9ce 100644 --- a/svgio/source/svgreader/svgtoken.cxx +++ b/svgio/source/svgreader/svgtoken.cxx @@ -25,7 +25,7 @@ namespace svgio::svgreader { -constexpr frozen::unordered_map<std::u16string_view, SVGToken, 145> aSVGTokenMapperList +constexpr frozen::unordered_map<std::u16string_view, SVGToken, 146> aSVGTokenMapperList { { u"width", SVGToken::Width }, { u"height", SVGToken::Height }, @@ -129,6 +129,7 @@ constexpr frozen::unordered_map<std::u16string_view, SVGToken, 145> aSVGTokenMap { u"g", SVGToken::G }, { u"svg", SVGToken::Svg }, { u"symbol", SVGToken::Symbol }, + { u"switch", SVGToken::Switch }, { u"use", SVGToken::Use }, { u"a", SVGToken::A }, @@ -182,7 +183,7 @@ constexpr frozen::unordered_map<std::u16string_view, SVGToken, 145> aSVGTokenMap // The same elements as the map above but lowercase. CSS is case insensitive // TODO: create separate maps for css and xml elements -constexpr frozen::unordered_map<std::u16string_view, SVGToken, 145> aSVGLowerCaseTokenMapperList +constexpr frozen::unordered_map<std::u16string_view, SVGToken, 146> aSVGLowerCaseTokenMapperList { { u"width", SVGToken::Width }, { u"height", SVGToken::Height }, @@ -286,6 +287,7 @@ constexpr frozen::unordered_map<std::u16string_view, SVGToken, 145> aSVGLowerCas { u"g", SVGToken::G }, { u"svg", SVGToken::Svg }, { u"symbol", SVGToken::Symbol }, + { u"switch", SVGToken::Switch }, { u"use", SVGToken::Use }, { u"a", SVGToken::A }, |