mirror of
https://github.com/ONLYOFFICE/core.git
synced 2026-02-10 18:05:41 +08:00
add lcid for xls(sheet)
This commit is contained in:
@ -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
|
||||
|
||||
@ -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);
|
||||
|
||||
|
||||
@ -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");
|
||||
|
||||
Reference in New Issue
Block a user