[DE] Add ole object

This commit is contained in:
Julia Radzhabova 2022-04-01 17:49:24 +03:00
parent e9a0798327
commit d5732f21a4
4 changed files with 16 additions and 6 deletions

View file

@ -311,8 +311,9 @@ define([
var command = message.data.command; var command = message.data.command;
var data = message.data.data; var data = message.data.data;
if (this.api) { if (this.api) {
if (oleEditor.isEditMode()) oleEditor.isEditMode()
this.api.asc_editTableOleObject(data); ? this.api.asc_editTableOleObject(data)
: this.api.asc_addTableOleObject(data);
} }
}, this)); }, this));
oleEditor.on('hide', _.bind(function(cmp, message) { oleEditor.on('hide', _.bind(function(cmp, message) {

View file

@ -1544,6 +1544,13 @@ define([
Common.NotificationCenter.trigger('edit:complete', me.toolbar); Common.NotificationCenter.trigger('edit:complete', me.toolbar);
} }
})).show(); })).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");
}
} }
}, },

View file

@ -608,7 +608,8 @@ define([
{caption: this.mniCustomTable, value: 'custom'}, {caption: this.mniCustomTable, value: 'custom'},
{caption: this.mniDrawTable, value: 'draw', checkable: true}, {caption: this.mniDrawTable, value: 'draw', checkable: true},
{caption: this.mniEraseTable, value: 'erase', 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', dataHint: '1',
@ -2835,7 +2836,8 @@ define([
tipMarkersDash: 'Dash bullets', tipMarkersDash: 'Dash bullets',
textTabView: 'View', textTabView: 'View',
mniRemoveHeader: 'Remove Header', mniRemoveHeader: 'Remove Header',
mniRemoveFooter: 'Remove Footer' mniRemoveFooter: 'Remove Footer',
mniInsertSSE: 'Insert Spreadsheet'
} }
})(), DE.Views.Toolbar || {})); })(), DE.Views.Toolbar || {}));
}); });

View file

@ -2598,8 +2598,8 @@ define([
}, },
setOleData: function(obj) { setOleData: function(obj) {
if (typeof obj === 'object' && this.api) { if ((typeof obj === 'object' || obj==="empty") && this.api) {
this.api.asc_addTableOleObjectInOleEditor(obj); this.api.asc_addTableOleObjectInOleEditor(typeof obj === 'object' ? obj : undefined);
this.isFrameClosed = false; this.isFrameClosed = false;
} }
}, },