Merge remote-tracking branch 'origin/develop' into develop

This commit is contained in:
Julia Radzhabova 2020-05-14 13:03:21 +03:00
commit 2af9094a34
18 changed files with 55 additions and 55 deletions

View file

@ -151,7 +151,7 @@ define([
}, },
onApiSelectionChanged: function(info) { onApiSelectionChanged: function(info) {
var seltype = info.asc_getFlags().asc_getSelectionType(), var seltype = info.asc_getSelectionType(),
coauth_disable = (!this.mode.isEditMailMerge && !this.mode.isEditDiagram) ? (info.asc_getLocked() === true || info.asc_getLockedTable() === true || info.asc_getLockedPivotTable()===true) : false; coauth_disable = (!this.mode.isEditMailMerge && !this.mode.isEditDiagram) ? (info.asc_getLocked() === true || info.asc_getLockedTable() === true || info.asc_getLockedPivotTable()===true) : false;
var is_chart_text = seltype == Asc.c_oAscSelectionType.RangeChartText, var is_chart_text = seltype == Asc.c_oAscSelectionType.RangeChartText,

View file

@ -117,7 +117,7 @@ define([
// special disable conditions // special disable conditions
Common.Utils.lockControls(SSE.enumLock.multiselectCols, info.asc_getSelectedColsCount()>1, {array: [this.view.btnTextToColumns]}); Common.Utils.lockControls(SSE.enumLock.multiselectCols, info.asc_getSelectedColsCount()>1, {array: [this.view.btnTextToColumns]});
Common.Utils.lockControls(SSE.enumLock.multiselect, info.asc_getFlags().asc_getMultiselect(), {array: [this.view.btnTextToColumns]}); Common.Utils.lockControls(SSE.enumLock.multiselect, info.asc_getMultiselect(), {array: [this.view.btnTextToColumns]});
}, },
onUngroup: function(type) { onUngroup: function(type) {

View file

@ -351,7 +351,7 @@ define([
onInsertEntire: function(item) { onInsertEntire: function(item) {
if (this.api) { if (this.api) {
switch (this.api.asc_getCellInfo().asc_getFlags().asc_getSelectionType()) { switch (this.api.asc_getCellInfo().asc_getSelectionType()) {
case Asc.c_oAscSelectionType.RangeRow: case Asc.c_oAscSelectionType.RangeRow:
this.api.asc_insertCells(Asc.c_oAscInsertOptions.InsertRows); this.api.asc_insertCells(Asc.c_oAscInsertOptions.InsertRows);
break; break;
@ -376,7 +376,7 @@ define([
onDeleteEntire: function(item) { onDeleteEntire: function(item) {
if (this.api) { if (this.api) {
switch (this.api.asc_getCellInfo().asc_getFlags().asc_getSelectionType()) { switch (this.api.asc_getCellInfo().asc_getSelectionType()) {
case Asc.c_oAscSelectionType.RangeRow: case Asc.c_oAscSelectionType.RangeRow:
this.api.asc_deleteCells(Asc.c_oAscDeleteOptions.DeleteRows); this.api.asc_deleteCells(Asc.c_oAscDeleteOptions.DeleteRows);
break; break;
@ -545,7 +545,7 @@ define([
currentSheet: me.api.asc_getWorksheetName(me.api.asc_getActiveWorksheetIndex()), currentSheet: me.api.asc_getWorksheetName(me.api.asc_getActiveWorksheetIndex()),
props : props, props : props,
text : cell.asc_getText(), text : cell.asc_getText(),
isLock : cell.asc_getFlags().asc_getLockText(), isLock : cell.asc_getLockText(),
allowInternal: item.options.inCell allowInternal: item.options.inCell
}); });
} }
@ -1567,7 +1567,7 @@ define([
fillMenuProps: function(cellinfo, showMenu, event){ fillMenuProps: function(cellinfo, showMenu, event){
var iscellmenu, isrowmenu, iscolmenu, isallmenu, ischartmenu, isimagemenu, istextshapemenu, isshapemenu, istextchartmenu, isimageonly, var iscellmenu, isrowmenu, iscolmenu, isallmenu, ischartmenu, isimagemenu, istextshapemenu, isshapemenu, istextchartmenu, isimageonly,
documentHolder = this.documentHolder, documentHolder = this.documentHolder,
seltype = cellinfo.asc_getFlags().asc_getSelectionType(), seltype = cellinfo.asc_getSelectionType(),
isCellLocked = cellinfo.asc_getLocked(), isCellLocked = cellinfo.asc_getLocked(),
isTableLocked = cellinfo.asc_getLockedTable()===true, isTableLocked = cellinfo.asc_getLockedTable()===true,
isObjLocked = false, isObjLocked = false,
@ -1740,7 +1740,7 @@ define([
formatTableInfo = cellinfo.asc_getFormatTableInfo(), formatTableInfo = cellinfo.asc_getFormatTableInfo(),
isinsparkline = (cellinfo.asc_getSparklineInfo()!==null), isinsparkline = (cellinfo.asc_getSparklineInfo()!==null),
isintable = (formatTableInfo !== null), isintable = (formatTableInfo !== null),
ismultiselect = cellinfo.asc_getFlags().asc_getMultiselect(); ismultiselect = cellinfo.asc_getMultiselect();
documentHolder.ssMenu.formatTableName = (isintable) ? formatTableInfo.asc_getTableName() : null; documentHolder.ssMenu.formatTableName = (isintable) ? formatTableInfo.asc_getTableName() : null;
documentHolder.ssMenu.cellColor = cellinfo.asc_getFillColor(); documentHolder.ssMenu.cellColor = cellinfo.asc_getFillColor();
documentHolder.ssMenu.fontColor = cellinfo.asc_getFont().asc_getColor(); documentHolder.ssMenu.fontColor = cellinfo.asc_getFont().asc_getColor();
@ -1863,7 +1863,7 @@ define([
fillViewMenuProps: function(cellinfo, showMenu, event){ fillViewMenuProps: function(cellinfo, showMenu, event){
var documentHolder = this.documentHolder, var documentHolder = this.documentHolder,
seltype = cellinfo.asc_getFlags().asc_getSelectionType(), seltype = cellinfo.asc_getSelectionType(),
isCellLocked = cellinfo.asc_getLocked(), isCellLocked = cellinfo.asc_getLocked(),
isTableLocked = cellinfo.asc_getLockedTable()===true, isTableLocked = cellinfo.asc_getLockedTable()===true,
commentsController = this.getApplication().getController('Common.Controllers.Comments'), commentsController = this.getApplication().getController('Common.Controllers.Comments'),

View file

@ -529,7 +529,7 @@ define([
}, },
onSelectionChanged: function(info){ onSelectionChanged: function(info){
if (!this._isChartDataReady && info.asc_getFlags().asc_getSelectionType() == Asc.c_oAscSelectionType.RangeChart) { if (!this._isChartDataReady && info.asc_getSelectionType() == Asc.c_oAscSelectionType.RangeChart) {
this._isChartDataReady = true; this._isChartDataReady = true;
Common.Gateway.internalMessage('chartDataReady'); Common.Gateway.internalMessage('chartDataReady');
} }

View file

@ -380,8 +380,7 @@ define([
onSelectionChanged: function(info) { onSelectionChanged: function(info) {
if (this.rangeSelectionMode || !this.appConfig.isEdit || !this.view) return; if (this.rangeSelectionMode || !this.appConfig.isEdit || !this.view) return;
var selectType = info.asc_getFlags().asc_getSelectionType(), var pivotInfo = info.asc_getPivotTableInfo();
pivotInfo = info.asc_getPivotTableInfo();
Common.Utils.lockControls(SSE.enumLock.noPivot, !pivotInfo, {array: this.view.lockedControls}); Common.Utils.lockControls(SSE.enumLock.noPivot, !pivotInfo, {array: this.view.lockedControls});
Common.Utils.lockControls(SSE.enumLock.editPivot, !!pivotInfo, {array: [this.view.btnAddPivot]}); Common.Utils.lockControls(SSE.enumLock.editPivot, !!pivotInfo, {array: [this.view.btnAddPivot]});

View file

@ -133,7 +133,7 @@ define([
if (this.rangeSelectionMode) return; if (this.rangeSelectionMode) return;
var SelectedObjects = [], var SelectedObjects = [],
selectType = info.asc_getFlags().asc_getSelectionType(), selectType = info.asc_getSelectionType(),
formatTableInfo = info.asc_getFormatTableInfo(), formatTableInfo = info.asc_getFormatTableInfo(),
sparkLineInfo = info.asc_getSparklineInfo(), sparkLineInfo = info.asc_getSparklineInfo(),
cellInfo = info, cellInfo = info,

View file

@ -750,7 +750,7 @@ define([
} }
if (me.api) { if (me.api) {
var merged = me.api.asc_getCellInfo().asc_getFlags().asc_getMerge(); var merged = me.api.asc_getCellInfo().asc_getMerge();
if ((merged !== Asc.c_oAscMergeOptions.Merge) && me.api.asc_mergeCellsDataLost(item.value)) { if ((merged !== Asc.c_oAscMergeOptions.Merge) && me.api.asc_mergeCellsDataLost(item.value)) {
Common.UI.warning({ Common.UI.warning({
msg: me.warnMergeLostData, msg: me.warnMergeLostData,
@ -785,7 +785,7 @@ define([
}, },
onTextOrientationMenu: function(menu, item) { onTextOrientationMenu: function(menu, item) {
if (this.api.asc_getCellInfo().asc_getFlags().asc_getSelectionType() == Asc.c_oAscSelectionType.RangeShapeText) { if (this.api.asc_getCellInfo().asc_getSelectionType() == Asc.c_oAscSelectionType.RangeShapeText) {
var angle = Asc.c_oAscVertDrawingText.normal; var angle = Asc.c_oAscVertDrawingText.normal;
switch (item.value) { switch (item.value) {
case 'rotateup': angle = Asc.c_oAscVertDrawingText.vert270; break; case 'rotateup': angle = Asc.c_oAscVertDrawingText.vert270; break;
@ -908,7 +908,7 @@ define([
}; };
var cell = me.api.asc_getCellInfo(), var cell = me.api.asc_getCellInfo(),
seltype = cell.asc_getFlags().asc_getSelectionType(); seltype = cell.asc_getSelectionType();
props = cell.asc_getHyperlink(); props = cell.asc_getHyperlink();
win = new SSE.Views.HyperlinkSettingsDialog({ win = new SSE.Views.HyperlinkSettingsDialog({
api: me.api, api: me.api,
@ -923,7 +923,7 @@ define([
currentSheet: me.api.asc_getWorksheetName(me.api.asc_getActiveWorksheetIndex()), currentSheet: me.api.asc_getWorksheetName(me.api.asc_getActiveWorksheetIndex()),
props : props, props : props,
text : cell.asc_getText(), text : cell.asc_getText(),
isLock : cell.asc_getFlags().asc_getLockText(), isLock : cell.asc_getLockText(),
allowInternal: (seltype!==Asc.c_oAscSelectionType.RangeImage && seltype!==Asc.c_oAscSelectionType.RangeShape && allowInternal: (seltype!==Asc.c_oAscSelectionType.RangeImage && seltype!==Asc.c_oAscSelectionType.RangeShape &&
seltype!==Asc.c_oAscSelectionType.RangeShapeText && seltype!==Asc.c_oAscSelectionType.RangeChart && seltype!==Asc.c_oAscSelectionType.RangeShapeText && seltype!==Asc.c_oAscSelectionType.RangeChart &&
seltype!==Asc.c_oAscSelectionType.RangeChartText) seltype!==Asc.c_oAscSelectionType.RangeChartText)
@ -936,7 +936,8 @@ define([
onEditChart: function(btn) { onEditChart: function(btn) {
if (!this.editMode) return; if (!this.editMode) return;
var me = this, info = me.api.asc_getCellInfo(); var me = this, info = me.api.asc_getCellInfo();
if (info.asc_getFlags().asc_getSelectionType()!=Asc.c_oAscSelectionType.RangeImage) { var selectType = info.asc_getSelectionType();
if (selectType !== Asc.c_oAscSelectionType.RangeImage) {
var win, props; var win, props;
if (me.api){ if (me.api){
props = me.api.asc_getChartObject(); props = me.api.asc_getChartObject();
@ -950,7 +951,7 @@ define([
} }
} }
if (props) { if (props) {
var ischartedit = ( me.toolbar.mode.isEditDiagram || info.asc_getFlags().asc_getSelectionType() == Asc.c_oAscSelectionType.RangeChart || info.asc_getFlags().asc_getSelectionType() == Asc.c_oAscSelectionType.RangeChartText); var ischartedit = ( me.toolbar.mode.isEditDiagram || selectType === Asc.c_oAscSelectionType.RangeChart || selectType === Asc.c_oAscSelectionType.RangeChartText);
(new SSE.Views.ChartSettingsDlg( (new SSE.Views.ChartSettingsDlg(
{ {
@ -978,7 +979,7 @@ define([
if (!this.editMode) return; if (!this.editMode) return;
var me = this, var me = this,
info = me.api.asc_getCellInfo(), info = me.api.asc_getCellInfo(),
seltype = info.asc_getFlags().asc_getSelectionType(), seltype = info.asc_getSelectionType(),
isSpark = (group == 'menu-chart-group-sparkcolumn' || group == 'menu-chart-group-sparkline' || group == 'menu-chart-group-sparkwin'); isSpark = (group == 'menu-chart-group-sparkcolumn' || group == 'menu-chart-group-sparkline' || group == 'menu-chart-group-sparkwin');
if (me.api) { if (me.api) {
@ -1527,7 +1528,7 @@ define([
if (me.editMode && !me.toolbar.mode.isEditMailMerge && !me.toolbar.mode.isEditDiagram && !me.api.isCellEdited && !me._state.multiselect && !me._state.inpivot && if (me.editMode && !me.toolbar.mode.isEditMailMerge && !me.toolbar.mode.isEditDiagram && !me.api.isCellEdited && !me._state.multiselect && !me._state.inpivot &&
!me.getApplication().getController('LeftMenu').leftMenu.menuFile.isVisible()) { !me.getApplication().getController('LeftMenu').leftMenu.menuFile.isVisible()) {
var cellinfo = me.api.asc_getCellInfo(), var cellinfo = me.api.asc_getCellInfo(),
selectionType = cellinfo.asc_getFlags().asc_getSelectionType(); selectionType = cellinfo.asc_getSelectionType();
if (selectionType !== Asc.c_oAscSelectionType.RangeShapeText || me.api.asc_canAddShapeHyperlink()!==false) if (selectionType !== Asc.c_oAscSelectionType.RangeShapeText || me.api.asc_canAddShapeHyperlink()!==false)
me.onHyperlink(); me.onHyperlink();
} }
@ -2069,7 +2070,7 @@ define([
if ( this.toolbar.mode.isEditMailMerge ) if ( this.toolbar.mode.isEditMailMerge )
return this.onApiSelectionChanged_MailMergeEditor(info); return this.onApiSelectionChanged_MailMergeEditor(info);
var selectionType = info.asc_getFlags().asc_getSelectionType(), var selectionType = info.asc_getSelectionType(),
coauth_disable = (!this.toolbar.mode.isEditMailMerge && !this.toolbar.mode.isEditDiagram) ? (info.asc_getLocked()===true || info.asc_getLockedTable()===true || info.asc_getLockedPivotTable()===true) : false, coauth_disable = (!this.toolbar.mode.isEditMailMerge && !this.toolbar.mode.isEditDiagram) ? (info.asc_getLocked()===true || info.asc_getLockedTable()===true || info.asc_getLockedPivotTable()===true) : false,
editOptionsDisabled = this._disableEditOptions(selectionType, coauth_disable), editOptionsDisabled = this._disableEditOptions(selectionType, coauth_disable),
me = this, me = this,
@ -2311,7 +2312,7 @@ define([
// (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.btnInsertTable]}); toolbar.lockToolbar(SSE.enumLock.ruleMerge, need_disable, {array:[toolbar.btnMerge, toolbar.btnInsertTable]});
val = info.asc_getFlags().asc_getMerge(); val = info.asc_getMerge();
if (this._state.merge !== val) { if (this._state.merge !== val) {
toolbar.btnMerge.toggle(val===Asc.c_oAscMergeOptions.Merge, true); toolbar.btnMerge.toggle(val===Asc.c_oAscMergeOptions.Merge, true);
this._state.merge = val; this._state.merge = val;
@ -2319,7 +2320,7 @@ define([
/* read cell text wrapping */ /* read cell text wrapping */
if (!toolbar.btnWrap.isDisabled()) { if (!toolbar.btnWrap.isDisabled()) {
val = info.asc_getFlags().asc_getWrapText(); val = info.asc_getWrapText();
if (this._state.wrap !== val) { if (this._state.wrap !== val) {
toolbar.btnWrap.toggle(val===true, true); toolbar.btnWrap.toggle(val===true, true);
this._state.wrap = val; this._state.wrap = val;
@ -2360,7 +2361,7 @@ define([
if (this._state.tablename !== old_name || this._state.filterapplied !== old_applied) if (this._state.tablename !== old_name || this._state.filterapplied !== old_applied)
this.getApplication().getController('Statusbar').onApiFilterInfo(!need_disable); this.getApplication().getController('Statusbar').onApiFilterInfo(!need_disable);
this._state.multiselect = info.asc_getFlags().asc_getMultiselect(); this._state.multiselect = info.asc_getMultiselect();
toolbar.lockToolbar(SSE.enumLock.multiselect, this._state.multiselect, { array: [toolbar.btnTableTemplate, toolbar.btnInsertHyperlink, toolbar.btnInsertTable]}); toolbar.lockToolbar(SSE.enumLock.multiselect, this._state.multiselect, { array: [toolbar.btnTableTemplate, toolbar.btnInsertHyperlink, toolbar.btnInsertTable]});
this._state.inpivot = !!info.asc_getPivotTableInfo(); this._state.inpivot = !!info.asc_getPivotTableInfo();
@ -2447,7 +2448,7 @@ define([
}, },
onApiSelectionChangedRestricted: function(info) { onApiSelectionChangedRestricted: function(info) {
var selectionType = info.asc_getFlags().asc_getSelectionType(); var selectionType = info.asc_getSelectionType();
this.toolbar.lockToolbar(SSE.enumLock.commentLock, (selectionType == Asc.c_oAscSelectionType.RangeCells) && (info.asc_getComments().length>0 || info.asc_getLocked()) || this.toolbar.lockToolbar(SSE.enumLock.commentLock, (selectionType == Asc.c_oAscSelectionType.RangeCells) && (info.asc_getComments().length>0 || info.asc_getLocked()) ||
this.appConfig && this.appConfig.compatibleFeatures && (selectionType != Asc.c_oAscSelectionType.RangeCells), this.appConfig && this.appConfig.compatibleFeatures && (selectionType != Asc.c_oAscSelectionType.RangeCells),
{ array: this.btnsComment }); { array: this.btnsComment });
@ -2497,7 +2498,7 @@ define([
return is_image; return is_image;
}; };
var selectionType = info.asc_getFlags().asc_getSelectionType(), var selectionType = info.asc_getSelectionType(),
coauth_disable = false; coauth_disable = false;
if ( _disableEditOptions(selectionType, coauth_disable) ) return; if ( _disableEditOptions(selectionType, coauth_disable) ) return;
@ -2547,7 +2548,7 @@ define([
return is_image; return is_image;
}; };
var selectionType = info.asc_getFlags().asc_getSelectionType(), var selectionType = info.asc_getSelectionType(),
coauth_disable = false, coauth_disable = false,
editOptionsDisabled = _disableEditOptions(selectionType, coauth_disable), editOptionsDisabled = _disableEditOptions(selectionType, coauth_disable),
val, need_disable = false; val, need_disable = false;
@ -3073,14 +3074,14 @@ define([
win.show(); win.show();
win.setSettings({ win.setSettings({
api : me.api, api : me.api,
selectionType: me.api.asc_getCellInfo().asc_getFlags().asc_getSelectionType() selectionType: me.api.asc_getCellInfo().asc_getSelectionType()
}); });
} else { } else {
me._state.filter = undefined; me._state.filter = undefined;
if (me._state.tablename) if (me._state.tablename)
me.api.asc_changeAutoFilter(me._state.tablename, Asc.c_oAscChangeFilterOptions.style, fmtname); me.api.asc_changeAutoFilter(me._state.tablename, Asc.c_oAscChangeFilterOptions.style, fmtname);
else { else {
var selectionType = me.api.asc_getCellInfo().asc_getFlags().asc_getSelectionType(); var selectionType = me.api.asc_getCellInfo().asc_getSelectionType();
if (selectionType == Asc.c_oAscSelectionType.RangeMax || selectionType == Asc.c_oAscSelectionType.RangeRow || if (selectionType == Asc.c_oAscSelectionType.RangeMax || selectionType == Asc.c_oAscSelectionType.RangeRow ||
selectionType == Asc.c_oAscSelectionType.RangeCol) selectionType == Asc.c_oAscSelectionType.RangeCol)
Common.UI.warning({ Common.UI.warning({
@ -3289,7 +3290,7 @@ define([
this.btnsComment.forEach(function (btn) { this.btnsComment.forEach(function (btn) {
btn.updateHint( _comments.textHintAddComment ); btn.updateHint( _comments.textHintAddComment );
btn.on('click', function (btn, e) { btn.on('click', function (btn, e) {
Common.NotificationCenter.trigger('app:comment:add', 'toolbar', me.api.asc_getCellInfo().asc_getFlags().asc_getSelectionType() != Asc.c_oAscSelectionType.RangeCells); Common.NotificationCenter.trigger('app:comment:add', 'toolbar', me.api.asc_getCellInfo().asc_getSelectionType() != Asc.c_oAscSelectionType.RangeCells);
}); });
if (btn.cmpEl.closest('#review-changes-panel').length>0) if (btn.cmpEl.closest('#review-changes-panel').length>0)
btn.setCaption(me.toolbar.capBtnAddComment); btn.setCaption(me.toolbar.capBtnAddComment);

View file

@ -219,10 +219,10 @@ define([
me.api.asc_mergeCells(Asc.c_oAscMergeOptions.None); me.api.asc_mergeCells(Asc.c_oAscMergeOptions.None);
break; break;
case 'hide': case 'hide':
me.api[info.asc_getFlags().asc_getSelectionType() == Asc.c_oAscSelectionType.RangeRow ? 'asc_hideRows' : 'asc_hideColumns'](); me.api[info.asc_getSelectionType() == Asc.c_oAscSelectionType.RangeRow ? 'asc_hideRows' : 'asc_hideColumns']();
break; break;
case 'show': case 'show':
me.api[info.asc_getFlags().asc_getSelectionType() == Asc.c_oAscSelectionType.RangeRow ? 'asc_showRows' : 'asc_showColumns'](); me.api[info.asc_getSelectionType() == Asc.c_oAscSelectionType.RangeRow ? 'asc_showRows' : 'asc_showColumns']();
break; break;
case 'addlink': case 'addlink':
me.view.hideMenu(); me.view.hideMenu();
@ -311,7 +311,7 @@ define([
var iscellmenu, isrowmenu, iscolmenu, isallmenu, ischartmenu, isimagemenu, istextshapemenu, isshapemenu, istextchartmenu; var iscellmenu, isrowmenu, iscolmenu, isallmenu, ischartmenu, isimagemenu, istextshapemenu, isshapemenu, istextchartmenu;
var iscelllocked = cellinfo.asc_getLocked(), var iscelllocked = cellinfo.asc_getLocked(),
seltype = cellinfo.asc_getFlags().asc_getSelectionType(); seltype = cellinfo.asc_getSelectionType();
switch (seltype) { switch (seltype) {
case Asc.c_oAscSelectionType.RangeCells: iscellmenu = true; break; case Asc.c_oAscSelectionType.RangeCells: iscellmenu = true; break;
@ -407,20 +407,20 @@ define([
event: 'edit' event: 'edit'
}); });
(cellinfo.asc_getFlags().asc_getMerge() == Asc.c_oAscMergeOptions.None) && (cellinfo.asc_getMerge() == Asc.c_oAscMergeOptions.None) &&
arrItems.push({ arrItems.push({
caption: me.menuMerge, caption: me.menuMerge,
event: 'merge' event: 'merge'
}); });
(cellinfo.asc_getFlags().asc_getMerge() == Asc.c_oAscMergeOptions.Merge) && (cellinfo.asc_getMerge() == Asc.c_oAscMergeOptions.Merge) &&
arrItems.push({ arrItems.push({
caption: me.menuUnmerge, caption: me.menuUnmerge,
event: 'unmerge' event: 'unmerge'
}); });
arrItems.push( arrItems.push(
cellinfo.asc_getFlags().asc_getWrapText() ? cellinfo.asc_getWrapText() ?
{ {
caption: me.menuUnwrap, caption: me.menuUnwrap,
event: 'unwrap' event: 'unwrap'
@ -430,13 +430,13 @@ define([
event: 'wrap' event: 'wrap'
}); });
if (cellinfo.asc_getHyperlink() && !cellinfo.asc_getFlags().asc_getMultiselect()) { if (cellinfo.asc_getHyperlink() && !cellinfo.asc_getMultiselect()) {
arrItems.push({ arrItems.push({
caption: me.menuOpenLink, caption: me.menuOpenLink,
event: 'openlink' event: 'openlink'
}); });
} else if (!cellinfo.asc_getHyperlink() && !cellinfo.asc_getFlags().asc_getMultiselect() && } else if (!cellinfo.asc_getHyperlink() && !cellinfo.asc_getMultiselect() &&
!cellinfo.asc_getFlags().asc_getLockText() && !!cellinfo.asc_getText()) { !cellinfo.asc_getLockText() && !!cellinfo.asc_getText()) {
arrItems.push({ arrItems.push({
caption: me.menuAddLink, caption: me.menuAddLink,
event: 'addlink' event: 'addlink'

View file

@ -176,7 +176,7 @@ define([
if ( !info ) info = this.api.asc_getCellInfo(); if ( !info ) info = this.api.asc_getCellInfo();
var islocked = false; var islocked = false;
switch (info.asc_getFlags().asc_getSelectionType()) { switch (info.asc_getSelectionType()) {
case Asc.c_oAscSelectionType.RangeChart: case Asc.c_oAscSelectionType.RangeChart:
case Asc.c_oAscSelectionType.RangeImage: case Asc.c_oAscSelectionType.RangeImage:
case Asc.c_oAscSelectionType.RangeShape: case Asc.c_oAscSelectionType.RangeShape:

View file

@ -82,7 +82,7 @@ define([
var cellinfo = me.api.asc_getCellInfo(); var cellinfo = me.api.asc_getCellInfo();
var iscellmenu, isrowmenu, iscolmenu, isallmenu, ischartmenu, isimagemenu, istextshapemenu, isshapemenu, istextchartmenu, var iscellmenu, isrowmenu, iscolmenu, isallmenu, ischartmenu, isimagemenu, istextshapemenu, isshapemenu, istextchartmenu,
seltype = cellinfo.asc_getFlags().asc_getSelectionType(), seltype = cellinfo.asc_getSelectionType(),
iscelllocked = cellinfo.asc_getLocked(), iscelllocked = cellinfo.asc_getLocked(),
isTableLocked = cellinfo.asc_getLockedTable()===true; isTableLocked = cellinfo.asc_getLockedTable()===true;
@ -123,7 +123,7 @@ define([
var me = this, var me = this,
addViews = []; addViews = [];
// var seltype = this.api.asc_getCellInfo().asc_getFlags().asc_getSelectionType(); // var seltype = this.api.asc_getCellInfo().asc_getSelectionType();
if ( !options ) if ( !options )
addViews.push({ addViews.push({

View file

@ -71,12 +71,12 @@ define([
var _view = view || this.getView(); var _view = view || this.getView();
var cell = this.api.asc_getCellInfo(), var cell = this.api.asc_getCellInfo(),
celltype = cell.asc_getFlags().asc_getSelectionType(); celltype = cell.asc_getSelectionType();
var allowinternal = (celltype!==Asc.c_oAscSelectionType.RangeImage && celltype!==Asc.c_oAscSelectionType.RangeShape && var allowinternal = (celltype!==Asc.c_oAscSelectionType.RangeImage && celltype!==Asc.c_oAscSelectionType.RangeShape &&
celltype!==Asc.c_oAscSelectionType.RangeShapeText && celltype!==Asc.c_oAscSelectionType.RangeChart && celltype!==Asc.c_oAscSelectionType.RangeShapeText && celltype!==Asc.c_oAscSelectionType.RangeChart &&
celltype!==Asc.c_oAscSelectionType.RangeChartText); celltype!==Asc.c_oAscSelectionType.RangeChartText);
_view.optionDisplayText(cell.asc_getFlags().asc_getLockText() ? 'locked' : cell.asc_getText()); _view.optionDisplayText(cell.asc_getLockText() ? 'locked' : cell.asc_getText());
_view.optionAllowInternal(allowinternal); _view.optionAllowInternal(allowinternal);
allowinternal && _view.optionLinkType( cfgLink.type ); allowinternal && _view.optionLinkType( cfgLink.type );
} }
@ -158,12 +158,12 @@ define([
view.showPage(rootView, navbar); view.showPage(rootView, navbar);
var cell = me.api.asc_getCellInfo(), var cell = me.api.asc_getCellInfo(),
celltype = cell.asc_getFlags().asc_getSelectionType(); celltype = cell.asc_getSelectionType();
var allowinternal = (celltype!==Asc.c_oAscSelectionType.RangeImage && celltype!==Asc.c_oAscSelectionType.RangeShape && var allowinternal = (celltype!==Asc.c_oAscSelectionType.RangeImage && celltype!==Asc.c_oAscSelectionType.RangeShape &&
celltype!==Asc.c_oAscSelectionType.RangeShapeText && celltype!==Asc.c_oAscSelectionType.RangeChart && celltype!==Asc.c_oAscSelectionType.RangeShapeText && celltype!==Asc.c_oAscSelectionType.RangeChart &&
celltype!==Asc.c_oAscSelectionType.RangeChartText); celltype!==Asc.c_oAscSelectionType.RangeChartText);
view.optionDisplayText(cell.asc_getFlags().asc_getLockText() ? 'locked' : cell.asc_getText()); view.optionDisplayText(cell.asc_getLockText() ? 'locked' : cell.asc_getText());
view.optionAllowInternal(allowinternal); view.optionAllowInternal(allowinternal);
allowinternal && view.optionLinkType( cfgLink.type ); allowinternal && view.optionLinkType( cfgLink.type );

View file

@ -98,7 +98,7 @@ define([
isHideInsertComment: function() { isHideInsertComment: function() {
var cellinfo = this.api.asc_getCellInfo(); var cellinfo = this.api.asc_getCellInfo();
var iscelllocked = cellinfo.asc_getLocked(), var iscelllocked = cellinfo.asc_getLocked(),
seltype = cellinfo.asc_getFlags().asc_getSelectionType(); seltype = cellinfo.asc_getSelectionType();
if (seltype === Asc.c_oAscSelectionType.RangeCells && !iscelllocked) { if (seltype === Asc.c_oAscSelectionType.RangeCells && !iscelllocked) {
return false; return false;
} }

View file

@ -219,7 +219,7 @@ define([
vAlign = me._cellInfo.asc_getVertAlign(), vAlign = me._cellInfo.asc_getVertAlign(),
hAlignStr = 'left', hAlignStr = 'left',
vAlignStr = 'bottom', vAlignStr = 'bottom',
isWrapText = me._cellInfo.asc_getFlags().asc_getWrapText(); isWrapText = me._cellInfo.asc_getWrapText();
if (vAlign == Asc.c_oAscVAlign.Top) if (vAlign == Asc.c_oAscVAlign.Top)
vAlignStr = 'top'; vAlignStr = 'top';
@ -316,7 +316,7 @@ define([
} }
var me = this, var me = this,
selectionType = cellInfo.asc_getFlags().asc_getSelectionType(), selectionType = cellInfo.asc_getSelectionType(),
// coAuthDisable = (!this.toolbar.mode.isEditMailMerge && !this.toolbar.mode.isEditDiagram) ? (cellInfo.asc_getLocked()===true || cellInfo.asc_getLockedTable()===true) : false, // coAuthDisable = (!this.toolbar.mode.isEditMailMerge && !this.toolbar.mode.isEditDiagram) ? (cellInfo.asc_getLocked()===true || cellInfo.asc_getLockedTable()===true) : false,
// editOptionsDisabled = this._disableEditOptions(selectionType, coAuthDisable), // editOptionsDisabled = this._disableEditOptions(selectionType, coAuthDisable),
_fontInfo = cellInfo.asc_getFont(), _fontInfo = cellInfo.asc_getFont(),

View file

@ -378,7 +378,7 @@ define([
_settings = []; _settings = [];
var isCell, isRow, isCol, isAll, isChart, isImage, isTextShape, isShape, isTextChart, var isCell, isRow, isCol, isAll, isChart, isImage, isTextShape, isShape, isTextChart,
selType = cellInfo.asc_getFlags().asc_getSelectionType(), selType = cellInfo.asc_getSelectionType(),
isCellLocked = cellInfo.asc_getLocked(), isCellLocked = cellInfo.asc_getLocked(),
isTableLocked = cellInfo.asc_getLockedTable()===true, isTableLocked = cellInfo.asc_getLockedTable()===true,
isObjLocked = false; isObjLocked = false;
@ -495,7 +495,7 @@ define([
// formatTableInfo = cellInfo.asc_getFormatTableInfo(), // formatTableInfo = cellInfo.asc_getFormatTableInfo(),
// isinsparkline = (cellInfo.asc_getSparklineInfo()!==null), // isinsparkline = (cellInfo.asc_getSparklineInfo()!==null),
// isintable = (formatTableInfo !== null), // isintable = (formatTableInfo !== null),
// ismultiselect = cellInfo.asc_getFlags().asc_getMultiselect(); // ismultiselect = cellInfo.asc_getMultiselect();
// documentHolder.ssMenu.formatTableName = (isintable) ? formatTableInfo.asc_getTableName() : null; // documentHolder.ssMenu.formatTableName = (isintable) ? formatTableInfo.asc_getTableName() : null;
// documentHolder.ssMenu.cellColor = cellInfo.asc_getFill().asc_getColor(); // documentHolder.ssMenu.cellColor = cellInfo.asc_getFill().asc_getColor();
// documentHolder.ssMenu.fontColor = cellInfo.asc_getFont().asc_getColor(); // documentHolder.ssMenu.fontColor = cellInfo.asc_getFont().asc_getColor();

View file

@ -133,7 +133,7 @@ define([
var cellInfo = me.api.asc_getCellInfo(), var cellInfo = me.api.asc_getCellInfo(),
linkInfo = cellInfo.asc_getHyperlink(), linkInfo = cellInfo.asc_getHyperlink(),
isLock = cellInfo.asc_getFlags().asc_getLockText(); isLock = cellInfo.asc_getLockText();
me.linkType = linkInfo.asc_getType(); me.linkType = linkInfo.asc_getType();
$('#edit-link-type .item-after').text((me.linkType == Asc.c_oAscHyperlinkType.RangeLink) ? me.textInternalLink : me.textExternalLink); $('#edit-link-type .item-after').text((me.linkType == Asc.c_oAscHyperlinkType.RangeLink) ? me.textInternalLink : me.textExternalLink);

View file

@ -226,7 +226,7 @@ define([
var me = this, var me = this,
selectedObjects = [], selectedObjects = [],
selectType = info.asc_getFlags().asc_getSelectionType(); selectType = info.asc_getSelectionType();
if (selectType == Asc.c_oAscSelectionType.RangeImage) { if (selectType == Asc.c_oAscSelectionType.RangeImage) {
selectedObjects = me.api.asc_getGraphicObjectProps(); selectedObjects = me.api.asc_getGraphicObjectProps();

View file

@ -361,7 +361,7 @@ define([
var me = this, var me = this,
selectedObjects = [], selectedObjects = [],
selectType = info.asc_getFlags().asc_getSelectionType(); selectType = info.asc_getSelectionType();
if (selectType == Asc.c_oAscSelectionType.RangeShape) { if (selectType == Asc.c_oAscSelectionType.RangeShape) {
selectedObjects = me.api.asc_getGraphicObjectProps(); selectedObjects = me.api.asc_getGraphicObjectProps();

View file

@ -324,7 +324,7 @@ define([
_cellInfo = info; _cellInfo = info;
_fontInfo = info.asc_getFont(); _fontInfo = info.asc_getFont();
var selectType = info.asc_getFlags().asc_getSelectionType(); var selectType = info.asc_getSelectionType();
switch (selectType) { switch (selectType) {
case Asc.c_oAscSelectionType.RangeChartText: _textIn = TextType.inChart; break; case Asc.c_oAscSelectionType.RangeChartText: _textIn = TextType.inChart; break;