Exemplo n.º 1
0
        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());
                            }
                        }
                    }
                }
            }
        }