svgio/inc/svgdocumenthandler.hxx              |    2 --
 svgio/inc/svgtoken.hxx                        |    4 +---
 svgio/source/svgreader/svgdocumenthandler.cxx |   19 +------------------
 svgio/source/svgreader/svgtoken.cxx           |    6 ++----
 4 files changed, 4 insertions(+), 27 deletions(-)

New commits:
commit 2f17ce9ac89c1ad380bde39036000a1979f567bb
Author:     Xisco Fauli <xiscofa...@libreoffice.org>
AuthorDate: Thu Aug 3 18:55:50 2023 +0200
Commit:     Xisco Fauli <xiscofa...@libreoffice.org>
CommitDate: Thu Aug 3 22:48:03 2023 +0200

    Revert "fdo#50114 ingore flowRoot element during svg import"
    
    This commit reverts 5bd241b99b76ae7f4b3c1d4f2bcbaf7c487bb339
    which is no longer needed after
    13a41e7a12598c7896d6dc8d34aba6af5b80b83c
    "tdf#150124: do nothing when parent is of unkown type"
    
    and might cause unexpected results as seen with
    https://bugs.documentfoundation.org/attachment.cgi?id=124782
    from https://bugs.documentfoundation.org/show_bug.cgi?id=99628
    
    Change-Id: I8bb700f5c5553700f91b937330bc3730e8ea84c5
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155320
    Tested-by: Jenkins
    Reviewed-by: Xisco Fauli <xiscofa...@libreoffice.org>

diff --git a/svgio/inc/svgdocumenthandler.hxx b/svgio/inc/svgdocumenthandler.hxx
index a13284340a38..8511a0adfbcc 100644
--- a/svgio/inc/svgdocumenthandler.hxx
+++ b/svgio/inc/svgdocumenthandler.hxx
@@ -40,8 +40,6 @@ namespace svgio::svgreader
             // text collector string stack for css styles
             std::vector< OUString >    maCssContents;
 
-            bool                            bSkip;
-
         public:
             SvgDocHdl(const OUString& rAbsolutePath);
             virtual ~SvgDocHdl() override;
diff --git a/svgio/inc/svgtoken.hxx b/svgio/inc/svgtoken.hxx
index 175297fa67e5..6c1a17692f22 100644
--- a/svgio/inc/svgtoken.hxx
+++ b/svgio/inc/svgtoken.hxx
@@ -188,9 +188,7 @@ namespace svgio::svgreader
 
             // text tokens
             Text,
-            BaselineShift,
-
-            FlowRoot
+            BaselineShift
         };
 
         SVGToken StrToSVGToken(const OUString& rStr, bool bCaseIndependent);
diff --git a/svgio/source/svgreader/svgdocumenthandler.cxx 
b/svgio/source/svgreader/svgdocumenthandler.cxx
index 4eafc9e9639a..6bb27cd2a52d 100644
--- a/svgio/source/svgreader/svgdocumenthandler.cxx
+++ b/svgio/source/svgreader/svgdocumenthandler.cxx
@@ -230,8 +230,7 @@ namespace
 
         SvgDocHdl::SvgDocHdl(const OUString& aAbsolutePath)
         :   maDocument(aAbsolutePath),
-            mpTarget(nullptr),
-            bSkip(false)
+            mpTarget(nullptr)
         {
         }
 
@@ -266,8 +265,6 @@ namespace
 
         void SvgDocHdl::startElement( const OUString& aName, const 
uno::Reference< xml::sax::XAttributeList >& xAttribs )
         {
-            if (bSkip)
-                return;
             if(aName.isEmpty())
                 return;
 
@@ -533,13 +530,6 @@ namespace
                     break;
                 }
 
-                // ignore FlowRoot and child nodes
-                case SVGToken::FlowRoot:
-                {
-                    bSkip = true;
-                    break;
-                }
-
                 default:
                 {
                     mpTarget = new SvgNode(SVGToken::Unknown, maDocument, 
mpTarget);
@@ -558,13 +548,6 @@ namespace
             SvgStyleNode* pCssStyle(SVGToken::Style == aSVGToken ? 
static_cast< SvgStyleNode* >(mpTarget) : nullptr);
             SvgTitleDescNode* pSvgTitleDescNode(SVGToken::Title == aSVGToken 
|| SVGToken::Desc == aSVGToken ? static_cast< SvgTitleDescNode* >(mpTarget) : 
nullptr);
 
-            // if we are in skipping mode and we reach the flowRoot end tag: 
stop skipping mode
-            if(bSkip && aSVGToken == SVGToken::FlowRoot)
-                bSkip = false;
-            // we are in skipping mode: do nothing until we found the flowRoot 
end tag
-            else if(bSkip)
-                return;
-
             switch (aSVGToken)
             {
                 /// valid tokens for which a new one was created
diff --git a/svgio/source/svgreader/svgtoken.cxx 
b/svgio/source/svgreader/svgtoken.cxx
index 24e24a5a31f7..961c4ec3b5a4 100644
--- a/svgio/source/svgreader/svgtoken.cxx
+++ b/svgio/source/svgreader/svgtoken.cxx
@@ -177,8 +177,7 @@ constexpr auto aSVGTokenMapperList = 
frozen::make_unordered_map<std::u16string_v
     { u"stroke-width", SVGToken::StrokeWidth },
 
     { u"text", SVGToken::Text },
-    { u"baseline-shift", SVGToken::BaselineShift },
-    { u"flowRoot", SVGToken::FlowRoot }
+    { u"baseline-shift", SVGToken::BaselineShift }
 });
 
 // The same elements as the map above but lowercase. CSS is case insensitive
@@ -335,8 +334,7 @@ constexpr auto  aSVGLowerCaseTokenMapperList = 
frozen::make_unordered_map<std::u
     { u"stroke-width", SVGToken::StrokeWidth },
 
     { u"text", SVGToken::Text },
-    { u"baseline-shift", SVGToken::BaselineShift },
-    { u"flowroot", SVGToken::FlowRoot }
+    { u"baseline-shift", SVGToken::BaselineShift }
 });
 
 static_assert(sizeof(aSVGTokenMapperList) == 
sizeof(aSVGLowerCaseTokenMapperList),

Reply via email to