[FIX]Some 'doc' type could not be read.
This commit is contained in:
parent
8fb9eb38c4
commit
74eaa6fdb5
|
@ -42,7 +42,7 @@ void FileReader::getTextContent(QString path, QString &textContent)
|
||||||
if(strsfx.endsWith( "txt"))
|
if(strsfx.endsWith( "txt"))
|
||||||
FileUtils::getTxtContent(path,textContent);
|
FileUtils::getTxtContent(path,textContent);
|
||||||
}
|
}
|
||||||
else if(type.inherits("application/msword"))
|
else if(type.inherits("application/msword") || type.name() == "application/x-ole-storage")
|
||||||
{
|
{
|
||||||
if (strsfx.endsWith("doc"))
|
if (strsfx.endsWith("doc"))
|
||||||
{
|
{
|
||||||
|
|
|
@ -5067,6 +5067,8 @@ bool KBinaryParser::read8DocText(FILE *pFile, const ppsInfoType *pPPS,
|
||||||
//need more format document
|
//need more format document
|
||||||
ptaucBytes = (UCHAR*)xfree((void*)ptaucBytes);
|
ptaucBytes = (UCHAR*)xfree((void*)ptaucBytes);
|
||||||
qWarning()<<"Parser error:"<<m_strFileName;
|
qWarning()<<"Parser error:"<<m_strFileName;
|
||||||
|
// content.append(QString::fromStdString((char*)ptaucBytes).replace("\r",""));
|
||||||
|
// ptaucBytes = (UCHAR*)xfree((void*)ptaucBytes);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue