From 9e2c2b2b3ea8fe6008c5b26ee200c04260daa74b Mon Sep 17 00:00:00 2001 From: "Alexander.Trofimov" <Alexander.Trofimov@OnlyOffice.com> Date: Fri, 4 Dec 2015 11:25:05 +0000 Subject: [PATCH] Excel asc_getViewerMode -> getViewMode Other add getViewMode git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@66469 954022d7-b5bf-4e40-9824-e11837661b57 --- Excel/api.js | 14 +++++++------- PowerPoint/api.js | 3 +++ Word/api.js | 3 +++ 3 files changed, 13 insertions(+), 7 deletions(-) diff --git a/Excel/api.js b/Excel/api.js index 534bbab69..6e376c686 100644 --- a/Excel/api.js +++ b/Excel/api.js @@ -344,7 +344,7 @@ var editor; }; spreadsheet_api.prototype.asc_LoadDocument = function() { var t = this; - this.CoAuthoringApi.auth(this.asc_getViewerMode()); + this.CoAuthoringApi.auth(this.getViewMode()); this.sync_StartAction(c_oAscAsyncActionType.BlockInteraction, c_oAscAsyncAction.Open); if (!this.chartEditor) { @@ -355,7 +355,7 @@ var editor; }; spreadsheet_api.prototype.asc_LoadEmptyDocument = function() { - this.CoAuthoringApi.auth(this.asc_getViewerMode()); + this.CoAuthoringApi.auth(this.getViewMode()); var emptyWorkbook = getEmptyWorkbook() + ""; if (emptyWorkbook.length && (Asc.c_oSerFormat.Signature === emptyWorkbook.substring(0, Asc.c_oSerFormat.Signature.length))) { @@ -550,7 +550,7 @@ var editor; AscBrowser.isMobileVersion = isMobile; }; - spreadsheet_api.prototype.asc_getViewerMode = function() { + spreadsheet_api.prototype.getViewMode = function() { return this.controller.getViewerMode(); }; @@ -701,7 +701,7 @@ var editor; "url": this.documentUrl, "title": this.documentTitle, "embeddedfonts": this.isUseEmbeddedCutFonts, - "viewmode": this.asc_getViewerMode() + "viewmode": this.getViewMode() }; sendCommand2(this, null, v); } @@ -1102,7 +1102,7 @@ var editor; "checkDefNameLock": function(lockElem) { return t._onCheckDefNameLock(lockElem); } - }, this.asc_getViewerMode()); + }, this.getViewMode()); this.CoAuthoringApi.onParticipantsChanged = function(e, count) { t.handlers.trigger("asc_onParticipantsChanged", e, count); @@ -1320,7 +1320,7 @@ var editor; var urls = input["data"]; g_oDocumentUrls.init(urls); if (null != urls['Editor.bin']) { - if ('ok' === input["status"] || t.asc_getViewerMode()) { + if ('ok' === input["status"] || t.getViewMode()) { t._onOpenCommand(function(response) { t._startOpenDocument(response); }, urls['Editor.bin']); @@ -3008,7 +3008,7 @@ var editor; } // Ðа view-режиме не нужно отправлÑÑ‚ÑŒ Ñтили - if (true !== this.asc_getViewerMode() && !this.isMobileVersion) { + if (true !== this.getViewMode() && !this.isMobileVersion) { // Отправка Ñтилей this._sendWorkbookStyles(); } diff --git a/PowerPoint/api.js b/PowerPoint/api.js index 8385257af..ab4def896 100644 --- a/PowerPoint/api.js +++ b/PowerPoint/api.js @@ -4403,6 +4403,9 @@ asc_docs_api.prototype.SetDeviceInputHelperId = function(idKeyboard) } window.ID_KEYBOARD_AREA.focus(); }; +asc_docs_api.prototype.getViewMode = function() { + return this.isViewMode; +}; asc_docs_api.prototype.SetViewMode = function(isViewMode) { if (isViewMode) { this.isViewMode = true; diff --git a/Word/api.js b/Word/api.js index 8cafc4ad9..8f3f47b32 100644 --- a/Word/api.js +++ b/Word/api.js @@ -6330,6 +6330,9 @@ asc_docs_api.prototype.add_SectionBreak = function(_Type) } }; +asc_docs_api.prototype.getViewMode = function() { + return this.isViewMode; +}; asc_docs_api.prototype.SetViewMode = function(isViewMode) { if (isViewMode) { this.asc_SpellCheckDisconnect(); -- 2.30.9