mirror of
https://github.com/ONLYOFFICE/core.git
synced 2026-07-16 00:59:02 +08:00
git-svn-id: svn://fileserver/activex/AVS/Sources/TeamlabOffice/trunk/ServerComponents@65574 954022d7-b5bf-4e40-9824-e11837661b57
This commit is contained in:
committed by
Alexander Trofimov
parent
2b60a912fc
commit
a2304e4b50
@ -267,26 +267,33 @@ bool COfficeFileFormatChecker::isOOXFormatFile(const std::wstring & fileName)
|
||||
|
||||
std::string strContentTypes((char*)pBuffer, nBufferSize);
|
||||
|
||||
std::string::size_type res1 = std::string::npos;
|
||||
std::string::size_type res = 0;
|
||||
if ( (res = strContentTypes.find(docxFormatLine))>0 || (res = strContentTypes.find(dotxFormatLine))>0 ||
|
||||
(res = strContentTypes.find(docmFormatLine))>0 || (res = strContentTypes.find(dotmFormatLine))>0)
|
||||
if ((std::string::npos != strContentTypes.find(docxFormatLine)) ||
|
||||
(std::string::npos != strContentTypes.find(dotxFormatLine)) ||
|
||||
(std::string::npos != strContentTypes.find(docmFormatLine)) ||
|
||||
(std::string::npos != strContentTypes.find(dotmFormatLine)))
|
||||
{
|
||||
nFileType = AVS_OFFICESTUDIO_FILE_DOCUMENT_DOCX;
|
||||
}
|
||||
|
||||
else if ((res = strContentTypes.find(xlsxFormatLine))>0 || (res = strContentTypes.find(xltxFormatLine))>0 ||
|
||||
(res = strContentTypes.find(xlsmFormatLine))>0 || (res = strContentTypes.find(xltmFormatLine))>0)
|
||||
else if ((std::string::npos != strContentTypes.find(xlsxFormatLine)) ||
|
||||
(std::string::npos != strContentTypes.find(xltxFormatLine)) ||
|
||||
(std::string::npos != strContentTypes.find(xlsmFormatLine)) ||
|
||||
(std::string::npos != strContentTypes.find(xltmFormatLine)))
|
||||
{
|
||||
nFileType = AVS_OFFICESTUDIO_FILE_SPREADSHEET_XLSX;
|
||||
}
|
||||
|
||||
else if ((res = strContentTypes.find(pptxFormatLine))>0 || /*(res = strContentTypes.find(ppsxFormatLine))>0 ||*/
|
||||
(res = strContentTypes.find(potxFormatLine))>0 || (res = strContentTypes.find(pptmFormatLine))>0 ||
|
||||
(res = strContentTypes.find(ppsmFormatLine))>0 || (res = strContentTypes.find(potmFormatLine))>0 )
|
||||
else if ((std::string::npos != strContentTypes.find(pptxFormatLine)) ||
|
||||
(std::string::npos != strContentTypes.find(potxFormatLine)) ||
|
||||
(std::string::npos != strContentTypes.find(pptmFormatLine)) ||
|
||||
(std::string::npos != strContentTypes.find(ppsmFormatLine)) ||
|
||||
(std::string::npos != strContentTypes.find(potmFormatLine)))
|
||||
{
|
||||
nFileType = AVS_OFFICESTUDIO_FILE_PRESENTATION_PPTX;
|
||||
}
|
||||
else if ((res = strContentTypes.find(ppsxFormatLine)) >0)
|
||||
else if ((std::string::npos != strContentTypes.find(ppsxFormatLine)))
|
||||
{
|
||||
nFileType = AVS_OFFICESTUDIO_FILE_PRESENTATION_PPSX;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user