Commit df7bc85e authored by Dmitry.Shahtanov's avatar Dmitry.Shahtanov

fix: Bug 19782 - Ошибка #VALUE! при вычислении формулы SUMPRODUCT, аргументы в...

fix: Bug 19782 - Ошибка #VALUE! при вычислении формулы SUMPRODUCT, аргументы в которой заданы ссылками на другие листы

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@49272 954022d7-b5bf-4e40-9824-e11837661b57
parent 804c2436
......@@ -3152,8 +3152,6 @@ cFormulaFunction.Mathematic = {
if ( arg[i] instanceof cArea || arg[i] instanceof cArray ) {
resArr[i] = arg[i].getMatrix();
if ( row == 0 ) row = resArr[0].length;
if ( col == 0 ) col = resArr[0][0].length;
}
else if ( arg[i] instanceof cRef || arg[i] instanceof cRef3D ) {
resArr[i] = [
......@@ -3166,6 +3164,9 @@ cFormulaFunction.Mathematic = {
];
}
row = Math.max(resArr[0].length,row);
col = Math.max(resArr[0][0].length,col);
if ( row != resArr[i].length || col != resArr[i][0].length ) {
return this.value = new cError( cErrorType.wrong_value_type );
}
......@@ -3182,7 +3183,10 @@ cFormulaFunction.Mathematic = {
if ( arg0 instanceof cError )
return this.value = arg0;
else if ( arg0 instanceof cString ) {
if(arg0.tocNumber() instanceof cError)
res *= 0;
else
res *= arg0.tocNumber().getValue();
}
else
res *= arg0.tocNumber().getValue();
......
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