Commit dc7312fa authored by Alexander.Trofimov's avatar Alexander.Trofimov

fix bug with view mode

Connect to server with flag view = false in viewer mode and warning 'file changed'
parent f3a25fe0
...@@ -614,17 +614,17 @@ var editor; ...@@ -614,17 +614,17 @@ var editor;
return this.isViewMode; return this.isViewMode;
}; };
spreadsheet_api.prototype.asc_setViewMode = function(isViewerMode) { spreadsheet_api.prototype.asc_setViewMode = function (isViewMode) {
this.isViewMode = !!isViewMode;
if (!this.isLoadFullApi) { if (!this.isLoadFullApi) {
this.isViewMode = isViewerMode;
return; return;
} }
this.controller.setViewerMode(isViewerMode); this.controller.setViewerMode(isViewMode);
if (this.collaborativeEditing) { if (this.collaborativeEditing) {
this.collaborativeEditing.setViewerMode(isViewerMode); this.collaborativeEditing.setViewerMode(isViewMode);
} }
if (false === isViewerMode) { if (false === isViewMode) {
// Загружаем не обрезанные шрифты для полной версии (при редактировании) // Загружаем не обрезанные шрифты для полной версии (при редактировании)
if (this.FontLoader.embedded_cut_manager.bIsCutFontsUse) { if (this.FontLoader.embedded_cut_manager.bIsCutFontsUse) {
this.FontLoader.embedded_cut_manager.bIsCutFontsUse = false; this.FontLoader.embedded_cut_manager.bIsCutFontsUse = false;
......
...@@ -708,7 +708,6 @@ ...@@ -708,7 +708,6 @@
this.bAlignBySelected = false; this.bAlignBySelected = false;
this.isPaintFormat = false; this.isPaintFormat = false;
this.isViewMode = false;
this.isShowTableEmptyLine = false;//true; this.isShowTableEmptyLine = false;//true;
this.isShowTableEmptyLineAttack = false;//true; this.isShowTableEmptyLineAttack = false;//true;
...@@ -5419,15 +5418,14 @@ background-repeat: no-repeat;\ ...@@ -5419,15 +5418,14 @@ background-repeat: no-repeat;\
}; };
asc_docs_api.prototype.asc_setViewMode = function(isViewMode) asc_docs_api.prototype.asc_setViewMode = function(isViewMode)
{ {
this.isViewMode = !!isViewMode;
if (!this.isLoadFullApi) if (!this.isLoadFullApi)
{ {
this.isViewMode = isViewMode;
return; return;
} }
if (isViewMode) if (isViewMode)
{ {
this.isViewMode = true;
this.ShowParaMarks = false; this.ShowParaMarks = false;
this.WordControl.m_bIsRuler = false; this.WordControl.m_bIsRuler = false;
this.WordControl.m_oDrawingDocument.ClearCachePages(); this.WordControl.m_oDrawingDocument.ClearCachePages();
...@@ -5456,7 +5454,6 @@ background-repeat: no-repeat;\ ...@@ -5456,7 +5454,6 @@ background-repeat: no-repeat;\
this.isUseEmbeddedCutFonts = false; this.isUseEmbeddedCutFonts = false;
this.isViewMode = false;
this.WordControl.checkNeedRules(); this.WordControl.checkNeedRules();
this.WordControl.m_oDrawingDocument.ClearCachePages(); this.WordControl.m_oDrawingDocument.ClearCachePages();
this.WordControl.OnResize(true); this.WordControl.OnResize(true);
......
...@@ -379,7 +379,6 @@ ...@@ -379,7 +379,6 @@
this.isPaintFormat = c_oAscFormatPainterState.kOff; this.isPaintFormat = c_oAscFormatPainterState.kOff;
this.isMarkerFormat = false; this.isMarkerFormat = false;
this.isViewMode = false;
this.isStartAddShape = false; this.isStartAddShape = false;
this.addShapePreset = ""; this.addShapePreset = "";
this.isShowTableEmptyLine = true; this.isShowTableEmptyLine = true;
...@@ -7258,9 +7257,9 @@ background-repeat: no-repeat;\ ...@@ -7258,9 +7257,9 @@ background-repeat: no-repeat;\
}; };
asc_docs_api.prototype.asc_setViewMode = function(isViewMode) asc_docs_api.prototype.asc_setViewMode = function(isViewMode)
{ {
this.isViewMode = !!isViewMode;
if (!this.isLoadFullApi) if (!this.isLoadFullApi)
{ {
this.isViewMode = isViewMode;
return; return;
} }
...@@ -7268,7 +7267,6 @@ background-repeat: no-repeat;\ ...@@ -7268,7 +7267,6 @@ background-repeat: no-repeat;\
{ {
this.asc_SpellCheckDisconnect(); this.asc_SpellCheckDisconnect();
this.isViewMode = true;
this.ShowParaMarks = false; this.ShowParaMarks = false;
AscCommon.CollaborativeEditing.m_bGlobalLock = true; AscCommon.CollaborativeEditing.m_bGlobalLock = true;
//this.isShowTableEmptyLine = false; //this.isShowTableEmptyLine = false;
...@@ -7306,7 +7304,6 @@ background-repeat: no-repeat;\ ...@@ -7306,7 +7304,6 @@ background-repeat: no-repeat;\
this.isUseEmbeddedCutFonts = false; this.isUseEmbeddedCutFonts = false;
this.isViewMode = false;
//this.WordControl.m_bIsRuler = true; //this.WordControl.m_bIsRuler = true;
this.WordControl.checkNeedRules(); this.WordControl.checkNeedRules();
this.WordControl.m_oDrawingDocument.ClearCachePages(); this.WordControl.m_oDrawingDocument.ClearCachePages();
......
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