diff --git a/apps/common/main/lib/component/MetricSpinner.js b/apps/common/main/lib/component/MetricSpinner.js index 4e384e287..3ebe658c6 100644 --- a/apps/common/main/lib/component/MetricSpinner.js +++ b/apps/common/main/lib/component/MetricSpinner.js @@ -242,6 +242,14 @@ define([ this.options.step = step; }, + getMinValue: function(){ + return this.options.minValue; + }, + + getMaxValue: function(){ + return this.options.maxValue; + }, + getNumberValue: function(){ return this.checkAutoText(this.value) ? -1 : parseFloat(this.value); }, diff --git a/apps/documenteditor/main/app/view/FormSettings.js b/apps/documenteditor/main/app/view/FormSettings.js index d5f0e6a70..129e22246 100644 --- a/apps/documenteditor/main/app/view/FormSettings.js +++ b/apps/documenteditor/main/app/view/FormSettings.js @@ -1079,7 +1079,7 @@ define([ val = this.api.asc_GetTextFormAutoWidth(); if ( (this._state.WidthPlaceholder!==val) || Math.abs(this._state.WidthPlaceholder-val)>0.01) { - this.spnWidth.setDefaultValue(val!==undefined && val!==null ? Common.Utils.Metric.fnRecalcFromMM((val+1) * 25.4 / 20 / 72.0) : this.spnWidth.options.minValue); + this.spnWidth.setDefaultValue(val!==undefined && val!==null ? Common.Utils.Metric.fnRecalcFromMM((val+1) * 25.4 / 20 / 72.0) : this.spnWidth.getMinValue()); this._state.WidthPlaceholder=val; } diff --git a/apps/documenteditor/main/app/view/PageSizeDialog.js b/apps/documenteditor/main/app/view/PageSizeDialog.js index 445c010cb..44655c846 100644 --- a/apps/documenteditor/main/app/view/PageSizeDialog.js +++ b/apps/documenteditor/main/app/view/PageSizeDialog.js @@ -157,8 +157,12 @@ define([ this._noApply = true; if (record.value<0) { } else { - this.spnWidth.setValue(Common.Utils.Metric.fnRecalcFromMM(this.isOrientPortrait ? record.size[0] : record.size[1]), true); - this.spnHeight.setValue(Common.Utils.Metric.fnRecalcFromMM(this.isOrientPortrait ? record.size[1] : record.size[0]), true); + var w = Common.Utils.Metric.fnRecalcFromMM(this.isOrientPortrait ? record.size[0] : record.size[1]), + h = Common.Utils.Metric.fnRecalcFromMM(this.isOrientPortrait ? record.size[1] : record.size[0]); + if (w