Commit 740894a4 authored by Alexander.Trofimov's avatar Alexander.Trofimov

fix set localization formulas

parent cc2d359f
...@@ -88,6 +88,7 @@ var editor; ...@@ -88,6 +88,7 @@ var editor;
this.wb = null; this.wb = null;
this.wbModel = null; this.wbModel = null;
this.tmpLocale = null; this.tmpLocale = null;
this.tmpLocalization = null;
this.documentFormatSave = c_oAscFileType.XLSX; this.documentFormatSave = c_oAscFileType.XLSX;
...@@ -3141,30 +3142,35 @@ var editor; ...@@ -3141,30 +3142,35 @@ var editor;
} }
}; };
// Выставление локали // Выставление локали
spreadsheet_api.prototype.asc_setLocalization = function(oLocalizedData) { spreadsheet_api.prototype.asc_setLocalization = function (oLocalizedData) {
if (null == oLocalizedData) { if (!this.isLoadFullApi) {
AscCommonExcel.cFormulaFunctionLocalized = null; this.tmpLocalization = oLocalizedData;
AscCommonExcel.cFormulaFunctionToLocale = null; return;
} else { }
AscCommonExcel.cFormulaFunctionLocalized = {};
AscCommonExcel.cFormulaFunctionToLocale = {}; if (null == oLocalizedData) {
var localName; AscCommonExcel.cFormulaFunctionLocalized = null;
for (var i in AscCommonExcel.cFormulaFunction) { AscCommonExcel.cFormulaFunctionToLocale = null;
localName = oLocalizedData[i] ? oLocalizedData[i] : null; } else {
localName = localName ? localName : i; AscCommonExcel.cFormulaFunctionLocalized = {};
AscCommonExcel.cFormulaFunctionLocalized[localName] = AscCommonExcel.cFormulaFunction[i]; AscCommonExcel.cFormulaFunctionToLocale = {};
AscCommonExcel.cFormulaFunctionToLocale[i] = localName; var localName;
} for (var i in AscCommonExcel.cFormulaFunction) {
} localName = oLocalizedData[i] ? oLocalizedData[i] : null;
AscCommon.build_local_rx(oLocalizedData?oLocalizedData["LocalFormulaOperands"]:null); localName = localName ? localName : i;
if (this.wb) { AscCommonExcel.cFormulaFunctionLocalized[localName] = AscCommonExcel.cFormulaFunction[i];
this.wb.initFormulasList(); AscCommonExcel.cFormulaFunctionToLocale[i] = localName;
} }
if (this.wbModel) { }
this.wbModel.rebuildColors(); AscCommon.build_local_rx(oLocalizedData ? oLocalizedData["LocalFormulaOperands"] : null);
} if (this.wb) {
}; this.wb.initFormulasList();
}
if (this.wbModel) {
this.wbModel.rebuildColors();
}
};
spreadsheet_api.prototype.asc_nativeOpenFile = function(base64File, version, isUser) { spreadsheet_api.prototype.asc_nativeOpenFile = function(base64File, version, isUser) {
asc["editor"] = this; asc["editor"] = this;
...@@ -3354,20 +3360,22 @@ var editor; ...@@ -3354,20 +3360,22 @@ var editor;
}); });
}; };
spreadsheet_api.prototype._onEndLoadSdk = function() { spreadsheet_api.prototype._onEndLoadSdk = function () {
History = AscCommon.History; History = AscCommon.History;
if (this.isMobileVersion) if (this.isMobileVersion) {
this.asc_setMobileVersion(true); this.asc_setMobileVersion(true);
}
spreadsheet_api.superclass._onEndLoadSdk.call(this); spreadsheet_api.superclass._onEndLoadSdk.call(this);
this.controller = new AscCommonExcel.asc_CEventsController(); this.controller = new AscCommonExcel.asc_CEventsController();
this.formulasList = AscCommonExcel.getFormulasInfo(); this.formulasList = AscCommonExcel.getFormulasInfo();
this.asc_setLocale(this.tmpLocale); this.asc_setLocale(this.tmpLocale);
this.asc_setViewMode(this.isViewMode); this.asc_setLocalization(this.tmpLocalization);
}; this.asc_setViewMode(this.isViewMode);
};
/* /*
* Export * Export
......
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