You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openoffice.apache.org by al...@apache.org on 2014/10/10 14:50:29 UTC
svn commit: r1630814 -
/openoffice/trunk/main/svgio/source/svgreader/svgdocumenthandler.cxx
Author: alg
Date: Fri Oct 10 12:50:29 2014
New Revision: 1630814
URL: http://svn.apache.org/r1630814
Log:
i125326 accept CssStyles with missing type attribute
Modified:
openoffice/trunk/main/svgio/source/svgreader/svgdocumenthandler.cxx
Modified: openoffice/trunk/main/svgio/source/svgreader/svgdocumenthandler.cxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/svgio/source/svgreader/svgdocumenthandler.cxx?rev=1630814&r1=1630813&r2=1630814&view=diff
==============================================================================
--- openoffice/trunk/main/svgio/source/svgreader/svgdocumenthandler.cxx (original)
+++ openoffice/trunk/main/svgio/source/svgreader/svgdocumenthandler.cxx Fri Oct 10 12:50:29 2014
@@ -330,10 +330,26 @@ namespace svgio
{
SvgStyleNode* pNew = new SvgStyleNode(maDocument, mpTarget);
mpTarget = pNew;
- mpTarget->parseAttributes(xAttribs);
+ const sal_uInt32 nAttributes(xAttribs->getLength());
+
+ if(0 == nAttributes)
+ {
+ // #125326# 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
+ {
+ // #125326# 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(rtl::OUString());
}
break;