diff --git a/apps/documenteditor/main/app/view/ParagraphSettings.js b/apps/documenteditor/main/app/view/ParagraphSettings.js index 025dfbe4b..56dbef023 100644 --- a/apps/documenteditor/main/app/view/ParagraphSettings.js +++ b/apps/documenteditor/main/app/view/ParagraphSettings.js @@ -365,6 +365,13 @@ define([ var props = new Asc.asc_CParagraphProperty(); props.put_Ind(new Asc.asc_CParagraphInd()); props.get_Ind().put_FirstLine(specialBy); + if (specialBy<0 || this._state.FirstLine<0) { + var left = this._state.LeftIndent; + if (left !== undefined && left !== null) { + props.get_Ind().put_Left(specialBy<0 ? left-specialBy : left); + } + } + if (this.api) this.api.paraApply(props); this.fireEvent('editcomplete', this); @@ -379,18 +386,25 @@ define([ var props = new Asc.asc_CParagraphProperty(); props.put_Ind(new Asc.asc_CParagraphInd()); props.get_Ind().put_FirstLine(specialBy); + if (specialBy<0 || this._state.FirstLine<0) { + var left = this._state.LeftIndent; + if (left !== undefined && left !== null) { + props.get_Ind().put_Left(specialBy<0 ? left-specialBy : left); + } + } + if (this.api) this.api.paraApply(props); }, onNumIndentsLeftChange: function(field, newValue, oldValue, eOpts){ - var left = field.getNumberValue(); + var left = Common.Utils.Metric.fnRecalcToMM(field.getNumberValue()); if (this._state.FirstLine<0) { left = left-this._state.FirstLine; } var props = new Asc.asc_CParagraphProperty(); props.put_Ind(new Asc.asc_CParagraphInd()); - props.get_Ind().put_Left(Common.Utils.Metric.fnRecalcToMM(left)); + props.get_Ind().put_Left(left); if (this.api) this.api.paraApply(props); }, @@ -538,7 +552,10 @@ define([ for (var i=0; i