Commit e96d854b authored by Sergey.Konovalov's avatar Sergey.Konovalov Committed by Alexander.Trofimov

add Range.createFromBBox

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@56126 954022d7-b5bf-4e40-9824-e11837661b57
parent ed28815c
...@@ -2829,7 +2829,7 @@ Woorksheet.prototype.getRange=function(cellAdd1, cellAdd2){ ...@@ -2829,7 +2829,7 @@ Woorksheet.prototype.getRange=function(cellAdd1, cellAdd2){
Woorksheet.prototype.getRange2=function(sRange){ Woorksheet.prototype.getRange2=function(sRange){
var bbox = Asc.g_oRangeCache.getAscRange(sRange); var bbox = Asc.g_oRangeCache.getAscRange(sRange);
if(null != bbox) if(null != bbox)
return this.getRange3(bbox.r1, bbox.c1, bbox.r2, bbox.c2); return Range.prototype.createFromBBox(this, bbox);
return null; return null;
}; };
Woorksheet.prototype.getRange3=function(r1, c1, r2, c2){ Woorksheet.prototype.getRange3=function(r1, c1, r2, c2){
...@@ -4310,6 +4310,11 @@ function Range(worksheet, r1, c1, r2, c2){ ...@@ -4310,6 +4310,11 @@ function Range(worksheet, r1, c1, r2, c2){
this.first = new CellAddress(this.bbox.r1, this.bbox.c1, 0); this.first = new CellAddress(this.bbox.r1, this.bbox.c1, 0);
this.last = new CellAddress(this.bbox.r2, this.bbox.c2, 0); this.last = new CellAddress(this.bbox.r2, this.bbox.c2, 0);
} }
Range.prototype.createFromBBox=function(worksheet, bbox){
var oRes = new Range(worksheet, bbox.r1, bbox.c1, bbox.r2, bbox.c2);
oRes.bbox = bbox.clone();
return oRes;
}
Range.prototype.clone=function(oNewWs){ Range.prototype.clone=function(oNewWs){
if(!oNewWs) if(!oNewWs)
oNewWs = this.worksheet; oNewWs = this.worksheet;
......
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