OoxmlFormat - convert border in vml shape

This commit is contained in:
ElenaSubbotina
2018-04-06 14:19:58 +03:00
parent b04f44ee2c
commit 4b8bc2c8e7
16 changed files with 189 additions and 87 deletions

View File

@ -144,20 +144,25 @@ bool COfficeFileFormatChecker::isDocFormatFile (POLE::Storage * storage)
POLE::Stream stream(storage, L"WordDocument");
unsigned char buffer[10];
if (stream.read(buffer, 10) > 0)
unsigned char buffer[64];
if (stream.read(buffer, 64) > 0)
{
//ms office 2007 encrypted contains stream WordDocument !!
std::list<std::wstring> entries = storage->entries(L"DataSpaces");
if (entries.size() > 0)
return false;
if ((buffer[0] == 0xEC && buffer[1] == 0xA5) || // word 1997-2003
(buffer[0] == 0xDC && buffer[1] == 0xA5)) // word 1995
if ((buffer[0] == 0xEC && buffer[1] == 0xA5) || // word 1997-2003
(buffer[0] == 0xDC && buffer[1] == 0xA5) || // word 1995
(buffer[0] == 0xDB && buffer[1] == 0xA5)) // word 2.0
{
nFileType = AVS_OFFICESTUDIO_FILE_DOCUMENT_DOC;
}
else if ( isHtmlFormatFile(buffer, 64, false) )
{
nFileType = AVS_OFFICESTUDIO_FILE_DOCUMENT_HTML_IN_CONTAINER;
return true;
}
if (storage->isDirectory(L"Macros"))
{
bMacroEnabled = true;
@ -278,7 +283,7 @@ bool COfficeFileFormatChecker::isOfficeFile(const std::wstring & fileName)
nFileType = AVS_OFFICESTUDIO_FILE_OTHER_MS_OFFCRYPTO;
return true;
}
}
}
COfficeUtils OfficeUtils(NULL);
if (OfficeUtils.IsArchive(fileName) == S_OK)