Exemple #1
0
        public virtual void expandTopHead(int mergeInc)
        {
            if (mergeInc < 0)
            {
                throw new SystemException();
            }
            CellExt ext  = nextCell;
            CellExt ext2 = this;

            while (ext != null)
            {
                for (int i = 0; i < ext.SubCells.Count; i++)
                {
                    CellExt other = (CellExt)ext.SubCells[i];
                    if (((other != ext2) && other.containCol(this)) && sameRowTypeAs(other))
                    {
                        other.expand(0, mergeInc);
                    }
                }
                if (ext.containCol(this))
                {
                    ext.expand(0, mergeInc);
                }
                ext2 = ext;
                ext  = ext.nextCell;
            }
        }
Exemple #2
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));
        }