Commit f9bb4c8c authored by Alexander.Trofimov's avatar Alexander.Trofimov Committed by Alexander.Trofimov

Убрал лишнее использование getCells.

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@59861 954022d7-b5bf-4e40-9824-e11837661b57
parent 57fece87
......@@ -567,7 +567,7 @@
var r = ws.getRange2( "K1" );
ws.getRange2( "A1" ).setValue( "#N/A" );
r.setValue( "=ISNA(A1)" );
strictEqual( ws.getCell2( "K1" ).getCells()[0].getValue(), "TRUE" );
strictEqual( ws.getCell2( "K1" ).getValueWithFormat(), "TRUE" );
} )
test( "Test: \"ROUNDUP(31415.92654;-2)\"", function () {
......@@ -778,7 +778,7 @@
ws.getRange2( "S8" ).setValue( "2" );
ws.getRange2( "S9" ).setValue( "3" );
ws.getRange2( "S10" ).setValue( "=SUM(S7:S9,{1,2,3})" );
strictEqual( ws.getCell2( "S10" ).getCells()[0].getValue(), "12" );
strictEqual( ws.getCell2( "S10" ).getValueWithFormat(), "12" );
} )
test( "Test: ISREF", function () {
......@@ -811,11 +811,11 @@
ws.getRange2( "S95" ).setValue( "2" );
ws = wb.getWorksheet( 1 );
ws.getRange2( "S100" ).setValue( "=" + wb.getWorksheet( 0 ).getName() + "!S95" );
strictEqual( ws.getCell2( "S100" ).getCells()[0].getValue(), "2" );
strictEqual( ws.getCell2( "S100" ).getValueWithFormat(), "2" );
wb.getWorksheet( 0 ).setName( "ЛистTEMP" );
strictEqual( ws.getCell2( "S100" ).getCells()[0].getFormula(), wb.getWorksheet( 0 ).getName() + "!S95" );
strictEqual( ws.getCell2( "S100" ).getFormula(), wb.getWorksheet( 0 ).getName() + "!S95" );
} )
......
......@@ -593,7 +593,7 @@ cINDIRECT.prototype.Calculate = function ( arg ) {
found_operand = found_operand.toRef();
}
var cellName = r.getCells()[0].getName(), wsId = r.worksheet.getId();
var cellName = r.getFirst().getID(), wsId = r.worksheet.getId();
if ( (found_operand instanceof cRef || found_operand instanceof cRef3D || found_operand instanceof cArea) && found_operand.isValid() ) {
var nFrom = wb.dependencyFormulas.addNode( wsId, cellName ),
......@@ -919,17 +919,9 @@ function cOFFSET() {
}
cOFFSET.prototype = Object.create( cBaseFunction.prototype )
cOFFSET.prototype = Object.create( cBaseFunction.prototype );
cOFFSET.prototype.Calculate = function ( arg ) {
function validCol( nCol ) {
return 0 <= nCol && nCol <= gc_nMaxCol;
}
function validRow( nRow ) {
return 0 <= nRow && nRow <= gc_nMaxRow;
}
function validBBOX( bbox ) {
return 0 <= bbox.r1 && bbox.r1 <= gc_nMaxRow0 &&
0 <= bbox.c1 && bbox.c1 <= gc_nMaxCol0 &&
......@@ -1022,7 +1014,7 @@ cOFFSET.prototype.Calculate = function ( arg ) {
}
if( this.value instanceof cArea || this.value instanceof cRef || this.value instanceof cRef3D || this.value instanceof cArea3D ){
var r = arguments[1], wb = r.worksheet.workbook, cellName = r.getCells()[0].getName(), wsId = r.worksheet.getId();
var r = arguments[1], wb = r.worksheet.workbook, cellName = r.getFirst().getID(), wsId = r.worksheet.getId();
if ( (this.value instanceof cRef || this.value instanceof cRef3D || this.value instanceof cArea) && this.value.isValid() ) {
var nFrom = wb.dependencyFormulas.addNode( wsId, cellName ),
......@@ -1042,13 +1034,13 @@ cOFFSET.prototype.Calculate = function ( arg ) {
return this.value;
}
};
cOFFSET.prototype.getInfo = function () {
return {
name:this.name,
args:"( reference , rows , cols [ , [ height ] [ , [ width ] ] ] )"
};
}
};
function cROW() {
// cBaseFunction.call( this, "ROW" );
......
......@@ -4217,7 +4217,7 @@ Cell.prototype.setValue=function(val,callback, isCopyPaste){
if( !(null != val && val[0] != "=" || true == bIsTextFormat))
addToArrRecalc(this.ws.getId(), this);
wb.needRecalc.nodes[getVertexId(sheetId,this.oId.getID())] = [sheetId, this.oId.getID()];
wb.needRecalc.length++;
wb.needRecalc.length++;
this.sFormula = null;
this.setFormulaCA(false);
......
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