diff --git a/apps/spreadsheeteditor/main/app/controller/Toolbar.js b/apps/spreadsheeteditor/main/app/controller/Toolbar.js index b82c4dec0..171a775b6 100644 --- a/apps/spreadsheeteditor/main/app/controller/Toolbar.js +++ b/apps/spreadsheeteditor/main/app/controller/Toolbar.js @@ -898,8 +898,15 @@ define([ }, onNumberFormatMenu: function(menu, item) { - if (this.api) - this.api.asc_setCellFormat(item.value); + if (this.api) { + var info = new Asc.asc_CFormatCellsInfo(); + info.asc_setType(Asc.c_oAscNumFormatType.Accounting); + info.asc_setSeparator(false); + info.asc_setSymbol(item.value); + var format = this.api.asc_getFormatCells(info); + if (format && format.length>0) + this.api.asc_setCellFormat(format[0]); + } Common.NotificationCenter.trigger('edit:complete', this.toolbar); Common.component.Analytics.trackEvent('ToolBar', 'Number Format'); diff --git a/apps/spreadsheeteditor/main/app/view/Toolbar.js b/apps/spreadsheeteditor/main/app/view/Toolbar.js index 3c77045b7..df41701e4 100644 --- a/apps/spreadsheeteditor/main/app/view/Toolbar.js +++ b/apps/spreadsheeteditor/main/app/view/Toolbar.js @@ -692,23 +692,23 @@ define([ items : [ { caption : me.txtDollar, - value : '_($* #,##0.00_);_($* (#,##0.00);_($* "-"??_);_(@_)' + value : 0x0409 // $ en-US }, { caption : me.txtEuro, - value : '_(€* #,##0.00_);_(€* (#,##0.00);_(€* "-"??_);_(@_)' + value : 0x0407 // € de-DE }, { caption : me.txtPound, - value : '_(£* #,##0.00_);_(£* (#,##0.00);_(£* "-"??_);_(@_)' + value : 0x0809 // £ en-GB }, { caption : me.txtRouble, - value : '_-* #,##0.00[$ ₽-419]_-;-* #,##0.00[$ ₽-419]_-;_-* "-"??[$ ₽-419]_-;_-@_-' + value : 0x0419 // ₽ ru-RU }, { caption : me.txtYen, - value : '_(¥* #,##0.00_);_(¥* (#,##0.00);_(¥* "-"??_);_(@_)' + value : 0x0411 // ¥ ja-JP } ] })