From 9974ba0c948e5b3ec733d8a02ac24a58bbd3486f Mon Sep 17 00:00:00 2001 From: GoshaZotov Date: Fri, 29 Sep 2023 12:19:52 +0300 Subject: [PATCH] [se] Fix bug 54837 --- .../FormulaObjects/engineeringFunctions.js | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/cell/model/FormulaObjects/engineeringFunctions.js b/cell/model/FormulaObjects/engineeringFunctions.js index 5d4f07602f..a71ac414e2 100644 --- a/cell/model/FormulaObjects/engineeringFunctions.js +++ b/cell/model/FormulaObjects/engineeringFunctions.js @@ -528,9 +528,24 @@ function (window, undefined) { var res = []; var hasImag = this.img != 0, hasReal = !hasImag || (this.real != 0); + let toLocalString = function (val) { + let _res = val; + if (val != null) { + val = val.toString(); + if (val) { + val = val.replace(AscCommon.FormulaSeparators.digitSeparatorDef, AscCommon.FormulaSeparators.digitSeparator); + + if (val) { + _res = val; + } + } + } + return _res; + }; + if (hasReal) { - res.push(this.real); + res.push(toLocalString(this.real)); } if (hasImag) { if (this.img == 1) { @@ -540,7 +555,7 @@ function (window, undefined) { } else if (this.img == -1) { res.push("-"); } else { - this.img > 0 && hasReal ? res.push("+" + this.img) : res.push(this.img); + this.img > 0 && hasReal ? res.push("+" + (toLocalString(this.img))) : res.push(toLocalString(this.img)); } res.push(this.suffix ? this.suffix : "i"); }