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) {
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;
var is_chart_text = seltype == Asc.c_oAscSelectionType.RangeChartText,

View file

@ -117,7 +117,7 @@ define([
// special disable conditions
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) {

View file

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

View file

@ -529,7 +529,7 @@ define([
},
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;
Common.Gateway.internalMessage('chartDataReady');
}

View file

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

View file

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

View file

@ -750,7 +750,7 @@ define([
}
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)) {
Common.UI.warning({
msg: me.warnMergeLostData,
@ -785,7 +785,7 @@ define([
},
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;
switch (item.value) {
case 'rotateup': angle = Asc.c_oAscVertDrawingText.vert270; break;
@ -908,7 +908,7 @@ define([
};
var cell = me.api.asc_getCellInfo(),
seltype = cell.asc_getFlags().asc_getSelectionType();
seltype = cell.asc_getSelectionType();
props = cell.asc_getHyperlink();
win = new SSE.Views.HyperlinkSettingsDialog({
api: me.api,
@ -923,7 +923,7 @@ define([
currentSheet: me.api.asc_getWorksheetName(me.api.asc_getActiveWorksheetIndex()),
props : props,
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 &&
seltype!==Asc.c_oAscSelectionType.RangeShapeText && seltype!==Asc.c_oAscSelectionType.RangeChart &&
seltype!==Asc.c_oAscSelectionType.RangeChartText)
@ -936,7 +936,8 @@ define([
onEditChart: function(btn) {
if (!this.editMode) return;
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;
if (me.api){
props = me.api.asc_getChartObject();
@ -950,7 +951,7 @@ define([
}
}
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(
{
@ -978,7 +979,7 @@ define([
if (!this.editMode) return;
var me = this,
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');
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 &&
!me.getApplication().getController('LeftMenu').leftMenu.menuFile.isVisible()) {
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)
me.onHyperlink();
}
@ -2069,7 +2070,7 @@ define([
if ( this.toolbar.mode.isEditMailMerge )
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,
editOptionsDisabled = this._disableEditOptions(selectionType, coauth_disable),
me = this,
@ -2311,7 +2312,7 @@ define([
// (need_disable !== toolbar.btnMerge.isDisabled()) && toolbar.btnMerge.setDisabled(need_disable);
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) {
toolbar.btnMerge.toggle(val===Asc.c_oAscMergeOptions.Merge, true);
this._state.merge = val;
@ -2319,7 +2320,7 @@ define([
/* read cell text wrapping */
if (!toolbar.btnWrap.isDisabled()) {
val = info.asc_getFlags().asc_getWrapText();
val = info.asc_getWrapText();
if (this._state.wrap !== val) {
toolbar.btnWrap.toggle(val===true, true);
this._state.wrap = val;
@ -2360,7 +2361,7 @@ define([
if (this._state.tablename !== old_name || this._state.filterapplied !== old_applied)
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]});
this._state.inpivot = !!info.asc_getPivotTableInfo();
@ -2447,7 +2448,7 @@ define([
},
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.appConfig && this.appConfig.compatibleFeatures && (selectionType != Asc.c_oAscSelectionType.RangeCells),
{ array: this.btnsComment });
@ -2497,7 +2498,7 @@ define([
return is_image;
};
var selectionType = info.asc_getFlags().asc_getSelectionType(),
var selectionType = info.asc_getSelectionType(),
coauth_disable = false;
if ( _disableEditOptions(selectionType, coauth_disable) ) return;
@ -2547,7 +2548,7 @@ define([
return is_image;
};
var selectionType = info.asc_getFlags().asc_getSelectionType(),
var selectionType = info.asc_getSelectionType(),
coauth_disable = false,
editOptionsDisabled = _disableEditOptions(selectionType, coauth_disable),
val, need_disable = false;
@ -3073,14 +3074,14 @@ define([
win.show();
win.setSettings({
api : me.api,
selectionType: me.api.asc_getCellInfo().asc_getFlags().asc_getSelectionType()
selectionType: me.api.asc_getCellInfo().asc_getSelectionType()
});
} else {
me._state.filter = undefined;
if (me._state.tablename)
me.api.asc_changeAutoFilter(me._state.tablename, Asc.c_oAscChangeFilterOptions.style, fmtname);
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 ||
selectionType == Asc.c_oAscSelectionType.RangeCol)
Common.UI.warning({
@ -3289,7 +3290,7 @@ define([
this.btnsComment.forEach(function (btn) {
btn.updateHint( _comments.textHintAddComment );
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)
btn.setCaption(me.toolbar.capBtnAddComment);

View file

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

View file

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

View file

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

View file

@ -71,12 +71,12 @@ define([
var _view = view || this.getView();
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 &&
celltype!==Asc.c_oAscSelectionType.RangeShapeText && celltype!==Asc.c_oAscSelectionType.RangeChart &&
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);
allowinternal && _view.optionLinkType( cfgLink.type );
}
@ -158,12 +158,12 @@ define([
view.showPage(rootView, navbar);
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 &&
celltype!==Asc.c_oAscSelectionType.RangeShapeText && celltype!==Asc.c_oAscSelectionType.RangeChart &&
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);
allowinternal && view.optionLinkType( cfgLink.type );

View file

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

View file

@ -219,7 +219,7 @@ define([
vAlign = me._cellInfo.asc_getVertAlign(),
hAlignStr = 'left',
vAlignStr = 'bottom',
isWrapText = me._cellInfo.asc_getFlags().asc_getWrapText();
isWrapText = me._cellInfo.asc_getWrapText();
if (vAlign == Asc.c_oAscVAlign.Top)
vAlignStr = 'top';
@ -316,7 +316,7 @@ define([
}
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,
// editOptionsDisabled = this._disableEditOptions(selectionType, coAuthDisable),
_fontInfo = cellInfo.asc_getFont(),

View file

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

View file

@ -133,7 +133,7 @@ define([
var cellInfo = me.api.asc_getCellInfo(),
linkInfo = cellInfo.asc_getHyperlink(),
isLock = cellInfo.asc_getFlags().asc_getLockText();
isLock = cellInfo.asc_getLockText();
me.linkType = linkInfo.asc_getType();
$('#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,
selectedObjects = [],
selectType = info.asc_getFlags().asc_getSelectionType();
selectType = info.asc_getSelectionType();
if (selectType == Asc.c_oAscSelectionType.RangeImage) {
selectedObjects = me.api.asc_getGraphicObjectProps();

View file

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

View file

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