Commit 6815f14a authored by Dmitry.Shahtanov's avatar Dmitry.Shahtanov

отвалившиеся юнит-тесты

Fixed issue #31163 - Некорректно вычисляется функция LOOKUP если область выборки задана массивом >2 столбцов (http://bugzserver/show_bug.cgi?id=31163)

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@66935 954022d7-b5bf-4e40-9824-e11837661b57
parent 45a258f5
......@@ -55,10 +55,11 @@
<script type="text/javascript" src="../graphics/pdfprinter.js"></script>
<script type="text/javascript" src="../../OfflineDocuments/Excel/test-workbook2/editor.js"></script>
<script src="../../Common/CollaborativeEditingBase.js"></script>
<script type="text/javascript" src="../model/CollaborativeEditing.js"></script>
<script type="text/javascript" src="../model/ConditionalFormatting.js"></script>
<script type="text/javascript" src="../model/FormulaObjects/parserFormula.js"></script>
<script type="text/javascript" src="../model/FormulaObjects/_xlfnFunctions.js"></script>
<script type="text/javascript" src="../model/FormulaObjects/dateandtimeFunctions.js"></script>
<script type="text/javascript" src="../model/FormulaObjects/engineeringFunctions.js"></script>
<script type="text/javascript" src="../model/FormulaObjects/cubeFunctions.js"></script>
......@@ -141,8 +142,6 @@
<script src="../../Common/Controls.js"></script>
<script src="../model/DrawingObjects/ShapeDrawer.js"></script>
<script src="../../Word/Editor/CollaborativeEditing.js"></script>
<script src="../model/DrawingObjects/DrawingDocument.js"></script>
......@@ -160,7 +159,7 @@
<script src="../../Word/Editor/Math.js"></script>
<script src="../../Word/Editor/Run.js"></script>
<script src="../../Word/Editor/Hyperlink.js"></script>
<script src="../../Word/Editor/Field.js"></script>
<script src="../../Word/Editor/Comments.js"></script>
<script src="../../Word/Editor/FlowObjects.js"></script>
<script src="../../Word/Editor/Paragraph.js"></script>
......@@ -172,6 +171,8 @@
<script src="../../Word/Editor/Spelling.js"></script>
<script src="../../Word/Editor/FontClassification.js"></script>
<script type="text/javascript" src="../../Word/Math/mathTypes.js"></script>
<script type="text/javascript" src="../../Word/Math/mathText.js"></script>
<script type="text/javascript" src="../../Word/Math/mathContent.js"></script>
......
......@@ -777,9 +777,9 @@ cLOOKUP.prototype.Calculate = function ( arg ) {
if ( index < 0 ) return this.value = new cError( cErrorType.not_available );
if ( this.argumentsCurrent == 2 ) {
var b = arg1.getBBox();
var b = arg2.getBBox();
if ( arg1Range[0].length >= 2 ) {
return this.value = new cRef( arg1.ws.getCell3( (b.r1 - 1) + index, (b.c1 - 1) + 1 ).getName(), arg1.ws );
return this.value = new cRef( arg1.ws.getCell3( (b.r1 - 1) + index, (b.c2 - 1) + 0 ).getName(), arg1.ws );
}
else
return this.value = new cRef( arg1.ws.getCell3( (b.r1 - 1) + 0, (b.c1 - 1) + index ).getName(), arg1.ws );
......
......@@ -3078,10 +3078,10 @@ _func.binarySearch = function ( sElem, arrTagert, regExp ) {
if ( (arrTagert[i] instanceof cString || sElem instanceof cString) && !isString ) {
i = 0;
isString = true;
sElem = new cString( sElem.value.toLowerCase() );
sElem = new cString( sElem.toString().toLowerCase() );
}
if ( isString ) {
arrTagertOneType[i] = new cString( arrTagert[i].getValue().toLowerCase() );
arrTagertOneType[i] = new cString( arrTagert[i].toString().toLowerCase() );
}
else {
arrTagertOneType[i] = arrTagert[i].tocNumber();
......@@ -3592,14 +3592,6 @@ 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 ){
......@@ -3615,6 +3607,7 @@ parserFormula.prototype = {
this.outStack.push( new cEmpty() );
top_elem = this.elemArr[stackLength - 1];
wasLeftParentheses = true;
operand_expected = false;
}
else {
while ( stackLength != 0 ) {
......@@ -3629,6 +3622,14 @@ parserFormula.prototype = {
}
}
}
if ( operand_expected ) {
this.error.push( c_oAscError.ID.FrmlWrongOperator );
this.outStack = [];
this.elemArr = [];
return false;
}
if ( !wasLeftParentheses ) {
this.error.push( c_oAscError.ID.FrmlWrongCountParentheses );
this.outStack = [];
......
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