From 784909d517e17b483db8f06e6f8d6005bd1adc13 Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Mon, 19 Apr 2021 19:05:34 +0300 Subject: [PATCH] [DE] Fix Bug 49695, Fix Bug 49694 --- .../main/app/view/ParagraphSettings.js | 23 ++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) 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