From 900de8fc1eac59b51c24a76227f57ae32dc5ee3c Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Mon, 20 Dec 2021 16:20:48 +0300 Subject: [PATCH 1/3] [SSE] For Bug 45763 --- .../main/app/view/FormatSettingsDialog.js | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/apps/spreadsheeteditor/main/app/view/FormatSettingsDialog.js b/apps/spreadsheeteditor/main/app/view/FormatSettingsDialog.js index fee16cd3a..f29af9e2a 100644 --- a/apps/spreadsheeteditor/main/app/view/FormatSettingsDialog.js +++ b/apps/spreadsheeteditor/main/app/view/FormatSettingsDialog.js @@ -321,7 +321,7 @@ define([ if (this._state.hasSeparator) this.chSeparator.setValue(props.formatInfo.asc_getSeparator()); if (this._state.hasSymbols) - this.cmbSymbols.setValue(props.formatInfo.asc_getSymbol()); + this.cmbSymbols.setValue(props.formatInfo.asc_getCurrencySymbol() || props.formatInfo.asc_getSymbol()); if (props.format) { if (this._state.hasNegative) { @@ -384,7 +384,7 @@ define([ info.asc_setType(this.FormatType); info.asc_setDecimalPlaces(this.spnDecimal.getNumberValue()); info.asc_setSeparator(false); - info.asc_setSymbol(record.value); + (typeof record.value === 'string') ? info.asc_setCurrencySymbol(record.value) : info.asc_setSymbol(record.value); var format = this.api.asc_getFormatCells(info), data = []; @@ -406,7 +406,11 @@ define([ info.asc_setType(this.FormatType); info.asc_setDecimalPlaces(field.getNumberValue()); info.asc_setSeparator((this.FormatType == Asc.c_oAscNumFormatType.Number) ? this.chSeparator.getValue()=='checked' : false); - info.asc_setSymbol((this.FormatType == Asc.c_oAscNumFormatType.Currency || this.FormatType == Asc.c_oAscNumFormatType.Accounting) ? this.cmbSymbols.getValue() : false); + if (this.FormatType == Asc.c_oAscNumFormatType.Currency || this.FormatType == Asc.c_oAscNumFormatType.Accounting) { + var value = this.cmbSymbols.getValue(); + (typeof value === 'string') ? info.asc_setCurrencySymbol(value) : info.asc_setSymbol(value); + } else + info.asc_setSymbol(false); var format = this.api.asc_getFormatCells(info); if (this.FormatType == Asc.c_oAscNumFormatType.Number || this.FormatType == Asc.c_oAscNumFormatType.Currency || this.FormatType == Asc.c_oAscNumFormatType.Accounting) { @@ -479,7 +483,7 @@ define([ me = this, valDecimal = (initFormatInfo) ? initFormatInfo.asc_getDecimalPlaces() : this.spnDecimal.getNumberValue(), valSeparator = (initFormatInfo) ? initFormatInfo.asc_getSeparator() : (this.chSeparator.getValue()=='checked'), - valSymbol = (initFormatInfo) ? initFormatInfo.asc_getSymbol() : this.langId; + valSymbol = (initFormatInfo) ? (initFormatInfo.asc_getCurrencySymbol() || initFormatInfo.asc_getSymbol()) : this.langId; if (record.value !== Asc.c_oAscNumFormatType.Custom) { var info = new Asc.asc_CFormatCellsInfo(); @@ -503,6 +507,10 @@ define([ return 0; }); me.CurrencySymbolsData.unshift({value: null, displayValue: me.txtNone}); + symbolssarr = this.api.asc_getAdditionalCurrencySymbols(); + symbolssarr.forEach(function(item) { + me.CurrencySymbolsData.push({value: item, displayValue: item}); + }); this.cmbSymbols.setData(this.CurrencySymbolsData); this.cmbSymbols.setValue(valSymbol); } From b8962989af1b463d8e5e418a5e5ab5cf306ee532 Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Mon, 20 Dec 2021 16:30:22 +0300 Subject: [PATCH 2/3] [SSE] For Bug 45763 --- apps/spreadsheeteditor/main/app/view/FormatSettingsDialog.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/spreadsheeteditor/main/app/view/FormatSettingsDialog.js b/apps/spreadsheeteditor/main/app/view/FormatSettingsDialog.js index f29af9e2a..53a679d4e 100644 --- a/apps/spreadsheeteditor/main/app/view/FormatSettingsDialog.js +++ b/apps/spreadsheeteditor/main/app/view/FormatSettingsDialog.js @@ -321,7 +321,7 @@ define([ if (this._state.hasSeparator) this.chSeparator.setValue(props.formatInfo.asc_getSeparator()); if (this._state.hasSymbols) - this.cmbSymbols.setValue(props.formatInfo.asc_getCurrencySymbol() || props.formatInfo.asc_getSymbol()); + this.cmbSymbols.setValue(props.formatInfo.asc_getSymbol() || props.formatInfo.asc_getCurrencySymbol()); if (props.format) { if (this._state.hasNegative) { @@ -483,7 +483,7 @@ define([ me = this, valDecimal = (initFormatInfo) ? initFormatInfo.asc_getDecimalPlaces() : this.spnDecimal.getNumberValue(), valSeparator = (initFormatInfo) ? initFormatInfo.asc_getSeparator() : (this.chSeparator.getValue()=='checked'), - valSymbol = (initFormatInfo) ? (initFormatInfo.asc_getCurrencySymbol() || initFormatInfo.asc_getSymbol()) : this.langId; + valSymbol = (initFormatInfo) ? (initFormatInfo.asc_getSymbol() || initFormatInfo.asc_getCurrencySymbol()) : this.langId; if (record.value !== Asc.c_oAscNumFormatType.Custom) { var info = new Asc.asc_CFormatCellsInfo(); From b062b933d89e9d79f263cd3eedf5170b616ba182 Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Mon, 20 Dec 2021 16:59:41 +0300 Subject: [PATCH 3/3] [SSE] Search in symbol combobox --- apps/spreadsheeteditor/main/app/view/FormatSettingsDialog.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/apps/spreadsheeteditor/main/app/view/FormatSettingsDialog.js b/apps/spreadsheeteditor/main/app/view/FormatSettingsDialog.js index 53a679d4e..eb2e028bd 100644 --- a/apps/spreadsheeteditor/main/app/view/FormatSettingsDialog.js +++ b/apps/spreadsheeteditor/main/app/view/FormatSettingsDialog.js @@ -222,7 +222,8 @@ define([ editable: false, data: [], scrollAlwaysVisible: true, - takeFocusOnClose: true + takeFocusOnClose: true, + search: true }); this.cmbSymbols.on('selected', _.bind(this.onSymbolsSelect, this));