X2t version up

This commit is contained in:
ElenaSubbotina
2016-07-13 11:29:32 +03:00
parent 46130bcad5
commit 511a9d020f
2 changed files with 27 additions and 4 deletions

View File

@ -67,18 +67,41 @@ typedef struct
namespace DocFileFormat
{
Global::BlipType GetFormatPict(unsigned char* data, int size)
struct __BITMAPINFOHEADER
{
DWORD biSize;
LONG biWidth;
LONG biHeight;
WORD biPlanes;
WORD biBitCount;
DWORD biCompression;
DWORD biSizeImage;
LONG biXPelsPerMeter;
LONG biYPelsPerMeter;
DWORD biClrUsed;
DWORD biClrImportant;
};
struct __BITMAPCOREHEADER
{
DWORD bcSize; /* used to get to color table */
WORD bcWidth;
WORD bcHeight;
WORD bcPlanes;
WORD bcBitCount;
};
Global::BlipType GetFormatPict(unsigned char* data, int size)
{
Global::BlipType btWin32 = Global::msoblipDIB;
int offset = 0, biSizeImage = 0;
BITMAPINFOHEADER * header = (BITMAPINFOHEADER*)data;
__BITMAPINFOHEADER * header = (__BITMAPINFOHEADER*)data;
if (!header) return btWin32;
if (header->biWidth > 100000 || header->biHeight > 100000 || header->biSize != 40)
{
BITMAPCOREHEADER * header_core = (BITMAPCOREHEADER *)data;
__BITMAPCOREHEADER * header_core = (__BITMAPCOREHEADER *)data;
if (header_core->bcSize != 12)
{

View File

@ -7,7 +7,7 @@
QT -= core
QT -= gui
VERSION = 2.0.2.378
VERSION = 2.0.2.380
DEFINES += INTVER=$$VERSION
mac {