package embedding in binary ms

This commit is contained in:
Elena.Subbotina
2023-01-31 11:31:26 +03:00
parent 4e0e0265d0
commit f601d95d27
11 changed files with 123 additions and 104 deletions

View File

@ -49,18 +49,18 @@ namespace DocFileFormat
if ( ole != NULL )
{
if (ole->isEmbedded)
if (ole->isEmbedded || ole->isPackage)
{
if (ole->isEquation) ole->ClipboardFormat = L"Equation";
else ole->ClipboardFormat = L"MSWordDocx";
if (ole->isEquation) ole->ClipboardFormat = L"Equation";
else if (ole->ClipboardFormat.empty()) ole->ClipboardFormat = L"MSWordDocx";
ole->Program = L"Word.Document";
ole->Program = L"Word.Document";
}
m_pXmlWriter->WriteNodeBegin( L"o:OLEObject", TRUE );
int relID = -1;
if ( ole->bLinked )
if ( ole->isLinked)
{
relID = m_context->_docx->RegisterExternalOLEObject(_caller, ole->ClipboardFormat, ole->Link);
@ -69,7 +69,7 @@ namespace DocFileFormat
}
else
{
if (ole->isEmbedded)
if (ole->isEmbedded || ole->isPackage)
relID = m_context->_docx->RegisterPackage(_caller, ole->ClipboardFormat);
else
relID = m_context->_docx->RegisterOLEObject(_caller, ole->ClipboardFormat);
@ -162,9 +162,9 @@ namespace DocFileFormat
object_descr.clsid = ole->ClipboardFormat;
object_descr.bNativeOnly = true;
}
if (ole->isEquation || ole->isEmbedded || ole->nWordVersion == 2)
if (ole->isEquation || ole->isEmbedded || ole->nWordVersion == 2 || ole->isPackage)
{
object_descr.data = ole->emeddedData;
object_descr.data = ole->embeddedData;
}
m_context->_docx->OleObjectsList.push_back(object_descr);