Ejemplo n.º 1
0
        private CellExt method_3(CellExt cellExt_2)
        {
            string cellId = (string)cellExt_2.getPropValue(453);

            if (cellId != null)
            {
                cellId = cellId.Trim();
                if (cellId.Length > 0)
                {
                    CellExt ext4 = getSource(cellId);
                    if (ext4 != null)
                    {
                        return(ext4);
                    }
                }
            }
            for (int i = cellExt_2.Row - 1; i >= 1; i--)
            {
                CellExt other = getCell(i, cellExt_2.Col);
                if (other != null)
                {
                    if ((cellExt_2.sameRowTypeAs(other) && other.containCol(cellExt_2)) && PropertyDefine.CEX_HORIZONTAL.Equals(other.Extensible))
                    {
                        if (!cellExt_2.isTopHeadOf(other))
                        {
                            return(other);
                        }
                    }
                    else if (cellExt_2.sameRowTypeAs(other))
                    {
                        CellExt sub = other.getTopHead();
                        if ((sub != null) && !cellExt_2.isTopHeadOf(sub))
                        {
                            return(sub);
                        }
                    }
                }
            }
            return(getCell(0, 0));
        }
Ejemplo n.º 2
0
        public virtual CellExt getCommonTopHead(CellExt other)
        {
            CellExt ext = this;

            while (ext != null)
            {
                if (ext.isTopHeadOf(other))
                {
                    return(ext);
                }
                ext = ext.nextCell;
            }
            return(ext);
        }
Ejemplo n.º 3
0
Archivo: CSVar.cs Proyecto: ikvm/test
        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);
        }
Ejemplo n.º 4
0
Archivo: CSVar.cs Proyecto: ikvm/test
 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);
 }
Ejemplo n.º 5
0
        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());
                            }
                        }
                    }
                }
            }
        }