Commit b9e5e0bf authored by Dmitry.Shahtanov's avatar Dmitry.Shahtanov Committed by Alexander.Trofimov

fix: Bug 29019 - Расчет ссылки на ячейку производится некорректно для формул,...

fix: Bug 29019 - Расчет ссылки на ячейку производится некорректно для формул, содержащих функции ROW, COLUMN

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@61777 954022d7-b5bf-4e40-9824-e11837661b57
parent 8343427c
...@@ -2931,6 +2931,7 @@ function parserFormula( formula, _cellId, _ws ) { ...@@ -2931,6 +2931,7 @@ function parserFormula( formula, _cellId, _ws ) {
this.operand_str = null; this.operand_str = null;
this.parenthesesNotEnough = false; this.parenthesesNotEnough = false;
this.f = []; this.f = [];
this.reRowCol = new RegExp("^(ROW|ROWS|COLUMN|COLUMNS)$","gi");
} }
parserFormula.prototype = { parserFormula.prototype = {
...@@ -3882,7 +3883,7 @@ parserFormula.prototype = { ...@@ -3882,7 +3883,7 @@ parserFormula.prototype = {
buildDependencies:function () { buildDependencies:function () {
var node = this.wb.dependencyFormulas.addNode( this.ws.Id, this.cellId ), var node = this.wb.dependencyFormulas.addNode( this.ws.Id, this.cellId ),
ref, nTo, wsR; ref, nTo, wsR;
for ( var i = 0; i < this.outStack.length; i++ ) { for ( var i = 0; i < this.outStack.length; i++ ) {
ref = this.outStack[i]; ref = this.outStack[i];
...@@ -3894,9 +3895,9 @@ parserFormula.prototype = { ...@@ -3894,9 +3895,9 @@ parserFormula.prototype = {
} }
if ( (ref instanceof cRef || ref instanceof cRef3D || ref instanceof cArea || ref instanceof cArea3D) && if ( (ref instanceof cRef || ref instanceof cRef3D || ref instanceof cArea || ref instanceof cArea3D) &&
ref.isValid() && this.outStack[i + 1] && ref.isValid() && this.outStack[i + 1] && this.outStack[i + 1] instanceof cBaseFunction &&
this.outStack[i + 1] instanceof cBaseFunction && this.reRowCol.test( this.outStack[i + 1].name ) ) {
( this.outStack[i + 1].name == "ROWS" || this.outStack[i + 1].name == "COLUMNS" ) ) { this.reRowCol.lastIndex = 0;
continue; continue;
} }
......
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