[SSE] asc_getTableStyleName может отсутствовать в случае, если применена форматированная таблица (asc_getTableName есть всегда).

This commit is contained in:
Julia Radzhabova 2016-03-15 13:16:57 +03:00
parent 65b076e791
commit 8625a594e5

View file

@ -1168,7 +1168,7 @@ define([
Common.util.Shortcuts.delegateShortcuts({ Common.util.Shortcuts.delegateShortcuts({
shortcuts: { shortcuts: {
'command+l,ctrl+l': function(e) { 'command+l,ctrl+l': function(e) {
if (me.editMode && (!me.api.asc_getCellInfo().asc_getAutoFilterInfo() || me.api.asc_getCellInfo().asc_getAutoFilterInfo().asc_getTableStyleName()===null)) if (me.editMode && (!me.api.asc_getCellInfo().asc_getAutoFilterInfo() || me.api.asc_getCellInfo().asc_getAutoFilterInfo().asc_getTableName()===null))
me._setTableFormat(me.toolbar.mnuTableTemplatePicker.store.at(23).get('name')); me._setTableFormat(me.toolbar.mnuTableTemplatePicker.store.at(23).get('name'));
return false; return false;
@ -1747,7 +1747,7 @@ define([
} }
} }
need_disable = this._state.controlsdisabled.filters || filterInfo && (filterInfo.asc_getTableStyleName()!==null || filterInfo.asc_getIsAutoFilter()===null); need_disable = this._state.controlsdisabled.filters || filterInfo && (filterInfo.asc_getTableName()!==null || filterInfo.asc_getIsAutoFilter()===null);
// (need_disable !== toolbar.btnMerge.isDisabled()) && toolbar.btnMerge.setDisabled(need_disable); // (need_disable !== toolbar.btnMerge.isDisabled()) && toolbar.btnMerge.setDisabled(need_disable);
toolbar.lockToolbar(SSE.enumLock.ruleMerge, need_disable, {array:[toolbar.btnMerge]}); toolbar.lockToolbar(SSE.enumLock.ruleMerge, need_disable, {array:[toolbar.btnMerge]});