Files
core/Common/OfficeFileFormatChecker.h
Elen.Subbotina e5fc5b7f4e расширение X2t до форматов Rtf, Doc (linux)
FileChecker для входных файлов  (linux)

git-svn-id: svn://fileserver/activex/AVS/Sources/TeamlabOffice/trunk/ServerComponents@62308 954022d7-b5bf-4e40-9824-e11837661b57
2016-05-20 23:59:21 +03:00

50 lines
1.3 KiB
C++

#pragma once
#include <string>
#include "OfficeFileFormats.h"
namespace POLE
{
class Storage;
}
class COfficeFileFormatChecker
{
public:
int nFileType;
COfficeFileFormatChecker()
{
nFileType = AVS_OFFICESTUDIO_FILE_UNKNOWN;
}
COfficeFileFormatChecker(std::wstring sFileName)
{
nFileType = AVS_OFFICESTUDIO_FILE_UNKNOWN;
isOfficeFile(sFileName);
}
bool isOfficeFile(const std::wstring & fileName);
std::wstring GetFormatExtension(const std::wstring & fileName);
std::wstring GetExtensionByType(int type);
private:
bool isOOXFormatFile (const std::wstring & fileName);
bool isOpenOfficeFormatFile (const std::wstring & fileName);
bool isOnlyOfficeFormatFile (const std::wstring & fileName);
bool isDocFormatFile (POLE::Storage *storage);
bool isXlsFormatFile (POLE::Storage *storage);
bool isPptFormatFile (POLE::Storage *storage);
bool isRtfFormatFile (unsigned char* pBuffer,int dwBytes);
bool isHtmlFormatFile (unsigned char* pBuffer,int dwBytes);
bool isPdfFormatFile (unsigned char* pBuffer,int dwBytes);
bool isBinaryDoctFormatFile (unsigned char* pBuffer,int dwBytes);
bool isBinaryXlstFormatFile (unsigned char* pBuffer,int dwBytes);
bool isBinaryPpttFormatFile (unsigned char* pBuffer,int dwBytes);
};