This commit is contained in:
Elena.Subbotina
2023-12-15 12:05:20 +03:00
parent 9908c9e507
commit 8e38736cf5
3 changed files with 22 additions and 6 deletions

View File

@ -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>

View File

@ -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;

View File

@ -953,8 +953,10 @@ namespace NExtractTools
{
nFormatFrom = FileFormatChecker.nFileType;
*m_nFormatFrom = nFormatFrom;
// changeFormatFrom(nFormatFrom, FileFormatChecker.bMacroEnabled); // - неверно - чекер не определяет ТОЧНО наличие макросов.
// Это только при открытии файла
// changeFormatFrom(nFormatFrom, FileFormatChecker.bMacroEnabled);
// - неверно - чекер не определяет ТОЧНО наличие макросов.
// только при открытии файла
// После открытия нужно проверять параметр m_bMacro
}
}