summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--svgio/source/svgreader/svgdocumenthandler.cxx18
1 files changed, 17 insertions, 1 deletions
diff --git a/svgio/source/svgreader/svgdocumenthandler.cxx b/svgio/source/svgreader/svgdocumenthandler.cxx
index d052e46334e3..1cb1a54af248 100644
--- a/svgio/source/svgreader/svgdocumenthandler.cxx
+++ b/svgio/source/svgreader/svgdocumenthandler.cxx
@@ -323,10 +323,26 @@ namespace svgio
{
SvgStyleNode* pNew = new SvgStyleNode(maDocument, mpTarget);
mpTarget = pNew;
- mpTarget->parseAttributes(xAttribs);
+ 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);
+ }
if(pNew->isTextCss())
{
+ // if it is a Css style, allow reading text between the start and end tag (see
+ // SvgDocHdl::characters for details)
maCssContents.push_back(OUString());
}
break;