From af6e58fd8784e92b47abeff2d066c2daa40ff182 Mon Sep 17 00:00:00 2001 From: OVSharova Date: Sat, 10 Jul 2021 03:44:48 +0300 Subject: [PATCH] Finished editing spreadsheeteditor --- .../main/app/view/ParagraphSettings.js | 46 +++++++++---------- .../app/view/ParagraphSettingsAdvanced.js | 37 +++++++-------- 2 files changed, 42 insertions(+), 41 deletions(-) diff --git a/apps/spreadsheeteditor/main/app/view/ParagraphSettings.js b/apps/spreadsheeteditor/main/app/view/ParagraphSettings.js index 65a8fcf32..87b03a7d3 100644 --- a/apps/spreadsheeteditor/main/app/view/ParagraphSettings.js +++ b/apps/spreadsheeteditor/main/app/view/ParagraphSettings.js @@ -106,7 +106,7 @@ define([ if ( this.cmbLineRule.getRawValue() === '' ) return; if (this.api) - this.api.asc_putPrLineSpacing(this.cmbLineRule.getValue(), (this.cmbLineRule.getValue()==c_paragraphLinerule.LINERULE_AUTO) ? field.getNumberValue() : Common.Utils.Metric.fnRecalcToMM(field.getNumberValue())); + this.api.asc_putPrLineSpacing(this.cmbLineRule.getValue(), (this.cmbLineRule.getValue()==c_paragraphLinerule.LINERULE_AUTO) ? field.getNumberValue() : Common.Utils.Metric.fnRecalcToMM(field.getNumberValue(),Common.Utils.Metric.c_MetricUnits.pt)); }, onNumSpacingBeforeChange: function(field, newValue, oldValue, eOpts){ @@ -115,7 +115,7 @@ define([ if (num<0) this.api.asc_putLineSpacingBeforeAfter(0, -1); else - this.api.asc_putLineSpacingBeforeAfter(0, Common.Utils.Metric.fnRecalcToMM(field.getNumberValue())); + this.api.asc_putLineSpacingBeforeAfter(0, Common.Utils.Metric.fnRecalcToMM(field.getNumberValue(), Common.Utils.Metric.c_MetricUnits.pt)); } }, @@ -125,7 +125,7 @@ define([ if (num<0) this.api.asc_putLineSpacingBeforeAfter(1, -1); else - this.api.asc_putLineSpacingBeforeAfter(1, Common.Utils.Metric.fnRecalcToMM(field.getNumberValue())); + this.api.asc_putLineSpacingBeforeAfter(1, Common.Utils.Metric.fnRecalcToMM(field.getNumberValue(), Common.Utils.Metric.c_MetricUnits.pt)); } }, @@ -162,7 +162,7 @@ define([ if ( linerule == c_paragraphLinerule.LINERULE_AUTO ) { val = line; } else if (linerule !== null && line !== null ) { - val = Common.Utils.Metric.fnRecalcFromMM(line); + val = Common.Utils.Metric.fnRecalcFromMM(line, Common.Utils.Metric.c_MetricUnits.pt); } this.numLineHeight.setValue((val !== null) ? val : '', true); @@ -202,7 +202,7 @@ define([ if ( Spacing.LineRule == c_paragraphLinerule.LINERULE_AUTO ) { val = Spacing.Line; } else if (Spacing.LineRule !== null && Spacing.Line !== null ) { - val = Common.Utils.Metric.fnRecalcFromMM(Spacing.Line); + val = Common.Utils.Metric.fnRecalcFromMM(Spacing.Line, Common.Utils.Metric.c_MetricUnits.pt); } this.numLineHeight.setValue((val !== null) ? val : '', true); @@ -212,14 +212,14 @@ define([ if ( Math.abs(this._state.LineSpacingBefore-Spacing.Before)>0.001 || (this._state.LineSpacingBefore===null || Spacing.Before===null)&&(this._state.LineSpacingBefore!==Spacing.Before)) { - this.numSpacingBefore.setValue((Spacing.Before !== null) ? ((Spacing.Before<0) ? Spacing.Before : Common.Utils.Metric.fnRecalcFromMM(Spacing.Before) ) : '', true); + this.numSpacingBefore.setValue((Spacing.Before !== null) ? ((Spacing.Before<0) ? Spacing.Before : Common.Utils.Metric.fnRecalcFromMM(Spacing.Before, Common.Utils.Metric.c_MetricUnits.pt) ) : '', true); this._state.LineSpacingBefore=Spacing.Before; } if ( Math.abs(this._state.LineSpacingAfter-Spacing.After)>0.001 || (this._state.LineSpacingAfter===null || Spacing.After===null)&&(this._state.LineSpacingAfter!==Spacing.After)) { - this.numSpacingAfter.setValue((Spacing.After !== null) ? ((Spacing.After<0) ? Spacing.After : Common.Utils.Metric.fnRecalcFromMM(Spacing.After) ) : '', true); + this.numSpacingAfter.setValue((Spacing.After !== null) ? ((Spacing.After<0) ? Spacing.After : Common.Utils.Metric.fnRecalcFromMM(Spacing.After, Common.Utils.Metric.c_MetricUnits.pt) ) : '', true); this._state.LineSpacingAfter=Spacing.After; } } @@ -229,19 +229,19 @@ define([ if (this.spinners) { for (var i=0; i