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;
return this.isViewMode;
};
spreadsheet_api.prototype.asc_setViewMode = function(isViewerMode) {
spreadsheet_api.prototype.asc_setViewMode = function (isViewMode) {
this.isViewMode = !!isViewMode;
if (!this.isLoadFullApi) {
this.isViewMode = isViewerMode;
return;
}
this.controller.setViewerMode(isViewerMode);
this.controller.setViewerMode(isViewMode);
if (this.collaborativeEditing) {
this.collaborativeEditing.setViewerMode(isViewerMode);
this.collaborativeEditing.setViewerMode(isViewMode);
}
if (false === isViewerMode) {
if (false === isViewMode) {
// Загружаем не обрезанные шрифты для полной версии (при редактировании)
if (this.FontLoader.embedded_cut_manager.bIsCutFontsUse) {
this.FontLoader.embedded_cut_manager.bIsCutFontsUse = false;
......
......@@ -708,7 +708,6 @@
this.bAlignBySelected = false;
this.isPaintFormat = false;
this.isViewMode = false;
this.isShowTableEmptyLine = false;//true;
this.isShowTableEmptyLineAttack = false;//true;
......@@ -5419,15 +5418,14 @@ background-repeat: no-repeat;\
};
asc_docs_api.prototype.asc_setViewMode = function(isViewMode)
{
this.isViewMode = !!isViewMode;
if (!this.isLoadFullApi)
{
this.isViewMode = isViewMode;
return;
}
if (isViewMode)
{
this.isViewMode = true;
this.ShowParaMarks = false;
this.WordControl.m_bIsRuler = false;
this.WordControl.m_oDrawingDocument.ClearCachePages();
......@@ -5456,7 +5454,6 @@ background-repeat: no-repeat;\
this.isUseEmbeddedCutFonts = false;
this.isViewMode = false;
this.WordControl.checkNeedRules();
this.WordControl.m_oDrawingDocument.ClearCachePages();
this.WordControl.OnResize(true);
......
......@@ -379,7 +379,6 @@
this.isPaintFormat = c_oAscFormatPainterState.kOff;
this.isMarkerFormat = false;
this.isViewMode = false;
this.isStartAddShape = false;
this.addShapePreset = "";
this.isShowTableEmptyLine = true;
......@@ -7258,17 +7257,16 @@ background-repeat: no-repeat;\
};
asc_docs_api.prototype.asc_setViewMode = function(isViewMode)
{
this.isViewMode = !!isViewMode;
if (!this.isLoadFullApi)
{
this.isViewMode = isViewMode;
return;
}
if (isViewMode)
{
this.asc_SpellCheckDisconnect();
this.isViewMode = true;
this.ShowParaMarks = false;
AscCommon.CollaborativeEditing.m_bGlobalLock = true;
//this.isShowTableEmptyLine = false;
......@@ -7305,8 +7303,7 @@ background-repeat: no-repeat;\
*/
this.isUseEmbeddedCutFonts = false;
this.isViewMode = false;
//this.WordControl.m_bIsRuler = true;
this.WordControl.checkNeedRules();
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