diff options
-rw-r--r-- | svgio/inc/svgdocumenthandler.hxx | 2 | ||||
-rw-r--r-- | svgio/inc/svgtoken.hxx | 4 | ||||
-rw-r--r-- | svgio/source/svgreader/svgdocumenthandler.cxx | 19 | ||||
-rw-r--r-- | svgio/source/svgreader/svgtoken.cxx | 6 |
4 files changed, 4 insertions, 27 deletions
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), |