Commit 435427a2 authored by Alexander.Trofimov's avatar Alexander.Trofimov

in function _onEditCell delete excess arguments

parent acf84ab6
......@@ -5591,7 +5591,7 @@ function offline_cell_editor_open(x, y, width, height, ratio, isSelectAll, isFor
wb.cellEditor.isSelectAll = isSelectAll;
if (!isFormulaInsertMode) {
wb._onEditCell(x, y, true, undefined, undefined, true, false);
wb._onEditCell(undefined, undefined, true, false);
}
ws.visibleRange = range;
}
......
......@@ -704,7 +704,7 @@
// Выставляем блокировку на выход из редактора по клавишам-стрелкам
t.strictClose = true;
// При F2 выставляем фокус в редакторе
t.handlers.trigger("editCell", 0, 0, /*isCoord*/false, /*isFocus*/true, /*isClearCell*/false,
t.handlers.trigger("editCell", /*isFocus*/true, /*isClearCell*/false,
/*isHideCursor*/undefined, /*isQuickInput*/false);
return result;
......@@ -713,7 +713,7 @@
stop();
// При backspace фокус не в редакторе (стираем содержимое)
t.handlers.trigger("editCell", 0, 0, /*isCoord*/false, /*isFocus*/false, /*isClearCell*/true,
t.handlers.trigger("editCell", /*isFocus*/false, /*isClearCell*/true,
/*isHideCursor*/undefined, /*isQuickInput*/false, /*callback*/undefined, event);
return true;
......@@ -1007,7 +1007,7 @@
if (!this.handlers.trigger("getCellEditMode")) {
// При нажатии символа, фокус не ставим
// Очищаем содержимое ячейки
this.handlers.trigger("editCell", 0, 0, /*isCoord*/false, /*isFocus*/false, /*isClearCell*/true,
this.handlers.trigger("editCell", /*isFocus*/false, /*isClearCell*/true,
/*isHideCursor*/undefined, /*isQuickInput*/true, /*callback*/undefined, event);
}
return true;
......
......@@ -448,7 +448,7 @@
self.controller.setStrictClose(true);
self.cellEditor.callTopLineMouseup = true;
if (!self.getCellEditMode() && !self.controller.isFillHandleMode) {
self._onEditCell(0, 0, /*isCoord*/false, /*isFocus*/true);
self._onEditCell(/*isFocus*/true);
}
}, false);
}
......@@ -1203,11 +1203,11 @@
}
// При dbl клике фокус выставляем в зависимости от наличия текста в ячейке
this._onEditCell(x, y, /*isCoord*/true, /*isFocus*/undefined, /*isClearCell*/undefined, /*isHideCursor*/isHideCursor, /*isQuickInput*/false);
this._onEditCell(/*isFocus*/undefined, /*isClearCell*/undefined, /*isHideCursor*/isHideCursor, /*isQuickInput*/false);
}
};
WorkbookView.prototype._onEditCell = function(x, y, isCoord, isFocus, isClearCell, isHideCursor, isQuickInput, callback, event) {
WorkbookView.prototype._onEditCell = function(isFocus, isClearCell, isHideCursor, isQuickInput, callback, event) {
var t = this;
// Проверка глобального лока
......@@ -1216,13 +1216,13 @@
}
var ws = t.getWorksheet();
var activeCellRange = ws.getActiveCell(x, y, isCoord);
var activeCellRange = ws.getActiveCell(0, 0, false);
var arn = ws.activeRange.clone(true);
var editFunction = function() {
t.setCellEditMode(true);
ws.setCellEditMode(true);
if (!ws.openCellEditor(t.cellEditor, x, y, isCoord, /*fragments*/undefined, /*cursorPos*/undefined, isFocus, isClearCell, /*isHideCursor*/isHideCursor, /*isQuickInput*/isQuickInput, /*activeRange*/arn)) {
if (!ws.openCellEditor(t.cellEditor, /*fragments*/undefined, /*cursorPos*/undefined, isFocus, isClearCell, /*isHideCursor*/isHideCursor, /*isQuickInput*/isQuickInput, /*activeRange*/arn)) {
t.setCellEditMode(false);
t.controller.setStrictClose(false);
t.controller.setFormulaEditMode(false);
......@@ -1920,8 +1920,7 @@
}
};
var activeCellRange = ws.getActiveCell(0, 0, /*isCoord*/false);
var activeCellRange = ws.getActiveCell(0, 0, false);
ws._isLockedCells(activeCellRange, /*subType*/null, openEditor);
}
};
......
......@@ -11372,17 +11372,13 @@
return true;
};
WorksheetView.prototype.openCellEditor = function ( editor, x, y, isCoord, fragments, cursorPos, isFocus, isClearCell, isHideCursor, isQuickInput, activeRange ) {
WorksheetView.prototype.openCellEditor = function ( editor, fragments, cursorPos, isFocus, isClearCell, isHideCursor, isQuickInput, activeRange ) {
var t = this, tc = this.cols, tr = this.rows, col, row, c, fl, mc, bg, isMerged;
var ar = this.activeRange;
if ( activeRange ) {
this.activeRange = activeRange.clone();
}
if ( this.objectRender.checkCursorDrawingObject( x, y ) ) {
return false;
}
function getVisibleRangeObject() {
var vr = t.visibleRange.clone(), offsetX = 0, offsetY = 0;
if ( t.topLeftFrozenCell ) {
......@@ -11410,21 +11406,8 @@
return {vr: vr, offsetX: offsetX, offsetY: offsetY};
}
if ( isCoord ) {
x *= asc_getcvt( 0/*px*/, 1/*pt*/, this._getPPIX() );
y *= asc_getcvt( 0/*px*/, 1/*pt*/, this._getPPIY() );
col = this._findColUnderCursor( x, true );
row = this._findRowUnderCursor( y, true );
if ( !col || !row ) {
return false;
}
col = col.col;
row = row.row;
}
else {
col = ar.startCol;
row = ar.startRow;
}
col = ar.startCol;
row = ar.startRow;
// Возможно стоит заменить на ячейку из кеша
c = this._getVisibleCell( col, row );
......@@ -11556,7 +11539,7 @@
copyValue = [];
copyValue[0] = new AscCommonExcel.Fragment( {text: text, format: v[0].format.clone()} );
var bSuccess = t.openCellEditor( editor, 0, 0, /*isCoord*/false, /*fragments*/undefined, /*cursorPos*/undefined, isFocus, /*isClearCell*/true, /*isHideCursor*/false, /*isQuickInput*/false, activeRange );
var bSuccess = t.openCellEditor( editor, /*fragments*/undefined, /*cursorPos*/undefined, isFocus, /*isClearCell*/true, /*isHideCursor*/false, /*isQuickInput*/false, activeRange );
if ( bSuccess ) {
editor.paste( copyValue, cursorPos );
}
......
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