Commit e9fb7600 authored by Alexander.Trofimov's avatar Alexander.Trofimov

delete arguments from function _onWSSelectionChanged

parent 372d188e
......@@ -1155,7 +1155,7 @@ var editor;
if (t.wb) {
// Шлем update для toolbar-а, т.к. когда select в lock ячейке нужно заблокировать toolbar
t.wb._onWSSelectionChanged(/*info*/null);
t.wb._onWSSelectionChanged();
// Шлем update для листов
t._onUpdateSheetsLock(lockElem);
......@@ -1245,7 +1245,7 @@ var editor;
if (t.wb) {
// Шлем update для toolbar-а, т.к. когда select в lock ячейке нужно сбросить блокировку toolbar
t.wb._onWSSelectionChanged(/*info*/null);
t.wb._onWSSelectionChanged();
var worksheet = t.wb.getWorksheet();
worksheet.cleanSelection();
......@@ -1334,7 +1334,7 @@ var editor;
// Нужно послать 'обновить свойства' (иначе для удаления данных не обновится строка формул).
// ToDo Возможно стоит обновлять только строку формул
AscCommon.CollaborativeEditing.Load_Images();
this.wb._onWSSelectionChanged(null);
this.wb._onWSSelectionChanged();
this.wb.getWorksheet().updateVisibleRange();
}
};
......@@ -1521,7 +1521,7 @@ var editor;
if (t.collaborativeEditing.getCollaborativeEditing()) {
// Шлем update для toolbar-а, т.к. когда select в lock ячейке нужно заблокировать toolbar
t.wb._onWSSelectionChanged(/*info*/null);
t.wb._onWSSelectionChanged();
}
t.canSave = true;
......@@ -3023,7 +3023,7 @@ var editor;
// Пересылаем свои изменения (просто стираем чужие lock-и, т.к. своих изменений нет)
this.collaborativeEditing.sendChanges();
// Шлем update для toolbar-а, т.к. когда select в lock ячейке нужно заблокировать toolbar
this.wb._onWSSelectionChanged(/*info*/null);
this.wb._onWSSelectionChanged();
}
return;
}
......
......@@ -3596,7 +3596,7 @@ function OfflineEditor () {
if (!this.isSelectionDialogMode) {
this.handlers.trigger("selectionNameChanged", this.getSelectionName(/*bRangeText*/true));
if (!isSelectMode) {
this.handlers.trigger("selectionChanged", this.getSelectionInfo());
this.handlers.trigger("selectionChanged");
this.handlers.trigger("selectionMathInfoChanged", this.getSelectionMathInfo());
}
} else {
......@@ -5865,7 +5865,7 @@ function offline_cell_editor_close(x, y, width, height, ratio) {
console.log("cellEditor.close();");
}
_api.wb._onWSSelectionChanged(null);
_api.wb._onWSSelectionChanged();
return {'undo': length};
}
......@@ -6970,7 +6970,7 @@ function offline_apply_event(type,params) {
{
var filter = asc_ReadAutoFilter(params, _current);
_api.asc_addAutoFilter(filter.styleName, filter.format);
_api.wb.getWorksheet().handlers.trigger('selectionChanged', _api.wb.getWorksheet().getSelectionInfo());
_api.wb.getWorksheet().handlers.trigger('selectionChanged');
break;
}
......@@ -6983,7 +6983,7 @@ function offline_apply_event(type,params) {
}
_api.asc_changeAutoFilter(changeFilter.tableName, changeFilter.optionType, changeFilter.styleName);
_api.wb.getWorksheet().handlers.trigger('selectionChanged', _api.wb.getWorksheet().getSelectionInfo());
_api.wb.getWorksheet().handlers.trigger('selectionChanged');
break;
}
......
......@@ -655,7 +655,7 @@
}, "reinitializeScrollX": function() {
self.controller.reinitializeScroll(/*horizontal*/2);
}, "selectionChanged": function() {
self._onWSSelectionChanged.apply(self, arguments);
self._onWSSelectionChanged();
}, "selectionNameChanged": function() {
self._onSelectionNameChanged.apply(self, arguments);
}, "selectionMathInfoChanged": function() {
......@@ -847,18 +847,14 @@
return this.lastSendInfoRange.isEqual(range) && this.lastSendInfoRangeIsSelectOnShape === isSelectOnShape;
};
WorkbookView.prototype._updateSelectionInfo = function (info) {
WorkbookView.prototype._updateSelectionInfo = function () {
var ws = this.cellFormulaEnterWSOpen ? this.cellFormulaEnterWSOpen : this.getWorksheet();
this.oSelectionInfo = ws.getSelectionInfo();
this.lastSendInfoRange = ws.model.selectionRange.getLast().clone(true);
this.lastSendInfoRangeIsSelectOnShape = ws.getSelectionShape();
if (null === info) {
info = ws.getSelectionInfo();
}
this.oSelectionInfo = info;
};
WorkbookView.prototype._onWSSelectionChanged = function(info) {
this._updateSelectionInfo(info);
WorkbookView.prototype._onWSSelectionChanged = function() {
this._updateSelectionInfo();
// При редактировании ячейки не нужно пересылать изменения
if (this.input && false === this.getCellEditMode() && c_oAscSelectionDialogType.None === this.selectionDialogType) {
......@@ -960,7 +956,7 @@
var ar = ws.model.selectionRange.getLast();
var isSelectOnShape = ws.getSelectionShape();
if (!this._isEqualRange(ar, isSelectOnShape)) {
this._onWSSelectionChanged(ws.getSelectionInfo());
this._onWSSelectionChanged();
this._onSelectionMathInfoChanged(ws.getSelectionMathInfo());
}
......@@ -1334,7 +1330,7 @@
// Выключаем lock для редактирования ячейки
t.collaborativeEditing.onStopEditCell();
t.cellEditor.close(false);
t._onWSSelectionChanged(null);
t._onWSSelectionChanged();
}
};
......@@ -1385,7 +1381,7 @@
// Обновляем состояние Undo/Redo
History._sendCanUndoRedo();
// Обновляем состояние информации
this._onWSSelectionChanged(null);
this._onWSSelectionChanged();
// Закрываем подбор формулы
if (-1 !== this.lastFormulaPos) {
......@@ -1617,7 +1613,7 @@
if (isSendInfo) {
this._onSelectionNameChanged(ws.getSelectionName(/*bRangeText*/false));
this._onWSSelectionChanged(ws.getSelectionInfo());
this._onWSSelectionChanged();
this._onSelectionMathInfoChanged(ws.getSelectionMathInfo());
}
this.controller.reinitializeScroll();
......
......@@ -7239,9 +7239,9 @@
};
WorksheetView.prototype._updateSelectionNameAndInfo = function () {
this.handlers.trigger( "selectionNameChanged", this.getSelectionName( /*bRangeText*/false ) );
this.handlers.trigger( "selectionChanged", this.getSelectionInfo() );
this.handlers.trigger( "selectionMathInfoChanged", this.getSelectionMathInfo() );
this.handlers.trigger("selectionNameChanged", this.getSelectionName(/*bRangeText*/false));
this.handlers.trigger("selectionChanged");
this.handlers.trigger("selectionMathInfoChanged", this.getSelectionMathInfo());
};
WorksheetView.prototype.getSelectionShape = function () {
......@@ -7368,7 +7368,7 @@
if (isChangeSelectionShape || !this.model.selectionRange.isEqual(ar)) {
this.handlers.trigger("selectionNameChanged", this.getSelectionName(/*bRangeText*/false));
if (!isSelectMode) {
this.handlers.trigger("selectionChanged", this.getSelectionInfo());
this.handlers.trigger("selectionChanged");
this.handlers.trigger("selectionMathInfoChanged", this.getSelectionMathInfo());
}
}
......@@ -7489,7 +7489,7 @@
if (!this.isSelectionDialogMode) {
this.handlers.trigger("selectionNameChanged", this.getSelectionName(/*bRangeText*/true));
if (!isSelectMode) {
this.handlers.trigger("selectionChanged", this.getSelectionInfo());
this.handlers.trigger("selectionChanged");
this.handlers.trigger("selectionMathInfoChanged", this.getSelectionMathInfo());
}
} else {
......@@ -7530,7 +7530,7 @@
// Эвент обновления
this.handlers.trigger("selectionNameChanged", this.getSelectionName(/*bRangeText*/false));
this.handlers.trigger("selectionChanged", this.getSelectionInfo());
this.handlers.trigger("selectionChanged");
return ret;
};
......@@ -9893,7 +9893,7 @@
t._updateVisibleRowsCount();
}
t.handlers.trigger("selectionChanged", t.getSelectionInfo());
t.handlers.trigger("selectionChanged");
t.handlers.trigger("selectionMathInfoChanged", t.getSelectionMathInfo());
};
......@@ -11429,7 +11429,7 @@
if (false === isSuccess) {
t.model.workbook.handlers.trigger("asc_onError", c_oAscError.ID.LockedAllError,
c_oAscError.Level.NoCritical);
t.handlers.trigger("selectionChanged", t.getSelectionInfo());
t.handlers.trigger("selectionChanged");
return;
}
......@@ -11493,7 +11493,7 @@
this._isLockedDefNames(null, null);
} else//для того, чтобы в случае ошибки кнопка отжималась!
{
t.handlers.trigger("selectionChanged", t.getSelectionInfo());
t.handlers.trigger("selectionChanged");
}
};
......@@ -11508,7 +11508,7 @@
var onChangeAutoFilterCallback = function (isSuccess) {
if (false === isSuccess) {
t.handlers.trigger("selectionChanged", t.getSelectionInfo());
t.handlers.trigger("selectionChanged");
return;
}
......@@ -12748,7 +12748,7 @@
if (isChangeTableInfo !== false) {
var callback = function (isSuccess) {
if (false === isSuccess) {
t.handlers.trigger("selectionChanged", t.getSelectionInfo());
t.handlers.trigger("selectionChanged");
return;
}
......
......@@ -3689,9 +3689,10 @@ function DrawingObjects() {
return new AscCommon.asc_CImageSize( 50, 50, false );
};
_this.sendGraphicObjectProps = function() {
if ( worksheet )
worksheet.handlers.trigger("selectionChanged", worksheet.getSelectionInfo());
_this.sendGraphicObjectProps = function () {
if (worksheet) {
worksheet.handlers.trigger("selectionChanged");
}
};
_this.setGraphicObjectProps = function(props) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment