add lcid for xls(sheet)

This commit is contained in:
Elena.Subbotina
2021-09-30 16:58:44 +03:00
parent 16238f5e80
commit 9bce904409
3 changed files with 12 additions and 5 deletions

View File

@ -33,6 +33,7 @@
#include "BOF.h"
#include <Binary/CFStream.h>
#include "../../../../../Common/MS-LCID.h"
namespace XLS
{
@ -106,6 +107,11 @@ void BOF::readFields(CFRecord& record)
{ //ts_2500_06_gruzi 05 06 вып.xls
record.getGlobalWorkbookInfo()->Version = 0x601;
record.getGlobalWorkbookInfo()->CodePage = 0;
if (record.getGlobalWorkbookInfo()->lcid_user > 0)
{
record.getGlobalWorkbookInfo()->CodePage = msLCID2DefCodePage(record.getGlobalWorkbookInfo()->lcid_user);
}
}
}
else

View File

@ -153,6 +153,11 @@ XlsConverter::XlsConverter(const std::wstring & xlsFileName, const std::wstring
{
xls_global_info = boost::shared_ptr<XLS::GlobalWorkbookInfo>(new XLS::GlobalWorkbookInfo(workbook_code_page, this));
xls_global_info->lcid_user = lcid_user;
xls_global_info->fontsDirectory = fontsPath;
xls_global_info->password = password;
xls_global_info->tempDirectory = tempPath;
XLS::GlobalWorkbookInfo::_sheet_info sheet_info;
xls_global_info->sheets_info.push_back(sheet_info);

View File

@ -3917,14 +3917,10 @@ namespace NExtractTools
{
if(AVS_OFFICESTUDIO_FILE_CANVAS_SPREADSHEET == nFormatTo || AVS_OFFICESTUDIO_FILE_OTHER_JSON == nFormatTo)
{
if(AVS_OFFICESTUDIO_FILE_SPREADSHEET_CSV == nFormatFrom)
nRes = csv2xlst_bin(sFrom, sTo, params);
else
nRes = xlsxflat2xlst_bin(sFrom, sTo, sTemp, params);
nRes = csv2xlst_bin(sFrom, sTo, params);
}
else
{
nRes = xlsxflat2xlst_bin(sFrom, sTo, sTemp, params);
std::wstring sXlstDir = sTemp + FILE_SEPARATOR_STR + _T("xlst_unpacked");
NSDirectory::CreateDirectory(sXlstDir);
std::wstring sTFile = sXlstDir + FILE_SEPARATOR_STR + _T("Editor.bin");