Commit 1a8bb5ed authored by Alexander.Trofimov's avatar Alexander.Trofimov

add CRangeOffset class

Range3D add multisheets
parent 3a5124b8
...@@ -141,6 +141,10 @@ ...@@ -141,6 +141,10 @@
return undefined; return undefined;
} }
function CRangeOffset(offsetCol, offsetRow) {
this.offsetCol = offsetCol;
this.offsetRow = offsetRow;
}
/** /**
* Rectangle region of cells * Rectangle region of cells
...@@ -455,7 +459,7 @@ ...@@ -455,7 +459,7 @@
function Range3D() { function Range3D() {
this.sheet = ''; this.sheet = '';
if (2 == arguments.length) { if (3 == arguments.length) {
var range = arguments[0]; var range = arguments[0];
Range3D.superclass.constructor.call(this, range.c1, range.r1, range.c2, range.r2); Range3D.superclass.constructor.call(this, range.c1, range.r1, range.c2, range.r2);
// ToDo стоит пересмотреть конструкторы. // ToDo стоит пересмотреть конструкторы.
...@@ -465,6 +469,7 @@ ...@@ -465,6 +469,7 @@
this.c2Abs = range.c2Abs; this.c2Abs = range.c2Abs;
this.sheet = arguments[1]; this.sheet = arguments[1];
this.sheet2 = arguments[2];
} else if (arguments.length > 1) { } else if (arguments.length > 1) {
ActiveRange.superclass.constructor.apply(this, arguments); ActiveRange.superclass.constructor.apply(this, arguments);
} else { } else {
...@@ -481,8 +486,7 @@ ...@@ -481,8 +486,7 @@
return oRes && Range3D.superclass.isIntersect.apply(this, arguments); return oRes && Range3D.superclass.isIntersect.apply(this, arguments);
}; };
Range3D.prototype.clone = function(){ Range3D.prototype.clone = function(){
var oRes = new Range3D(ActiveRange.superclass.clone.apply(this, arguments), this.sheet); return new Range3D(ActiveRange.superclass.clone.apply(this, arguments), this.sheet, this.sheet2);
return oRes;
}; };
/** /**
...@@ -736,8 +740,8 @@ ...@@ -736,8 +740,8 @@
if (!res) { if (!res) {
return null; return null;
} }
var range = this._getRange(res.range, 1); var range = this._getRange(res.range.toUpperCase(), 1);
return range ? new Range3D(range, res.sheet) : null; return range ? new Range3D(range, res.sheet, res.sheet2) : null;
}, },
getActiveRange : function(sRange) getActiveRange : function(sRange)
{ {
...@@ -1619,6 +1623,7 @@ ...@@ -1619,6 +1623,7 @@
window["Asc"].truncFracPart = truncFracPart; window["Asc"].truncFracPart = truncFracPart;
window["Asc"].getEndValueRange = getEndValueRange; window["Asc"].getEndValueRange = getEndValueRange;
window["AscCommonExcel"].CRangeOffset = CRangeOffset;
window["Asc"].Range = Range; window["Asc"].Range = Range;
window["AscCommonExcel"].Range3D = Range3D; window["AscCommonExcel"].Range3D = Range3D;
window["AscCommonExcel"].ActiveRange = ActiveRange; window["AscCommonExcel"].ActiveRange = ActiveRange;
......
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