diff --git a/apps/documenteditor/main/app/controller/DocumentHolder.js b/apps/documenteditor/main/app/controller/DocumentHolder.js index 5263b98d1..0d5219db4 100644 --- a/apps/documenteditor/main/app/controller/DocumentHolder.js +++ b/apps/documenteditor/main/app/controller/DocumentHolder.js @@ -311,8 +311,9 @@ define([ var command = message.data.command; var data = message.data.data; if (this.api) { - if (oleEditor.isEditMode()) - this.api.asc_editTableOleObject(data); + oleEditor.isEditMode() + ? this.api.asc_editTableOleObject(data) + : this.api.asc_addTableOleObject(data); } }, this)); oleEditor.on('hide', _.bind(function(cmp, message) { diff --git a/apps/documenteditor/main/app/controller/Toolbar.js b/apps/documenteditor/main/app/controller/Toolbar.js index 4386d3cd4..5010b6dc7 100644 --- a/apps/documenteditor/main/app/controller/Toolbar.js +++ b/apps/documenteditor/main/app/controller/Toolbar.js @@ -1544,6 +1544,13 @@ define([ Common.NotificationCenter.trigger('edit:complete', me.toolbar); } })).show(); + } else if (item.value == 'sse') { + var oleEditor = this.getApplication().getController('Common.Controllers.ExternalOleEditor').getView('Common.Views.ExternalOleEditor'); + if (oleEditor) { + oleEditor.setEditMode(false); + oleEditor.show(); + oleEditor.setOleData("empty"); + } } }, diff --git a/apps/documenteditor/main/app/view/Toolbar.js b/apps/documenteditor/main/app/view/Toolbar.js index 35fdb5245..3f289d33b 100644 --- a/apps/documenteditor/main/app/view/Toolbar.js +++ b/apps/documenteditor/main/app/view/Toolbar.js @@ -608,7 +608,8 @@ define([ {caption: this.mniCustomTable, value: 'custom'}, {caption: this.mniDrawTable, value: 'draw', checkable: true}, {caption: this.mniEraseTable, value: 'erase', checkable: true}, - {caption: this.mniTextToTable, value: 'convert'} + {caption: this.mniTextToTable, value: 'convert'}, + {caption: this.mniInsertSSE, value: 'sse'} ] }), dataHint: '1', @@ -2835,7 +2836,8 @@ define([ tipMarkersDash: 'Dash bullets', textTabView: 'View', mniRemoveHeader: 'Remove Header', - mniRemoveFooter: 'Remove Footer' + mniRemoveFooter: 'Remove Footer', + mniInsertSSE: 'Insert Spreadsheet' } })(), DE.Views.Toolbar || {})); }); diff --git a/apps/spreadsheeteditor/main/app/controller/Main.js b/apps/spreadsheeteditor/main/app/controller/Main.js index ebae7b0e8..ddbc934b8 100644 --- a/apps/spreadsheeteditor/main/app/controller/Main.js +++ b/apps/spreadsheeteditor/main/app/controller/Main.js @@ -2598,8 +2598,8 @@ define([ }, setOleData: function(obj) { - if (typeof obj === 'object' && this.api) { - this.api.asc_addTableOleObjectInOleEditor(obj); + if ((typeof obj === 'object' || obj==="empty") && this.api) { + this.api.asc_addTableOleObjectInOleEditor(typeof obj === 'object' ? obj : undefined); this.isFrameClosed = false; } },