Commit 57720f70 authored by Alexander.Trofimov's avatar Alexander.Trofimov

fix bug 32408

parent 5608cedf
......@@ -798,6 +798,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)" ],
......@@ -1420,6 +1426,7 @@ var offlineMode = '_offline_';
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;
......
......@@ -435,6 +435,7 @@ function asc_docs_api(name)
this.tmpSlideDiv = null;
this.tmpTextArtDiv = null;
this.tmpViewRulers = null;
this.tmpZoomType = null;
this.DocumentUrl = "";
this.bNoSendComments = false;
......@@ -3437,12 +3438,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();
};
......@@ -5171,6 +5184,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);
......
......@@ -265,6 +265,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();
......@@ -5241,12 +5242,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);
};
......@@ -6730,6 +6743,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