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

Fixed issue #31164 - Не обрабатываются ошибки внутри приложения при вводе функции LOOKUP

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@66927 954022d7-b5bf-4e40-9824-e11837661b57
parent f4404a05
......@@ -705,7 +705,7 @@ cLOOKUP.prototype.Calculate = function ( arg ) {
}
}
if ( !( arg1 instanceof cArea || arg1 instanceof cArea3D || arg1 instanceof cArray || arg2 instanceof cArea || arg2 instanceof cArea3D || arg2 instanceof cArray) ) {
if ( !( (arg1 instanceof cArea || arg1 instanceof cArea3D || arg1 instanceof cArray) && (arg2 instanceof cArea || arg2 instanceof cArea3D || arg2 instanceof cArray) )) {
return this.value = new cError( cErrorType.not_available );
}
......@@ -777,8 +777,8 @@ cLOOKUP.prototype.Calculate = function ( arg ) {
if ( index < 0 ) return this.value = new cError( cErrorType.not_available );
if ( this.argumentsCurrent == 2 ) {
var b = arg1.getBBox();
if ( arg1Range[0].length >= 2 ) {
var b = arg1.getBBox();
return this.value = new cRef( arg1.ws.getCell3( (b.r1 - 1) + index, (b.c1 - 1) + 1 ).getName(), arg1.ws );
}
else
......
......@@ -1841,7 +1841,7 @@ parentRight.prototype.toString = function () {
/** @constructor */
function cUnionOperator() {
cBaseOperator.apply( this, [':', 50] );
cBaseOperator.apply( this, [':', 50, 2] );
}
cUnionOperator.prototype = Object.create( cBaseOperator.prototype );
......@@ -3592,6 +3592,14 @@ parserFormula.prototype = {
/*Comma & arguments union*/
else if ( parserHelp.isComma.call( this, this.Formula, this.pCurrPos ) ) {
if ( operand_expected ) {
this.error.push( c_oAscError.ID.FrmlWrongOperator );
this.outStack = [];
this.elemArr = [];
return false;
}
wasLeftParentheses = false;
wasRigthParentheses = false;
/* if( operand_expected ){
......
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