ooxml - add Word XML Document - fix bug #47039

read encrypted xml documents
This commit is contained in:
ElenaSubbotina
2020-11-09 11:41:12 +03:00
parent ececaee42b
commit 2be7dcb569
9 changed files with 232 additions and 6 deletions

View File

@ -787,6 +787,7 @@ bool COfficeFileFormatChecker::isOOXFlatFormatFile(unsigned char* pBuffer,int dw
const char *docxFormatLine = "xmlns:w=\"http://schemas.microsoft.com/office/word/2003/wordml\"";
const char *xlsxFormatLine = "xmlns:ss=\"urn:schemas-microsoft-com:office:spreadsheet\"";
const char *packageFormatLine = "xmlns:pkg=\"http://schemas.microsoft.com/office/2006/xmlPackage\"";
if (std::string::npos != xml_string.find(docxFormatLine))
{
@ -796,7 +797,10 @@ bool COfficeFileFormatChecker::isOOXFlatFormatFile(unsigned char* pBuffer,int dw
{
nFileType = AVS_OFFICESTUDIO_FILE_SPREADSHEET_XLSX_FLAT;
}
else if (std::string::npos != xml_string.find(packageFormatLine))
{
nFileType = AVS_OFFICESTUDIO_FILE_DOCUMENT_PACKAGE;
}
if (nFileType != AVS_OFFICESTUDIO_FILE_UNKNOWN) return true;
return false;