mirror of
https://github.com/ONLYOFFICE/core.git
synced 2026-07-20 01:04:34 +08:00
package embedding in binary ms
This commit is contained in:
@ -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);
|
||||
|
||||
Reference in New Issue
Block a user