Commit 42bb3891 authored by Alexander.Trofimov's avatar Alexander.Trofimov

fix bug 32408

parent 9b7de99a
......@@ -774,6 +774,12 @@ var c_oAscPrintDefaultSettings = {
PageGridLines: 0,
PageHeadings: 0
};
var c_oZoomType = {
FitToPage : 1,
FitToWidth : 2,
CustomMode : 3
};
var c_oAscEncodings = [
[ 0, 28596, "ISO-8859-6", "Arabic (ISO 8859-6)" ],
......@@ -1396,6 +1402,7 @@ window['Asc']['c_oAscMaxCellOrCommentLength'] = window['Asc'].c_oAscMaxCellOrCom
window["AscCommon"].c_oAscUrlType = c_oAscUrlType;
window["AscCommon"].c_oAscMouseMoveDataTypes = c_oAscMouseMoveDataTypes;
window["AscCommon"].c_oAscPrintDefaultSettings = c_oAscPrintDefaultSettings;
window["AscCommon"].c_oZoomType = c_oZoomType;
window["AscCommon"].c_oAscEncodings = c_oAscEncodings;
window["AscCommon"].c_oAscEncodingsMap = c_oAscEncodingsMap;
window["AscCommon"].c_oAscCodePageUtf8 = c_oAscCodePageUtf8;
......
......@@ -411,6 +411,7 @@ function asc_docs_api(name)
this.tmpSlideDiv = null;
this.tmpTextArtDiv = null;
this.tmpViewRulers = null;
this.tmpZoomType = null;
this.DocumentUrl = "";
this.bNoSendComments = false;
......@@ -3413,12 +3414,24 @@ asc_docs_api.prototype.zoomOut = function(){
this.WordControl.zoom_Out();
};
asc_docs_api.prototype.zoomFitToPage = function(){
if (!this.isLoadFullApi) {
this.tmpZoomType = AscCommon.c_oZoomType.FitToPage;
return;
}
this.WordControl.zoom_FitToPage();
};
asc_docs_api.prototype.zoomFitToWidth = function(){
if (!this.isLoadFullApi) {
this.tmpZoomType = AscCommon.c_oZoomType.FitToWidth;
return;
}
this.WordControl.zoom_FitToWidth();
};
asc_docs_api.prototype.zoomCustomMode = function(){
if (!this.isLoadFullApi) {
this.tmpZoomType = AscCommon.c_oZoomType.CustomMode;
return;
}
this.WordControl.m_nZoomType = 0;
this.WordControl.zoom_Fire();
};
......@@ -5147,6 +5160,19 @@ asc_docs_api.prototype._onEndLoadSdk = function() {
if (null !== this.tmpViewRulers) {
this.asc_SetViewRulers(this.tmpViewRulers);
}
if (null !== this.tmpZoomType) {
switch(this.tmpZoomType) {
case AscCommon.c_oZoomType.FitToPage:
this.zoomFitToPage();
break;
case AscCommon.c_oZoomType.FitToWidth:
this.zoomFitToWidth();
break;
case AscCommon.c_oZoomType.CustomMode:
this.zoomCustomMode();
break;
}
}
this.asc_setViewMode(this.isViewMode);
......
......@@ -241,6 +241,7 @@ function asc_docs_api(name)
this.isCoMarksDraw = false;
this.tmpCoMarksDraw = false;
this.tmpViewRulers = null;
this.tmpZoomType = null;
// Spell Checking
this.SpellCheckApi = (window["AscDesktopEditor"] === undefined) ? new AscCommon.CSpellCheckApi() : new CSpellCheckApi_desktop();
......@@ -5217,12 +5218,24 @@ asc_docs_api.prototype.zoomOut = function(){
this.WordControl.zoom_Out();
};
asc_docs_api.prototype.zoomFitToPage = function(){
if (!this.isLoadFullApi) {
this.tmpZoomType = AscCommon.c_oZoomType.FitToPage;
return;
}
this.WordControl.zoom_FitToPage();
};
asc_docs_api.prototype.zoomFitToWidth = function(){
if (!this.isLoadFullApi) {
this.tmpZoomType = AscCommon.c_oZoomType.FitToWidth;
return;
}
this.WordControl.zoom_FitToWidth();
};
asc_docs_api.prototype.zoomCustomMode = function(){
if (!this.isLoadFullApi) {
this.tmpZoomType = AscCommon.c_oZoomType.CustomMode;
return;
}
this.WordControl.m_nZoomType = 0;
this.WordControl.zoom_Fire(0, this.WordControl.m_nZoomValue);
};
......@@ -6706,6 +6719,19 @@ asc_docs_api.prototype._onEndLoadSdk = function() {
if (null !== this.tmpViewRulers) {
this.asc_SetViewRulers(this.tmpViewRulers);
}
if (null !== this.tmpZoomType) {
switch(this.tmpZoomType) {
case AscCommon.c_oZoomType.FitToPage:
this.zoomFitToPage();
break;
case AscCommon.c_oZoomType.FitToWidth:
this.zoomFitToWidth();
break;
case AscCommon.c_oZoomType.CustomMode:
this.zoomCustomMode();
break;
}
}
this.asc_setViewMode(this.isViewMode);
this.asc_setDrawCollaborationMarks(this.tmpCoMarksDraw);
......
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