Commit 7db04257 authored by Alexander.Trofimov's avatar Alexander.Trofimov

fix bug 32383

parent eda9d9d5
...@@ -483,12 +483,7 @@ var editor; ...@@ -483,12 +483,7 @@ var editor;
spreadsheet_api.prototype.asc_LoadEmptyDocument = function() { spreadsheet_api.prototype.asc_LoadEmptyDocument = function() {
this.CoAuthoringApi.auth(this.getViewMode()); this.CoAuthoringApi.auth(this.getViewMode());
this.onEndLoadFile(true);
var emptyWorkbook = AscCommonExcel.getEmptyWorkbook() + "";
if (emptyWorkbook.length && (AscCommon.c_oSerFormat.Signature === emptyWorkbook.substring(0, AscCommon.c_oSerFormat.Signature.length))) {
this.isChartEditor = true;
this.openDocument(emptyWorkbook);
}
}; };
spreadsheet_api.prototype._openDocument = function(data) { spreadsheet_api.prototype._openDocument = function(data) {
...@@ -1117,6 +1112,16 @@ var editor; ...@@ -1117,6 +1112,16 @@ var editor;
}; };
spreadsheet_api.prototype.openDocument = function(sData) { spreadsheet_api.prototype.openDocument = function(sData) {
if (true === sData) {
// Empty Document
sData = AscCommonExcel.getEmptyWorkbook() + "";
if (sData.length && (AscCommon.c_oSerFormat.Signature === sData.substring(0, AscCommon.c_oSerFormat.Signature.length))) {
this.isChartEditor = true;
} else {
return;
}
}
this.wbModel = this._openDocument(sData); this.wbModel = this._openDocument(sData);
this.FontLoader.LoadDocumentFonts(this.wbModel.generateFontMap2()); this.FontLoader.LoadDocumentFonts(this.wbModel.generateFontMap2());
......
...@@ -318,7 +318,7 @@ baseEditorsApi.prototype.asc_LoadDocument = function(isVersionHistory) { ...@@ -318,7 +318,7 @@ baseEditorsApi.prototype.asc_LoadDocument = function(isVersionHistory) {
this.advancedOptionsAction = AscCommon.c_oAscAdvancedOptionsAction.Open; this.advancedOptionsAction = AscCommon.c_oAscAdvancedOptionsAction.Open;
var rData = null; var rData = null;
if (offlineMode !== this.documentUrl) { if (offlineMode !== this.documentUrl) {
var rData = { rData = {
"c": 'open', "c": 'open',
"id": this.documentId, "id": this.documentId,
"userid": this.documentUserId, "userid": this.documentUserId,
......
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