[DE] Add ole object

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

View file

@ -170,8 +170,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

@ -1540,6 +1540,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

@ -607,7 +607,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',
@ -2829,7 +2830,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

@ -2573,8 +2573,8 @@ define([
width: value.width, height: value.height width: value.width, height: value.height
}); });
}; };
if (typeof obj === 'object' && this.api) { if ((typeof obj === 'object' || obj==="empty") && this.api) {
this.api.asc_addTableOleObjectInOleEditor(obj, callback); this.api.asc_addTableOleObjectInOleEditor(typeof obj === 'object' ? obj : undefined, callback);
this.isFrameClosed = false; this.isFrameClosed = false;
} }
}, },