[PE] Add ole object

This commit is contained in:
Julia Radzhabova 2022-04-01 17:58:01 +03:00
parent d5732f21a4
commit 8b76a04826
3 changed files with 14 additions and 4 deletions

View file

@ -333,8 +333,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) {

View file

@ -1686,6 +1686,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");
}
}
},

View file

@ -719,7 +719,8 @@ define([
cls: 'shifted-left',
items: [
{template: _.template('<div id="id-toolbar-menu-tablepicker" class="dimension-picker" style="margin: 5px 10px;"></div>')},
{caption: me.mniCustomTable, value: 'custom'}
{caption: me.mniCustomTable, value: 'custom'},
{caption: me.mniInsertSSE, value: 'sse'}
]
}),
dataHint: '1',
@ -2029,7 +2030,8 @@ define([
tipMarkersFRhombus: 'Filled rhombus bullets',
tipMarkersDash: 'Dash bullets',
tipNone: 'None',
textTabView: 'View'
textTabView: 'View',
mniInsertSSE: 'Insert Spreadsheet'
}
}()), PE.Views.Toolbar || {}));
});