diff --git a/apps/documenteditor/main/app/view/ParagraphSettings.js b/apps/documenteditor/main/app/view/ParagraphSettings.js index c5b39b7fee..126cf9265f 100644 --- a/apps/documenteditor/main/app/view/ParagraphSettings.js +++ b/apps/documenteditor/main/app/view/ParagraphSettings.js @@ -394,7 +394,13 @@ define([ if (this._state.LineRuleIdx !== null) { this.numLineHeight.setDefaultUnit(this._arrLineRule[this._state.LineRuleIdx].defaultUnit); this.numLineHeight.setStep(this._arrLineRule[this._state.LineRuleIdx].step); - this.numLineHeight && this.numLineHeight.setValue((this._state.LineHeight !== null) ? Common.Utils.Metric.fnRecalcFromMM(this._state.LineHeight) : '', true); + var val = ''; + if ( this._state.LineRuleIdx == c_paragraphLinerule.LINERULE_AUTO ) { + val = this._state.LineHeight; + } else if (this._state.LineHeight !== null ) { + val = Common.Utils.Metric.fnRecalcFromMM(this._state.LineHeight); + } + this.numLineHeight && this.numLineHeight.setValue((val !== null) ? val : '', true); } var val = this._state.LineSpacingBefore; diff --git a/apps/presentationeditor/main/app/view/ParagraphSettings.js b/apps/presentationeditor/main/app/view/ParagraphSettings.js index c088870dec..b425e11ee9 100644 --- a/apps/presentationeditor/main/app/view/ParagraphSettings.js +++ b/apps/presentationeditor/main/app/view/ParagraphSettings.js @@ -246,7 +246,13 @@ define([ if (!rec) rec = this.cmbLineRule.store.at(0); this.numLineHeight.setDefaultUnit(rec.get('defaultUnit')); this.numLineHeight.setStep(rec.get('step')); - this.numLineHeight && this.numLineHeight.setValue((this._state.LineHeight !== null) ? Common.Utils.Metric.fnRecalcFromMM(this._state.LineHeight) : '', true); + var val = ''; + if ( this._state.LineRule == c_paragraphLinerule.LINERULE_AUTO ) { + val = this._state.LineHeight; + } else if (this._state.LineHeight !== null ) { + val = Common.Utils.Metric.fnRecalcFromMM(this._state.LineHeight); + } + this.numLineHeight && this.numLineHeight.setValue((val !== null) ? val : '', true); } } }, diff --git a/apps/spreadsheeteditor/main/app/view/ParagraphSettings.js b/apps/spreadsheeteditor/main/app/view/ParagraphSettings.js index e840bfd218..65a8fcf321 100644 --- a/apps/spreadsheeteditor/main/app/view/ParagraphSettings.js +++ b/apps/spreadsheeteditor/main/app/view/ParagraphSettings.js @@ -249,7 +249,13 @@ define([ if (!rec) rec = this.cmbLineRule.store.at(0); this.numLineHeight.setDefaultUnit(rec.get('defaultUnit')); this.numLineHeight.setStep(rec.get('step')); - this.numLineHeight && this.numLineHeight.setValue((this._state.LineHeight !== null) ? Common.Utils.Metric.fnRecalcFromMM(this._state.LineHeight) : '', true); + var val = ''; + if ( this._state.LineRule == c_paragraphLinerule.LINERULE_AUTO ) { + val = this._state.LineHeight; + } else if (this._state.LineHeight !== null ) { + val = Common.Utils.Metric.fnRecalcFromMM(this._state.LineHeight); + } + this.numLineHeight && this.numLineHeight.setValue((val !== null) ? val : '', true); } } },