public virtual CellExt getCommonLeftHead(CellExt other) { CellExt ext = this; while (ext != null) { if (ext.isLeftHeadOf(other)) { return(ext); } ext = ext.prevCell; } return(ext); }
private CellExt method_2(CellExt cellExt_2) { string cellId = (string)cellExt_2.getPropValue(452); if (cellId != null) { cellId = cellId.Trim(); if (cellId.Length > 0) { CellExt ext4 = getSource(cellId); if (ext4 != null) { return(ext4); } } } for (int i = cellExt_2.Col - 1; i >= 1; i--) { CellExt sub = getCell(cellExt_2.Row, i); if (sub != null) { if (!sub.containRow(cellExt_2) || !PropertyDefine.CEX_VERTICAL.Equals(sub.Extensible)) { CellExt ext3 = sub.getLeftHead(); if ((ext3 != null) && !cellExt_2.isLeftHeadOf(ext3)) { return(ext3); } } else if (!cellExt_2.isLeftHeadOf(sub)) { return(sub); } } } return(getCell(0, 0)); }
public virtual ArrayList getCells(CellExt leftHead, CellExt topHead, ArrayList list) { int num3; int num4; if (list == null) { list = new ArrayList(); } if (leftHead.Source == this.cellExt_0) { list.Add(leftHead); return(list); } if (topHead.Source == this.cellExt_0) { list.Add(topHead); return(list); } if (leftHead.Source.isDirectLeftHeadOf(this.cellExt_0)) { int subSize = leftHead.SubSize; for (int i = 0; i < subSize; i++) { CellExt ext7 = leftHead.getSubCell(i); if (ext7.Source == this.cellExt_0) { int num16 = ext7.extCellSize(); for (int j = 0; j < num16; j++) { CellExt sub = ext7.getExtCell(j); if (topHead.isTopHeadOf(sub)) { list.Add(sub); } } } } return(list); } if (topHead.Source.isDirectTopHeadOf(this.cellExt_0)) { int num10 = topHead.SubSize; for (int k = 0; k < num10; k++) { CellExt ext6 = topHead.getSubCell(k); if (ext6.Source == this.cellExt_0) { int num12 = ext6.extCellSize(); for (int m = 0; m < num12; m++) { CellExt ext5 = ext6.getExtCell(m); if (leftHead.isLeftHeadOf(ext5)) { list.Add(ext5); } } } } return(list); } if (!leftHead.Source.isLeftHeadOf(this.cellExt_0) || (leftHead.Source == this.cellExt_0.getLeftHead())) { if (!topHead.Source.isTopHeadOf(this.cellExt_0)) { return(list); } if (topHead.Source == this.cellExt_0.getTopHead()) { return(list); } num4 = topHead.SubSize; num3 = 0; } else { int num8 = leftHead.SubSize; for (int n = 0; n < num8; n++) { CellExt ext3 = leftHead.getSubCell(n); if (ext3.Source.isLeftHeadOf(this.cellExt_0)) { int num6 = ext3.extCellSize(); for (int num5 = 0; num5 < num6; num5++) { CellExt ext4 = ext3.getExtCell(num5); this.getCells(ext4, topHead, list); } return(list); } } return(list); } while (num3 < num4) { CellExt ext = topHead.getSubCell(num3); if (ext.Source.isTopHeadOf(this.cellExt_0)) { int num2 = ext.extCellSize(); for (int num = 0; num < num2; num++) { CellExt ext2 = ext.getExtCell(num); this.getCells(leftHead, ext2, list); } return(list); } num3++; } return(list); }
private CellExt method_0(CellExt cellExt_3, CellExt cellExt_4) { if (cellExt_3.Source == this.cellExt_0) { return(cellExt_3); } if (cellExt_4.Source == this.cellExt_0) { return(cellExt_4); } if (!cellExt_3.Source.isDirectLeftHeadOf(this.cellExt_0)) { if (cellExt_4.Source.isDirectTopHeadOf(this.cellExt_0)) { int subSize = cellExt_4.SubSize; for (int i = 0; i < subSize; i++) { CellExt ext6 = cellExt_4.getSubCell(i); if (ext6.Source == this.cellExt_0) { int num12 = ext6.extCellSize(); for (int j = 0; j < num12; j++) { CellExt sub = ext6.getExtCell(j); if (cellExt_3.isLeftHeadOf(sub)) { return(sub); } } } } } else if (cellExt_3.Source.isLeftHeadOf(this.cellExt_0) && (cellExt_3.Source != this.cellExt_0.getLeftHead())) { int num6 = cellExt_3.SubSize; for (int k = 0; k < num6; k++) { CellExt ext5 = cellExt_3.getSubCell(k); if (ext5.Source.isLeftHeadOf(this.cellExt_0)) { int num8 = ext5.extCellSize(); for (int m = 0; m < num8; m++) { CellExt ext4 = ext5.getExtCell(m); ext4 = this.method_0(ext4, cellExt_4); if (ext4 != null) { return(ext4); } } } } } else if (cellExt_4.Source.isTopHeadOf(this.cellExt_0) && (cellExt_4.Source != this.cellExt_0.getTopHead())) { int num2 = cellExt_4.SubSize; for (int n = 0; n < num2; n++) { CellExt ext3 = cellExt_4.getSubCell(n); if (ext3.Source.isTopHeadOf(this.cellExt_0)) { int num4 = ext3.extCellSize(); for (int num3 = 0; num3 < num4; num3++) { CellExt ext2 = ext3.getExtCell(num3); ext2 = this.method_0(cellExt_3, ext2); if (ext2 != null) { return(ext2); } } } } } } else { int num14 = cellExt_3.SubSize; for (int num13 = 0; num13 < num14; num13++) { CellExt ext8 = cellExt_3.getSubCell(num13); if (ext8.Source == this.cellExt_0) { int num16 = ext8.extCellSize(); for (int num15 = 0; num15 < num16; num15++) { CellExt ext9 = ext8.getExtCell(num15); if (cellExt_4.isTopHeadOf(ext9)) { return(ext9); } } } } } return(null); }
public virtual void extendRow(CellExt cell, int count) { int num = getBeginRow(cell); int num2 = getEndRow(cell); int num3 = num2 - num; CellExt[] extArray = new CellExt[count]; extArray[0] = cell; cell.ExtCells = extArray; vmethod_0(num2, num3 * (count - 1)); for (int i = num; i < num2; i++) { CellExt ext7 = getCell(i, 0); if (ext7 != null) { for (int m = 1; m < count; m++) { vmethod_3(i + (num3 * m), 0, (CellExt)ext7.Clone()); } } } cell.expandLeftHead(num3 * (count - 1)); for (int j = num; j < num2; j++) { for (int n = 1; n < ColSize; n++) { CellExt sub = getCell(j, n); if ((sub != null) && cell.isLeftHeadOf(sub)) { for (int num10 = 1; num10 < count; num10++) { CellExt ext6 = (CellExt)sub.Clone(); vmethod_3(j + (num10 * num3), n, ext6); if (sub != cell) { cellList.put(ext6); } else { extArray[num10] = ext6; ext6.ExtCells = extArray; } } } } } for (int k = num; k < num2; k++) { for (int num6 = 1; num6 < ColSize; num6++) { CellExt ext = getCell(k, num6); if ((ext != null) && cell.isLeftHeadOf(ext)) { CellExt ext3 = ext.getLeftHead(); for (int num7 = 1; num7 < count; num7++) { CellExt ext2 = getCell(k + (num3 * num7), num6); if (ext != cell) { CellExt head = getCell(ext3.Row + (num3 * num7), ext3.Col); ext2.setLeftHead(head); } if (ext.getTopHead() != getCell(0, 0)) { ext2.setTopHead(ext.getTopHead()); } } } } } }