Merge pull request #164 from iaom/0308-dev

[FIX]Some 'doc' type could not be read.
This commit is contained in:
Mouse Zhang 2021-03-09 10:17:10 +08:00 committed by GitHub
commit 110ef5bddc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 1 deletions

View File

@ -42,7 +42,7 @@ void FileReader::getTextContent(QString path, QString &textContent)
if(strsfx.endsWith( "txt"))
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"))
{

View File

@ -5067,6 +5067,8 @@ bool KBinaryParser::read8DocText(FILE *pFile, const ppsInfoType *pPPS,
//need more format document
ptaucBytes = (UCHAR*)xfree((void*)ptaucBytes);
qWarning()<<"Parser error:"<<m_strFileName;
// content.append(QString::fromStdString((char*)ptaucBytes).replace("\r",""));
// ptaucBytes = (UCHAR*)xfree((void*)ptaucBytes);
}
}
}