Commit 16560c81 authored by Alexander.Trofimov's avatar Alexander.Trofimov Committed by Alexander.Trofimov

asc_LoadEmptyDocument add auth

asc_OpenDocument -> _openDocument

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@64748 954022d7-b5bf-4e40-9824-e11837661b57
parent b1754329
...@@ -512,16 +512,17 @@ var ASC_DOCS_API_USE_EMBEDDED_FONTS = "@@ASC_DOCS_API_USE_EMBEDDED_FONTS"; ...@@ -512,16 +512,17 @@ var ASC_DOCS_API_USE_EMBEDDED_FONTS = "@@ASC_DOCS_API_USE_EMBEDDED_FONTS";
}; };
spreadsheet_api.prototype.asc_LoadEmptyDocument = function() { spreadsheet_api.prototype.asc_LoadEmptyDocument = function() {
this.CoAuthoringApi.auth(this.asc_getViewerMode());
var emptyWorkbook = getEmptyWorkbook() + ""; var emptyWorkbook = getEmptyWorkbook() + "";
if (emptyWorkbook.length && (Asc.c_oSerFormat.Signature === emptyWorkbook.substring(0, Asc.c_oSerFormat.Signature.length))) { if (emptyWorkbook.length && (Asc.c_oSerFormat.Signature === emptyWorkbook.substring(0, Asc.c_oSerFormat.Signature.length))) {
this.isChartEditor = true; this.isChartEditor = true;
var wb = this.asc_OpenDocument(emptyWorkbook); var wb = this._openDocument(emptyWorkbook);
this._startOpenDocument({returnCode: 0, val: wb}); this._startOpenDocument({returnCode: 0, val: wb});
} }
}; };
spreadsheet_api.prototype.asc_OpenDocument = function(data) { spreadsheet_api.prototype._openDocument = function(data) {
var wb = new Workbook(this.handlers, this); var wb = new Workbook(this.handlers, this);
this.initGlobalObjects(wb); this.initGlobalObjects(wb);
this.wbModel = wb; this.wbModel = wb;
...@@ -938,7 +939,7 @@ var ASC_DOCS_API_USE_EMBEDDED_FONTS = "@@ASC_DOCS_API_USE_EMBEDDED_FONTS"; ...@@ -938,7 +939,7 @@ var ASC_DOCS_API_USE_EMBEDDED_FONTS = "@@ASC_DOCS_API_USE_EMBEDDED_FONTS";
return; return;
} }
var wb = t.asc_OpenDocument(result.data); var wb = t._openDocument(result.data);
if (callback) { if (callback) {
callback({returnCode: 0, val: wb}); callback({returnCode: 0, val: wb});
} }
...@@ -963,7 +964,7 @@ var ASC_DOCS_API_USE_EMBEDDED_FONTS = "@@ASC_DOCS_API_USE_EMBEDDED_FONTS"; ...@@ -963,7 +964,7 @@ var ASC_DOCS_API_USE_EMBEDDED_FONTS = "@@ASC_DOCS_API_USE_EMBEDDED_FONTS";
var data = getTestWorkbook(); var data = getTestWorkbook();
var sData = data + ""; var sData = data + "";
if (Asc.c_oSerFormat.Signature === sData.substring(0, Asc.c_oSerFormat.Signature.length)) { if (Asc.c_oSerFormat.Signature === sData.substring(0, Asc.c_oSerFormat.Signature.length)) {
var wb = this.asc_OpenDocument(sData); var wb = this._openDocument(sData);
fCallback({returnCode: 0, val: wb}); fCallback({returnCode: 0, val: wb});
} }
}; };
......
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