Commit 0bd10c28 authored by Alexey Golubev's avatar Alexey Golubev

Merge branch 'hotfix/v4.2.7'

parents 95e32f00 765ca861
...@@ -231,9 +231,9 @@ namespace NExtractTools ...@@ -231,9 +231,9 @@ namespace NExtractTools
} }
else return AVS_FILEUTILS_ERROR_CONVERT; } else return AVS_FILEUTILS_ERROR_CONVERT; }
return xlsx_dir2xlst_bin(sTempUnpackedXLSX, sTo, params); return xlsx_dir2xlst_bin(sTempUnpackedXLSX, sTo, params, true);
} }
int xlsx_dir2xlst_bin (const std::wstring &sXlsxDir, const std::wstring &sTo, InputParams& params) int xlsx_dir2xlst_bin (const std::wstring &sXlsxDir, const std::wstring &sTo, InputParams& params, bool bXmlOptions)
{ {
// Save to file (from temp dir) // Save to file (from temp dir)
BinXlsxRW::CXlsxSerializer m_oCXlsxSerializer; BinXlsxRW::CXlsxSerializer m_oCXlsxSerializer;
...@@ -242,7 +242,8 @@ namespace NExtractTools ...@@ -242,7 +242,8 @@ namespace NExtractTools
m_oCXlsxSerializer.setFontDir(sFontPath); m_oCXlsxSerializer.setFontDir(sFontPath);
CString sTo1 = std_string2string(sTo); CString sTo1 = std_string2string(sTo);
return m_oCXlsxSerializer.saveToFile (sTo1, std_string2string(sXlsxDir), std_string2string(params.getXmlOptions())) ? 0 : AVS_FILEUTILS_ERROR_CONVERT; CString sXmlOptions = bXmlOptions ? std_string2string(params.getXmlOptions()) : L"";
return m_oCXlsxSerializer.saveToFile (sTo1, std_string2string(sXlsxDir), sXmlOptions) ? 0 : AVS_FILEUTILS_ERROR_CONVERT;
} }
// xslx -> xslt // xslx -> xslt
...@@ -2052,11 +2053,11 @@ namespace NExtractTools ...@@ -2052,11 +2053,11 @@ namespace NExtractTools
} }
else if(AVS_OFFICESTUDIO_FILE_OTHER_JSON == nFormatTo) else if(AVS_OFFICESTUDIO_FILE_OTHER_JSON == nFormatTo)
{ {
nRes = xlsx_dir2xlst_bin(sFrom, sTo, params); nRes = xlsx_dir2xlst_bin(sFrom, sTo, params, true);
} }
else if(AVS_OFFICESTUDIO_FILE_CANVAS_SPREADSHEET == nFormatTo) else if(AVS_OFFICESTUDIO_FILE_CANVAS_SPREADSHEET == nFormatTo)
{ {
nRes = xlsx_dir2xlst_bin(sFrom, sTo, params); nRes = xlsx_dir2xlst_bin(sFrom, sTo, params, true);
} }
else else
{ {
...@@ -2064,9 +2065,9 @@ namespace NExtractTools ...@@ -2064,9 +2065,9 @@ namespace NExtractTools
FileSystem::Directory::CreateDirectory(sXlstDir); FileSystem::Directory::CreateDirectory(sXlstDir);
std::wstring sTFile = sXlstDir + FILE_SEPARATOR_STR + _T("Editor.bin"); std::wstring sTFile = sXlstDir + FILE_SEPARATOR_STR + _T("Editor.bin");
if(AVS_OFFICESTUDIO_FILE_SPREADSHEET_CSV == nFormatTo) if(AVS_OFFICESTUDIO_FILE_SPREADSHEET_CSV == nFormatTo)
nRes = xlsx_dir2xlst_bin(sFrom, sTFile, params); nRes = xlsx_dir2xlst_bin(sFrom, sTFile, params, false);
else else
nRes = xlsx_dir2xlst_bin(sFrom, sTFile, params); nRes = xlsx_dir2xlst_bin(sFrom, sTFile, params, true);
if(SUCCEEDED_X2T(nRes)) if(SUCCEEDED_X2T(nRes))
{ {
nRes = fromXlstBin(sTFile, sTo, nFormatTo, sTemp, sThemeDir, bFromChanges, bPaid, params); nRes = fromXlstBin(sTFile, sTo, nFormatTo, sTemp, sThemeDir, bFromChanges, bPaid, params);
......
...@@ -56,7 +56,7 @@ namespace NExtractTools ...@@ -56,7 +56,7 @@ namespace NExtractTools
int doct2docx (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring &sTemp, bool bFromChanges, const std::wstring &sThemeDir, InputParams& params); int doct2docx (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring &sTemp, bool bFromChanges, const std::wstring &sThemeDir, InputParams& params);
int xlsx2xlst_bin (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring &sTemp, InputParams& params); int xlsx2xlst_bin (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring &sTemp, InputParams& params);
int xlsx_dir2xlst_bin (const std::wstring &sFrom, const std::wstring &sTo, InputParams& params); int xlsx_dir2xlst_bin (const std::wstring &sFrom, const std::wstring &sTo, InputParams& params, bool bXmlOptions);
int xlsx2xlst (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring &sTemp, InputParams& params); int xlsx2xlst (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring &sTemp, InputParams& params);
int xlst_bin2xlsx (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring &sTemp, bool bFromChanges, const std::wstring &sThemeDir, InputParams& params); int xlst_bin2xlsx (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring &sTemp, bool bFromChanges, const std::wstring &sThemeDir, InputParams& params);
int xlst_bin2xlsx_dir (const std::wstring &sFrom, const std::wstring &sToResult, const std::wstring &sTo, bool bFromChanges, const std::wstring &sThemeDir, InputParams& params); int xlst_bin2xlsx_dir (const std::wstring &sFrom, const std::wstring &sToResult, const std::wstring &sTo, bool bFromChanges, const std::wstring &sThemeDir, InputParams& params);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment