Commit 86fa708a authored by Alexander.Trofimov's avatar Alexander.Trofimov

delete check return value from _getVisibleCell function

parent 73d6a7c0
...@@ -6917,11 +6917,6 @@ ...@@ -6917,11 +6917,6 @@
var c1 = mc ? mc.c1 : cell.col; var c1 = mc ? mc.c1 : cell.col;
var r1 = mc ? mc.r1 : cell.row; var r1 = mc ? mc.r1 : cell.row;
var c = this._getVisibleCell(c1, r1); var c = this._getVisibleCell(c1, r1);
if (c === undefined) {
asc_debug("log", "Unknown cell's info: col = " + c1 + ", row = " + r1);
return {};
}
var font = c.getFont(); var font = c.getFont();
var fa = font.getVerticalAlign(); var fa = font.getVerticalAlign();
var fc = font.getColor(); var fc = font.getColor();
...@@ -8674,14 +8669,12 @@ ...@@ -8674,14 +8669,12 @@
c = mc ? mc.c1 : activeCell.col; c = mc ? mc.c1 : activeCell.col;
r = mc ? mc.r1 : activeCell.row; r = mc ? mc.r1 : activeCell.row;
cell = t._getVisibleCell(c, r); cell = t._getVisibleCell(c, r);
if (undefined !== cell) { var oldFontSize = cell.getFont().getSize();
var oldFontSize = cell.getFont().getSize(); var newFontSize = asc_incDecFonSize(val, oldFontSize);
var newFontSize = asc_incDecFonSize(val, oldFontSize); if (null !== newFontSize) {
if (null !== newFontSize) { range.setFontsize(newFontSize);
range.setFontsize(newFontSize); canChangeColWidth = c_oAscCanChangeColWidth.numbers;
canChangeColWidth = c_oAscCanChangeColWidth.numbers; }
}
}
break; break;
case "style": case "style":
range.setCellStyle(val); range.setCellStyle(val);
...@@ -10603,24 +10596,19 @@ ...@@ -10603,24 +10596,19 @@
++options.countReplace; ++options.countReplace;
var c = t._getVisibleCell(cell.c1, cell.r1); var c = t._getVisibleCell(cell.c1, cell.r1);
var cellValue = c.getValueForEdit();
if (c === undefined) { cellValue = cellValue.replace(valueForSearching, options.replaceWith);
asc_debug("log", "Unknown cell's info: col = " + cell.c1 + ", row = " + cell.r1);
} else { var oCellEdit = new asc_Range(cell.c1, cell.r1, cell.c1, cell.r1);
var cellValue = c.getValueForEdit(); var v, newValue;
cellValue = cellValue.replace(valueForSearching, options.replaceWith); // get first fragment and change its text
v = c.getValueForEdit2().slice(0, 1);
var oCellEdit = new asc_Range(cell.c1, cell.r1, cell.c1, cell.r1); // Создаем новый массив, т.к. getValueForEdit2 возвращает ссылку
var v, newValue; newValue = [];
// get first fragment and change its text newValue[0] = new AscCommonExcel.Fragment({text: cellValue, format: v[0].format.clone()});
v = c.getValueForEdit2().slice(0, 1);
// Создаем новый массив, т.к. getValueForEdit2 возвращает ссылку t._saveCellValueAfterEdit(oCellEdit, c, newValue, /*flags*/undefined, /*skipNLCheck*/false,
newValue = []; /*isNotHistory*/true, /*lockDraw*/true);
newValue[0] = new AscCommonExcel.Fragment({text: cellValue, format: v[0].format.clone()});
t._saveCellValueAfterEdit(oCellEdit, c, newValue, /*flags*/undefined, /*skipNLCheck*/false,
/*isNotHistory*/true, /*lockDraw*/true);
}
} }
window.setTimeout(function () { window.setTimeout(function () {
...@@ -11036,11 +11024,6 @@ ...@@ -11036,11 +11024,6 @@
var activeCell = selectionRange.activeCell; var activeCell = selectionRange.activeCell;
var c = t._getVisibleCell(activeCell.col, activeCell.row); var c = t._getVisibleCell(activeCell.col, activeCell.row);
var v, copyValue; var v, copyValue;
if (!c) {
throw "Can not get cell data (col=" + activeCell.col + ", row=" + activeCell.row + ")";
}
// get first fragment and change its text // get first fragment and change its text
v = c.getValueForEdit2().slice(0, 1); v = c.getValueForEdit2().slice(0, 1);
// Создаем новый массив, т.к. getValueForEdit2 возвращает ссылку // Создаем новый массив, т.к. getValueForEdit2 возвращает ссылку
......
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