diff --git a/apps/documenteditor/main/app/controller/Toolbar.js b/apps/documenteditor/main/app/controller/Toolbar.js index be7741da7..7d43b8507 100644 --- a/apps/documenteditor/main/app/controller/Toolbar.js +++ b/apps/documenteditor/main/app/controller/Toolbar.js @@ -2648,18 +2648,12 @@ define([ onSetupCopyStyleButton: function () { this.modeAlwaysSetStyle = false; - var acsCopyFmtStyleState = { - kOff : 0, - kOn : 1, - kMultiple : 2 - }; - var me = this; Common.NotificationCenter.on({ 'edit:complete': function () { if (me.api && me.modeAlwaysSetStyle) { - me.api.SetPaintFormat(acsCopyFmtStyleState.kOff); + me.api.SetPaintFormat(AscCommon.c_oAscFormatPainterState.kOff); me.toolbar.btnCopyStyle.toggle(false, true); me.modeAlwaysSetStyle = false; } @@ -2670,7 +2664,7 @@ define([ if (me.api) { me.modeAlwaysSetStyle = true; me.toolbar.btnCopyStyle.toggle(true, true); - me.api.SetPaintFormat(acsCopyFmtStyleState.kMultiple); + me.api.SetPaintFormat(AscCommon.c_oAscFormatPainterState.kMultiple); } }); }, diff --git a/apps/presentationeditor/main/app/controller/Toolbar.js b/apps/presentationeditor/main/app/controller/Toolbar.js index 57420d6a8..807066687 100644 --- a/apps/presentationeditor/main/app/controller/Toolbar.js +++ b/apps/presentationeditor/main/app/controller/Toolbar.js @@ -307,6 +307,8 @@ define([ toolbar.mnuInsertChartPicker.on('item:click', _.bind(this.onSelectChart, this)); toolbar.listTheme.on('click', _.bind(this.onListThemeSelect, this)); toolbar.btnInsertEquation.on('click', _.bind(this.onInsertEquationClick, this)); + + this.onSetupCopyStyleButton(); }, setApi: function(api) { @@ -352,8 +354,6 @@ define([ this.api.asc_registerCallback('asc_onCountPages', _.bind(this.onApiCountPages, this)); this.api.asc_registerCallback('asc_onMathTypes', _.bind(this.onMathTypes, this)); this.api.asc_registerCallback('asc_onContextMenu', _.bind(this.onContextMenu, this)); - - this.onSetupCopyStyleButton(); }, onChangeCompactView: function(view, compact) { @@ -1938,18 +1938,12 @@ define([ onSetupCopyStyleButton: function () { this.modeAlwaysSetStyle = false; - var acsCopyFmtStyleState = { - kOff : 0, - kOn : 1, - kMultiple : 2 - }; - var me = this; Common.NotificationCenter.on({ 'edit:complete': function () { if (me.api && me.modeAlwaysSetStyle) { - me.api.SetPaintFormat(acsCopyFmtStyleState.kOff); + me.api.SetPaintFormat(AscCommon.c_oAscFormatPainterState.kOff); me.toolbar.btnCopyStyle.toggle(false, true); me.modeAlwaysSetStyle = false; } @@ -1960,7 +1954,7 @@ define([ if (me.api) { me.modeAlwaysSetStyle = true; me.toolbar.btnCopyStyle.toggle(true, true); - me.api.SetPaintFormat(acsCopyFmtStyleState.kMultiple); + me.api.SetPaintFormat(AscCommon.c_oAscFormatPainterState.kMultiple); } }); }, diff --git a/apps/spreadsheeteditor/main/app/controller/Toolbar.js b/apps/spreadsheeteditor/main/app/controller/Toolbar.js index e88e1a248..8c70f3b3a 100644 --- a/apps/spreadsheeteditor/main/app/controller/Toolbar.js +++ b/apps/spreadsheeteditor/main/app/controller/Toolbar.js @@ -2994,18 +2994,12 @@ define([ onSetupCopyStyleButton: function () { this.modeAlwaysSetStyle = false; - var acsCopyFmtStyleState = { - kOff : 0, - kOn : 1, - kMultiple : 2 - }; - var me = this; Common.NotificationCenter.on({ 'edit:complete': function () { if (me.api && me.modeAlwaysSetStyle) { - me.api.asc_formatPainter(acsCopyFmtStyleState.kOff); + me.api.asc_formatPainter(AscCommon.c_oAscFormatPainterState.kOff); me.toolbar.btnCopyStyle.toggle(false, true); me.modeAlwaysSetStyle = false; } @@ -3016,7 +3010,7 @@ define([ if (me.api) { me.modeAlwaysSetStyle = true; me.toolbar.btnCopyStyle.toggle(true, true); - me.api.asc_formatPainter(acsCopyFmtStyleState.kMultiple); + me.api.asc_formatPainter(AscCommon.c_oAscFormatPainterState.kMultiple); } }); },