Kaydet (Commit) aa4b8a81 authored tarafından Tor Lillqvist's avatar Tor Lillqvist

Be more careful in recognizing MathML (bnc#774921)

Change-Id: I82c36a3ff49f74dc674df46dcf35f8c1a991c9e2
üst 318590b2
......@@ -312,10 +312,20 @@ SmFilterDetect::~SmFilterDetect()
{
if (0 == strncmp( "<?xml",aBuffer,nSize))
{
static const sal_Char sFltrNm_2[] = MATHML_XML;
static const sal_Char sTypeNm_2[] = "math_MathML_XML_Math";
aFilterName.AssignAscii( sFltrNm_2 );
aTypeName.AssignAscii( sTypeNm_2 );
// 200 should be enough for the XML
// version, encoding and !DOCTYPE
// stuff I hope?
sal_Char aBuffer2[200];
nBytesRead = pStrm->Read( aBuffer2, sizeof(aBuffer2) - 1);
aBuffer2[nBytesRead] = 0;
if (strstr( aBuffer2, "<math>" ) != NULL ||
strstr( aBuffer2, "<math " ) != NULL)
{
static const sal_Char sFltrNm_2[] = MATHML_XML;
static const sal_Char sTypeNm_2[] = "math_MathML_XML_Math";
aFilterName.AssignAscii( sFltrNm_2 );
aTypeName.AssignAscii( sTypeNm_2 );
}
}
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment