public override object GetReference(CalcIdentity id) { int num; object reference = base.GetReference(id); CalcStructReferenceIndentity indentity = id as CalcStructReferenceIndentity; if (((indentity != null) && (reference is SpreadCalcReference)) && this.TryParseColumnIndex(indentity.ToString(), out num)) { return(((SpreadCalcReference)reference).Clone(this.table.DataRange.Row, this.table.DataRange.Column + num, this.table.DataRange.RowCount, 1)); } return(reference); }
public override bool IsIntersected(CalcIdentity srcId, CalcIdentity destId) { if (!object.ReferenceEquals(srcId, destId)) { int num; int num2; CalcStructReferenceIndentity indentity = srcId as CalcStructReferenceIndentity; if ((indentity != null) && this.TryParseColumnIndex(indentity.ToString(), out num)) { srcId = new CalcRangeIdentity(this.table.DataRange.Row, this.table.DataRange.Column + num, this.table.DataRange.RowCount, 1); } CalcStructReferenceIndentity indentity2 = destId as CalcStructReferenceIndentity; if ((indentity2 != null) && this.TryParseColumnIndex(indentity2.ToString(), out num2)) { destId = new CalcRangeIdentity(this.table.DataRange.Row, this.table.DataRange.Column + num2, this.table.DataRange.RowCount, 1); } } return(base.IsIntersected(srcId, destId)); }