mirror of
https://github.com/ONLYOFFICE/core.git
synced 2026-02-10 18:05:41 +08:00
for bug #65516
This commit is contained in:
@ -35,9 +35,12 @@
|
||||
#include "../DesktopEditor/xml/include/xmlutils.h"
|
||||
#include "../OOXML/Base/Base.h"
|
||||
#include "../OfficeUtils/src/OfficeUtils.h"
|
||||
// #if defined FILE_FORMAT_CHECKER_WITH_MACRO
|
||||
// #include "../MsBinaryFile/PptFile/Main/PPTFormatLib.h"
|
||||
// #endif
|
||||
|
||||
//#define FILE_FORMAT_CHECKER_WITH_MACRO
|
||||
|
||||
#if defined FILE_FORMAT_CHECKER_WITH_MACRO
|
||||
#include "../MsBinaryFile/PptFile/Main/PPTFormatLib.h"
|
||||
#endif
|
||||
|
||||
#include "3dParty/pole/pole.h"
|
||||
#include <algorithm>
|
||||
|
||||
@ -630,8 +630,12 @@ namespace NExtractTools
|
||||
}
|
||||
else
|
||||
nRes = AVS_FILEUTILS_ERROR_CONVERT_PARAMS;
|
||||
|
||||
if (SUCCEEDED_X2T(nRes))
|
||||
{
|
||||
std::wstring sFileToCurrent = *params.m_sFileTo;
|
||||
params.changeFormatFrom(*params.m_nFormatFrom, params.m_bMacro);
|
||||
|
||||
nRes = fromDocxDir(sDocxDir, sTo, nFormatTo, params, convertParams);
|
||||
}
|
||||
}
|
||||
@ -964,8 +968,12 @@ namespace NExtractTools
|
||||
}
|
||||
else
|
||||
nRes = AVS_FILEUTILS_ERROR_CONVERT_PARAMS;
|
||||
|
||||
if (SUCCEEDED_X2T(nRes))
|
||||
{
|
||||
std::wstring sFileToCurrent = *params.m_sFileTo;
|
||||
params.changeFormatFrom(*params.m_nFormatFrom, params.m_bMacro);
|
||||
|
||||
nRes = fromXlsxDir(sXlsxDir, sTo, nFormatTo, params, convertParams);
|
||||
}
|
||||
}
|
||||
@ -1235,8 +1243,12 @@ namespace NExtractTools
|
||||
}
|
||||
else
|
||||
nRes = AVS_FILEUTILS_ERROR_CONVERT_PARAMS;
|
||||
|
||||
if (SUCCEEDED_X2T(nRes))
|
||||
{
|
||||
std::wstring sFileToCurrent = *params.m_sFileTo;
|
||||
params.changeFormatFrom(*params.m_nFormatFrom, params.m_bMacro);
|
||||
|
||||
nRes = fromPptxDir(sPptxDir, sTo, nFormatTo, params, convertParams);
|
||||
}
|
||||
return nRes;
|
||||
@ -2007,7 +2019,6 @@ namespace NExtractTools
|
||||
#ifndef BUILD_X2T_AS_LIBRARY_DYLIB
|
||||
NSDoctRenderer::CDocBuilder::Dispose();
|
||||
#endif
|
||||
|
||||
if (SUCCEEDED_X2T(result) && oInputParams.m_bOutputConvertCorrupted)
|
||||
{
|
||||
return AVS_FILEUTILS_ERROR_CONVERT_CORRUPTED;
|
||||
|
||||
@ -953,8 +953,10 @@ namespace NExtractTools
|
||||
{
|
||||
nFormatFrom = FileFormatChecker.nFileType;
|
||||
*m_nFormatFrom = nFormatFrom;
|
||||
// changeFormatFrom(nFormatFrom, FileFormatChecker.bMacroEnabled); // - неверно - чекер не определяет ТОЧНО наличие макросов.
|
||||
// Это только при открытии файла
|
||||
|
||||
// changeFormatFrom(nFormatFrom, FileFormatChecker.bMacroEnabled);
|
||||
// - неверно - чекер не определяет ТОЧНО наличие макросов.
|
||||
// только при открытии файла
|
||||
// После открытия нужно проверять параметр m_bMacro
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user