mirror of
https://github.com/ONLYOFFICE/core.git
synced 2026-02-10 18:05:41 +08:00
.
This commit is contained in:
@ -95,9 +95,6 @@ namespace OOX
|
||||
|
||||
if (!CSystemUtility::IsFileExist(newFilePath / newFilename))
|
||||
{
|
||||
std::wstring ext = filename.GetExtention();
|
||||
if (false == ext.empty()) content.AddDefault(ext.substr(1));
|
||||
|
||||
if (false == m_Data.empty())
|
||||
{
|
||||
NSFile::CFileBinary file;
|
||||
@ -112,11 +109,8 @@ namespace OOX
|
||||
copy_to(newFilePath);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
std::wstring ext = filename.GetExtention();
|
||||
if (false == ext.empty()) content.AddDefault(ext.substr(1));
|
||||
}
|
||||
std::wstring ext = filename.GetExtention();
|
||||
if (false == ext.empty()) content.AddDefault(ext.substr(1));
|
||||
}
|
||||
void Media::set_filename(const std::wstring & file_path, bool bExternal)
|
||||
{
|
||||
|
||||
@ -39,6 +39,8 @@
|
||||
#include "../DocxFormat/Media/OleObject.h"
|
||||
#include "../DocxFormat/Media/Image.h"
|
||||
|
||||
#include "../../Common/OfficeFileFormatChecker.h"
|
||||
|
||||
namespace OOX
|
||||
{
|
||||
namespace Draw
|
||||
@ -271,6 +273,12 @@ namespace OOX
|
||||
OleObject* pOle = new OleObject(NULL, false, false);
|
||||
pOle->set_filename(pReader->m_pRels->m_pManager->GetDstEmbed() + FILE_SEPARATOR_STR + ole_filename, false);
|
||||
pOle->set_filename_cache(pReader->m_pRels->m_pManager->GetDstMedia() + FILE_SEPARATOR_STR + media_filename);
|
||||
|
||||
COfficeFileFormatChecker checker;
|
||||
if (checker.isOOXFormatFile(pOle->filename().GetPath()))
|
||||
{
|
||||
pOle->set_MsPackage(true);
|
||||
}
|
||||
|
||||
smart_ptr<OOX::File> oFile(pOle);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user