public virtual void extendCol(CellExt cell, int count) { if (!method_5(cell.Row)) { throw new ReportError("非数据区单元格不能横向扩展"); } int num8 = getBeginCol(cell); int num3 = getEndCol(cell); int num5 = num3 - num8; CellExt[] extArray = new CellExt[count]; extArray[0] = cell; cell.ExtCells = extArray; vmethod_1(num3, num5 * (count - 1)); for (int i = num8; i < num3; i++) { CellExt ext7 = getCell(0, i); if (ext7 != null) { for (int m = 1; m < count; m++) { vmethod_3(0, i + (m * num5), (CellExt)ext7.Clone()); } } } cell.expandTopHead(num5 * (count - 1)); for (int j = num8; j < num3; j++) { for (int n = 1; n < RowSize; n++) { CellExt sub = getCell(n, j); if ((sub != null) && cell.isTopHeadOf(sub)) { for (int num9 = 1; num9 < count; num9++) { CellExt ext6 = (CellExt)sub.Clone(); vmethod_3(n, j + (num9 * num5), ext6); if (sub == cell) { extArray[num9] = ext6; ext6.ExtCells = extArray; } else { cellList.put(ext6); } } } } } for (int k = num8; k < num3; k++) { for (int num = 1; num < RowSize; num++) { CellExt ext = getCell(num, k); if ((ext != null) && cell.isTopHeadOf(ext)) { CellExt ext3 = ext.getTopHead(); for (int num4 = 1; num4 < count; num4++) { CellExt ext2 = getCell(num, k + (num5 * num4)); if (ext != cell) { CellExt head = getCell(ext3.Row, ext3.Col + (num5 * num4)); ext2.setTopHead(head); } if (ext.getLeftHead() != getCell(0, 0)) { ext2.setLeftHead(ext.getLeftHead()); } } } } } }