Commit 8a88039b authored by Elen.Subbotina's avatar Elen.Subbotina Committed by Alexander Trofimov

DocFormat - bug 31317

git-svn-id: svn://fileserver/activex/AVS/Sources/TeamlabOffice/trunk/ServerComponents@67355 954022d7-b5bf-4e40-9824-e11837661b57
parent 07ba4892
...@@ -305,6 +305,8 @@ typedef enum _BlipCompression ...@@ -305,6 +305,8 @@ typedef enum _BlipCompression
oMetaHeader.compression = m_fCompression; oMetaHeader.compression = m_fCompression;
oMetaHeader.filter = m_fFilter; oMetaHeader.filter = m_fFilter;
if (typeCode == 0xf01b)
{
WmfPlaceableFileHeader oWmfHeader = {}; WmfPlaceableFileHeader oWmfHeader = {};
oMetaHeader.ToWMFHeader(&oWmfHeader); oMetaHeader.ToWMFHeader(&oWmfHeader);
...@@ -313,6 +315,7 @@ typedef enum _BlipCompression ...@@ -313,6 +315,7 @@ typedef enum _BlipCompression
memcpy(pMetaHeader, (void*)(&oWmfHeader), lLenHeader); memcpy(pMetaHeader, (void*)(&oWmfHeader), lLenHeader);
oMetaFile.SetHeader(pMetaHeader, lLenHeader); oMetaFile.SetHeader(pMetaHeader, lLenHeader);
}
oMetaFile.SetData(m_pvBits, oMetaHeader.cbSave, oMetaHeader.cbSize, 0 == oMetaHeader.compression); oMetaFile.SetData(m_pvBits, oMetaHeader.cbSave, oMetaHeader.cbSize, 0 == oMetaHeader.compression);
......
...@@ -215,22 +215,13 @@ namespace DocFileFormat ...@@ -215,22 +215,13 @@ namespace DocFileFormat
//it's a meta image //it's a meta image
MetafilePictBlip* metaBlip = static_cast<MetafilePictBlip*>(oBlipEntry->Blip); MetafilePictBlip* metaBlip = static_cast<MetafilePictBlip*>(oBlipEntry->Blip);
if (metaBlip) if (metaBlip)
{ {//decompress inside MetafilePictBlip
////meta images can be compressed
//unsigned char* decompressed = NULL;
//int decompressedSize = 0;
//decompressedSize = metaBlip->Decompress(&decompressed);
//if (0 != decompressedSize && NULL != decompressed)
//{
unsigned char *newData = NULL; unsigned char *newData = NULL;
int newDataSize = metaBlip->oMetaFile.ToBuffer(newData); int newDataSize = metaBlip->oMetaFile.ToBuffer(newData);
m_ctx->_docx->ImagesList.push_back(ImageFileStructure(GetTargetExt(oBlipEntry->btWin32), std::vector<unsigned char>(newData, (newData + newDataSize)))); m_ctx->_docx->ImagesList.push_back(ImageFileStructure(GetTargetExt(oBlipEntry->btWin32), std::vector<unsigned char>(newData, (newData + newDataSize))));
//RELEASEARRAYOBJECTS(decompressed);
RELEASEARRAYOBJECTS(newData); RELEASEARRAYOBJECTS(newData);
//}
} }
} }
break; break;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment