diff options
Diffstat (limited to 'svgio/source')
-rw-r--r-- | svgio/source/svgreader/svgdocumenthandler.cxx | 17 | ||||
-rw-r--r-- | svgio/source/svgreader/svgstylenode.cxx | 6 |
2 files changed, 6 insertions, 17 deletions
diff --git a/svgio/source/svgreader/svgdocumenthandler.cxx b/svgio/source/svgreader/svgdocumenthandler.cxx index 43151253aacc..e26312d43163 100644 --- a/svgio/source/svgreader/svgdocumenthandler.cxx +++ b/svgio/source/svgreader/svgdocumenthandler.cxx @@ -302,21 +302,10 @@ namespace { SvgStyleNode* pNew = new SvgStyleNode(maDocument, mpTarget); mpTarget = pNew; - const sal_uInt32 nAttributes(xAttribs->getLength()); - if(0 == nAttributes) - { - // #i125326# no attributes, thus also no type="text/css". This is allowed to be missing, - // thus do mark this style as CssStyle. This is required to read the contained - // text (which defines the css style) - pNew->setTextCss(true); - } - else - { - // #i125326# there are attributes, read them. This will set isTextCss to true if - // a type="text/css" is contained as exact match, else not - mpTarget->parseAttributes(xAttribs); - } + // #i125326# there are attributes, read them. This will set isTextCss to false if + // type attibute is different to "text/css" + mpTarget->parseAttributes(xAttribs); if(pNew->isTextCss()) { diff --git a/svgio/source/svgreader/svgstylenode.cxx b/svgio/source/svgreader/svgstylenode.cxx index ef25e6a83b47..b11f7129e0b3 100644 --- a/svgio/source/svgreader/svgstylenode.cxx +++ b/svgio/source/svgreader/svgstylenode.cxx @@ -28,7 +28,7 @@ namespace svgio::svgreader SvgDocument& rDocument, SvgNode* pParent) : SvgNode(SVGToken::Style, rDocument, pParent), - mbTextCss(false) + mbTextCss(true) { } @@ -57,9 +57,9 @@ namespace svgio::svgreader { if(!aContent.isEmpty()) { - if(o3tl::equalsIgnoreAsciiCase(o3tl::trim(aContent), u"text/css")) + if(!o3tl::equalsIgnoreAsciiCase(o3tl::trim(aContent), u"text/css")) { - setTextCss(true); + setTextCss(false); } } break; |