diff --git a/apps/documenteditor/main/app/view/FormSettings.js b/apps/documenteditor/main/app/view/FormSettings.js index 57d504f9b..c5da9f278 100644 --- a/apps/documenteditor/main/app/view/FormSettings.js +++ b/apps/documenteditor/main/app/view/FormSettings.js @@ -389,7 +389,6 @@ define([ formTextPr.put_MaxCharacters(checked ? (field.getNumberValue() || 10) : checked); props.put_TextFormPr(formTextPr); this.api.asc_SetContentControlProperties(props, this.internalId); - this.fireEvent('editcomplete', this); } }, @@ -408,7 +407,7 @@ define([ formTextPr.put_MaxCharacters(this.spnMaxChars.getNumberValue() || 10); if (this.spnWidth.getValue()) { var value = this.spnWidth.getNumberValue(); - formTextPr.put_Width(value<=0 ? 0 : parseInt(Common.Utils.Metric.fnRecalcToMM(value) * 72 * 20 / 25.4 + 0.1)); + formTextPr.put_Width(value<=0 ? 0 : parseInt(Common.Utils.Metric.fnRecalcToMM(value) * 72 * 20 / 25.4 + 0.5)); } else formTextPr.put_Width(0); } @@ -424,13 +423,12 @@ define([ var formTextPr = this._originalTextFormProps || new AscCommon.CSdtTextFormPr(); if (this.spnWidth.getValue()) { var value = this.spnWidth.getNumberValue(); - formTextPr.put_Width(value<=0 ? 0 : parseInt(Common.Utils.Metric.fnRecalcToMM(value) * 72 * 20 / 25.4 + 0.1)); + formTextPr.put_Width(value<=0 ? 0 : parseInt(Common.Utils.Metric.fnRecalcToMM(value) * 72 * 20 / 25.4 + 0.5)); } else formTextPr.put_Width(0); props.put_TextFormPr(formTextPr); this.api.asc_SetContentControlProperties(props, this.internalId); - this.fireEvent('editcomplete', this); } }, @@ -727,7 +725,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) : this.spnWidth.options.minValue); + this.spnWidth.setDefaultValue(val!==undefined && val!==null ? Common.Utils.Metric.fnRecalcFromMM((val+1) * 25.4 / 20 / 72.0) : this.spnWidth.options.minValue); this._state.WidthPlaceholder=val; }