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

add CRangeOffset class

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