From 22675ac1c8f59573985be728e7fd654911ed04e2 Mon Sep 17 00:00:00 2001 From: Julia Svinareva Date: Fri, 11 Oct 2019 10:45:56 +0300 Subject: [PATCH] [SSE] Fix Bug 43144 --- apps/spreadsheeteditor/main/app/controller/Print.js | 8 ++++---- apps/spreadsheeteditor/main/app/view/ScaleDialog.js | 6 +++--- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/apps/spreadsheeteditor/main/app/controller/Print.js b/apps/spreadsheeteditor/main/app/controller/Print.js index a36c3e98c..6a66e9270 100644 --- a/apps/spreadsheeteditor/main/app/controller/Print.js +++ b/apps/spreadsheeteditor/main/app/controller/Print.js @@ -141,10 +141,10 @@ define([ panel.cmbPaperSize.setValue(this.txtCustom + ' (' + parseFloat(Common.Utils.Metric.fnRecalcFromMM(w).toFixed(2)) + Common.Utils.Metric.getCurrentMetricName() + ' x ' + parseFloat(Common.Utils.Metric.fnRecalcFromMM(h).toFixed(2)) + Common.Utils.Metric.getCurrentMetricName() + ')'); - var fitwidth = opt.asc_getFitToWidth(), - fitheight = opt.asc_getFitToHeight(), - fitscale = opt.asc_getScale(); - this.setScaling(panel, fitwidth, fitheight, fitscale); + this.fitWidth = opt.asc_getFitToWidth(); + this.fitHeight = opt.asc_getFitToHeight(); + this.fitScale = opt.asc_getScale(); + this.setScaling(panel, this.fitWidth, this.fitHeight, this.fitScale); item = panel.cmbPaperOrientation.store.findWhere({value: opt.asc_getOrientation()}); if (item) panel.cmbPaperOrientation.setValue(item.get('value')); diff --git a/apps/spreadsheeteditor/main/app/view/ScaleDialog.js b/apps/spreadsheeteditor/main/app/view/ScaleDialog.js index b070b4087..c49e2704c 100644 --- a/apps/spreadsheeteditor/main/app/view/ScaleDialog.js +++ b/apps/spreadsheeteditor/main/app/view/ScaleDialog.js @@ -228,8 +228,8 @@ define([ this._state.width = (width !== null && width !== 0) ? width : null; this._state.height = (height !== null && height !== 0) ? height : null; - width = (width !== null) ? width : 0; - height = (height !== null) ? height : 0; + width = (width !== null && width !== undefined) ? width : 0; + height = (height !== null && height !== undefined) ? height : 0; if (width === 0 && height === 0) { this.radioScaleTo.setValue(true,true); @@ -248,7 +248,7 @@ define([ this.cmbScaleHeight.setRawValue(height.toString() + ' ' + this.getTextPages(height)); } - this.spnScale.setValue((scale !== null) ? scale : '', true); + this.spnScale.setValue((scale !== null && scale !== undefined) ? scale : '', true); } },