Ejemplo n.º 1
0
        private string method_0(CellExt cellExt_1, Queue queue_0)
        {
            CellExt ext  = null;
            string  str  = "";
            CellExt ext2 = this.cellExt_0.CellSet.getCell(0, 0);

            for (int i = 0; i < queue_0.size(); i++)
            {
                if (queue_0.peek(i) == cellExt_1)
                {
                    return(str);
                }
            }
            queue_0.put(cellExt_1);
            if ((cellExt_1 != null) && ((cellExt_1.Row != 0) || (cellExt_1.Col != 0)))
            {
                if (cellExt_1.ExpMap.Exp != null)
                {
                    str = str.ToString() + this.method_1(cellExt_1.ExpMap.Exp.Home, queue_0);
                }
                ext = cellExt_1.getLeftHead();
                if ((ext != null) && (ext != ext2))
                {
                    str = (str.ToString() + (ext.SourceId.ToString().ToString() + "-").ToString()).ToString() + this.method_0(ext, queue_0).ToString();
                }
                ext = cellExt_1.getTopHead();
                if ((ext != null) && (ext != ext2))
                {
                    str = (str.ToString() + (ext.SourceId.ToString().ToString() + "-").ToString()).ToString() + this.method_0(ext, queue_0).ToString();
                }
            }
            return(str);
        }
Ejemplo n.º 2
0
Archivo: Class6.cs Proyecto: ikvm/test
 internal Class6(CellExt1 cs, CellExt cell, CellExt1 subRpt)
 {
     this.cellExt1_0 = cs;
     this.cellExt_0  = cell;
     this.cellExt1_1 = subRpt;
     this.method_2();
 }
Ejemplo n.º 3
0
        private void method_10(CellExt cellExt_2)
        {
            int    num6;
            int    row     = cellExt_2.Row;
            int    col     = cellExt_2.Col;
            int    colSize = ColSize;
            int    endCol  = cellExt_2.EndCol;
            object obj2    = cellExt_2.getPropValue(308);

            if ((obj2 == null) || ((bool)obj2))
            {
                num6 = 0;
                for (int i = endCol + 1; i < colSize; i++)
                {
                    if (getCell(row, i) != null)
                    {
                        break;
                    }
                    num6++;
                }
            }
            else
            {
                int num7 = colSize;
                while (num7 >= col)
                {
                    if (getCell(row, num7) != null)
                    {
                        endCol = getCell(row, num7).EndCol;
                        break;
                    }
                    num7--;
                }
                int colInc = (colSize - endCol) - 1;
                if (colInc > 0)
                {
                    for (num7 = endCol; num7 >= col; num7--)
                    {
                        CellExt ext = getCell(row, num7);
                        if (ext != null)
                        {
                            method_8(ext);
                            ext.move(0, colInc);
                            method_9(ext);
                        }
                    }
                }
                if ((col > 1) && (getCell(row, col - 1) != null))
                {
                    method_10(getCell(row, col - 1));
                }
                return;
            }
            if (num6 > 0)
            {
                method_8(cellExt_2);
                cellExt_2.expand(0, num6);
                method_9(cellExt_2);
            }
        }
Ejemplo n.º 4
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;
            }
        }
Ejemplo n.º 5
0
        public virtual void expandLeftHead(int mergeInc)
        {
            if (mergeInc < 0)
            {
                throw new SystemException();
            }
            CellExt ext  = prevCell;
            CellExt ext2 = this;

            while (ext != null)
            {
                for (int i = 0; i < ext.SubCells.Count; i++)
                {
                    CellExt ext3 = (CellExt)ext.SubCells[i];
                    if ((ext3 != ext2) && ext3.containRow(this))
                    {
                        ext3.expand(mergeInc, 0);
                    }
                }
                if (ext.containRow(this))
                {
                    ext.expand(mergeInc, 0);
                }
                ext2 = ext;
                ext  = ext.prevCell;
            }
        }
Ejemplo n.º 6
0
 internal virtual void vmethod_7(int int_3)
 {
     if (int_3 > 0)
     {
         for (int i = 1; i < ColSize; i++)
         {
             CellExt ext2 = getCell(int_3, i);
             if (ext2 != null)
             {
                 int rowMerge = ext2.RowMerge;
                 if (rowMerge > 1)
                 {
                     ext2.setMerge(rowMerge - 1, ext2.ColMerge);
                 }
             }
         }
         for (int j = int_3 + 1; j < RowSize; j++)
         {
             for (int k = 0; k < ColSize; k++)
             {
                 if (!isMerged(j, k))
                 {
                     CellExt ext = getCell(j, k);
                     if (ext != null)
                     {
                         ext.move(-1, 0);
                     }
                 }
             }
         }
         matrix.deleteRow(int_3);
     }
 }
Ejemplo n.º 7
0
 internal virtual void vmethod_8(int int_3)
 {
     if (int_3 > 0)
     {
         for (int i = 1; i < RowSize; i++)
         {
             CellExt ext2 = getCell(i, int_3);
             if (ext2 != null)
             {
                 int colMerge = ext2.ColMerge;
                 if (colMerge > 1)
                 {
                     ext2.setMerge(ext2.RowMerge, colMerge - 1);
                 }
             }
         }
         for (int j = int_3 + 1; j < ColSize; j++)
         {
             for (int k = 0; k < RowSize; k++)
             {
                 if (!isMerged(k, j))
                 {
                     CellExt ext = getCell(k, j);
                     if (ext != null)
                     {
                         ext.move(0, -1);
                     }
                 }
             }
         }
         matrix.deleteCol(int_3);
     }
 }
Ejemplo n.º 8
0
        internal virtual void vmethod_5(CellExt cellExt_2)
        {
            Console.Out.Write(cellExt_2.Id.ToString().ToString() + ": ");
            Console.Out.Write(new StringBuilder("Src=").Append(cellExt_2.SourceId).Append(", ").ToString().ToString());
            CellExt ext = cellExt_2.getLeftHead();

            Console.Out.Write(new StringBuilder("LeftHead=").Append((ext == null) ? "" : ext.Id).Append(", ").ToString().ToString());
            ext = cellExt_2.getTopHead();
            Console.Out.Write(new StringBuilder("TopHead=").Append((ext == null) ? "" : ext.Id).Append(", ").ToString().ToString());
            Console.Out.Write(new StringBuilder("Exp=").Append((cellExt_2.ExpMap == null) ? "" : cellExt_2.ExpMap.ExpStr).Append(", ").ToString().ToString());
            CellExt[] extCells = cellExt_2.ExtCells;
            Console.Out.Write("Ext=(");
            if (extCells != null)
            {
                for (int i = 0; i < extCells.Length; i++)
                {
                    Console.Out.Write(extCells[i].Id);
                    if (i != (extCells.Length - 1))
                    {
                        Console.Out.Write(",");
                    }
                }
            }
            Console.Out.WriteLine(")");
        }
Ejemplo n.º 9
0
Archivo: Class3.cs Proyecto: ikvm/test
        public static CellExt1 transfer(CellSet cs, CellExt1 ecs)
        {
            if (ecs == null)
            {
                return(null);
            }
            Parser parser = new Parser(cs);

            ecs.RowSize = cs.Row;
            ecs.ColSize = cs.Column;
            for (int i = 0; i < cs.Row; i++)
            {
                for (int j = 0; j < cs.Column; j++)
                {
                    if (parser.isMergedFirstCell(i, j))
                    {
                        int row    = parser.getMergedEndRow(i, j);
                        int column = parser.getMergedEndCol(i, j);
                        cs.setPropertyValue(i, j, 706, cs.getPropertyValue(i, column, 706));
                        cs.setPropertyValue(i, j, 704, cs.getPropertyValue(i, column, 704));
                        cs.setPropertyValue(i, j, 705, cs.getPropertyValue(i, column, 705));
                        cs.setPropertyValue(i, j, 712, cs.getPropertyValue(row, j, 712));
                        cs.setPropertyValue(i, j, 710, cs.getPropertyValue(row, j, 710));
                        cs.setPropertyValue(i, j, 711, cs.getPropertyValue(row, j, 711));
                    }
                    Cell    cell = cs.getCell(i, j);
                    CellExt ext2 = ecs.getCell(i, j);
                    if (cell != null)
                    {
                        if ((i == 0) && (j == 0))
                        {
                            object obj2 = null;
                            obj2 = cell.getValue(101);
                            if (obj2 != null)
                            {
                                ecs.object_0 = obj2;
                            }
                            obj2 = cell.getValue(109);
                            if (obj2 != null)
                            {
                                ecs.bool_0 = true.Equals(obj2);
                            }
                        }
                        if (ext2 == null)
                        {
                            ext2 = ecs.newCell(i, j);
                        }
                        ext2.PropValueTable = cell.getValuesMap();
                        ext2.PropExpTable   = cell.getExpressionsMap();
                        if (ecs.isMerged(i, j))
                        {
                            ecs.remove(i, j);
                        }
                    }
                }
            }
            ecs.addMergedCells();
            ecs.NewInput = cs.NewInputVersion;
            return(ecs);
        }
Ejemplo n.º 10
0
Archivo: CSVar.cs Proyecto: ikvm/test
        public override object calculate()
        {
            CellExt current = null;

            if (this.cellExt_0 == null)
            {
                return(null);
            }
            CellExt1 cellSet = this.cellExt_0.CellSet;

            if (!this.bool_0)
            {
                current = cellSet.Current;
            }
            else
            {
                current = cellSet.SavedCurrent;
            }
            CellExt source = this.cellExt_0.getCommonLeftHead(current.Source);

            this.cellExt_1 = current.getLeftHead(source);
            CellExt ext4 = this.cellExt_0.getCommonTopHead(current.Source);

            this.cellExt_2 = current.getTopHead(ext4);
            return(this);
        }
Ejemplo n.º 11
0
        public virtual bool sameRowTypeAs(CellExt other)
        {
            CellExt ext  = CellSet.getCell(Row, 0);
            CellExt ext2 = CellSet.getCell(other.Row, 0);
            object  obj2 = null;
            object  obj3 = null;

            if ((ext != null) && (ext.ExpMap.PropGetMap != null))
            {
                obj2 = ext.ExpMap.PropGetMap[803];
            }
            if (obj2 == null)
            {
                obj2 = PropertyDefine.CRT_NORMAL;
            }
            if ((ext2 != null) && (ext2.ExpMap.PropGetMap != null))
            {
                obj3 = ext2.ExpMap.PropGetMap[803];
            }
            if (obj3 == null)
            {
                obj3 = PropertyDefine.CRT_NORMAL;
            }
            if (!PropertyDefine.CRT_NORMAL.Equals(obj2) && !PropertyDefine.CRT_TABLE_HEADER.Equals(obj2))
            {
                return(obj2.Equals(obj3));
            }
            return(PropertyDefine.CRT_NORMAL.Equals(obj3) || PropertyDefine.CRT_TABLE_HEADER.Equals(obj3));
        }
Ejemplo n.º 12
0
 public virtual void clearCellRef()
 {
     Source   = null;
     prevCell = null;
     nextCell = null;
     ExtCells = null;
     SubCells = null;
 }
Ejemplo n.º 13
0
 internal virtual void vmethod_3(int int_3, int int_4, CellExt cellExt_2)
 {
     matrix[int_3, int_4] = cellExt_2;
     if (cellExt_2 != null)
     {
         cellExt_2.setLocation(int_3, int_4);
     }
 }
Ejemplo n.º 14
0
 private void method_9(CellExt cellExt_2)
 {
     for (int i = cellExt_2.Row; i <= cellExt_2.EndRow; i++)
     {
         for (int j = cellExt_2.Col; j <= cellExt_2.EndCol; j++)
         {
             matrix[i, j] = cellExt_2;
         }
     }
 }
Ejemplo n.º 15
0
Archivo: CSVar.cs Proyecto: ikvm/test
        public virtual object GetValue(bool dispValue)
        {
            CellExt ext = this.getCell();

            if (ext == null)
            {
                return(null);
            }
            ext.testValue();
            return(ext.GetValue(dispValue));
        }
Ejemplo n.º 16
0
 public virtual bool isTopHeadOf(CellExt sub)
 {
     for (CellExt ext = sub; ext != null; ext = ext.nextCell)
     {
         if (this == ext)
         {
             return(true);
         }
     }
     return(false);
 }
Ejemplo n.º 17
0
Archivo: Class6.cs Proyecto: ikvm/test
        private bool method_1(int int_0)
        {
            CellExt ext = this.cellExt1_1.getCell(0, int_0);

            if (ext != null)
            {
                object obj2 = ext.getPropValue(306);
                return((obj2 != null) ? obj2.Equals(true) : true);
            }
            return(true);
        }
Ejemplo n.º 18
0
        private void prepareCalculate()
        {
            cellList.clear();
            cellIdMap.Clear();
            for (int i = 0; i < RowSize; i++)
            {
                for (int k = 0; k < ColSize; k++)
                {
                    CellExt o = getCell(i, k);
                    if (!isMerged(i, k))
                    {
                        object obj2 = o;
                        cellIdMap[getId(i, k)] = obj2;
                        if (o != null)
                        {
                            cellList.put(o);
                        }
                    }
                }
            }
            for (int j = 0; j < RowSize; j++)
            {
                for (int m = 0; m < ColSize; m++)
                {
                    if ((j != 0) || (m != 0))
                    {
                        CellExt ext3 = getCell(j, m);
                        if ((ext3 != null) && !isMerged(j, m))
                        {
                            ext3.setLeftHead(method_2(ext3));
                            ext3.setTopHead(method_3(ext3));
                            ext3.prepareCalculate();
                        }
                    }
                }
            }
            CellExt   ext2     = getCell(0, 0);
            ArrayList subCells = ext2.SubCells;

            if (subCells != null)
            {
                subCells.Clear();
                IEnumerator enumerator = cellIdMap.Values.GetEnumerator();
                while (enumerator.MoveNext())
                {
                    CellExt ext = (CellExt)enumerator.Current;
                    if (((ext != null) && (ext.getLeftHead() == ext2)) && (ext.getTopHead() == ext2))
                    {
                        subCells.Add(ext);
                    }
                }
            }
        }
Ejemplo n.º 19
0
 private bool method_5(int int_3)
 {
     if (int_3 != 0)
     {
         CellExt ext = getCell(int_3, 0);
         if (ext != null)
         {
             object obj2 = ext.getPropValue(803);
             return(((obj2 == null) || obj2.Equals(PropertyDefine.CRT_NORMAL)) || obj2.Equals(PropertyDefine.CRT_TABLE_HEADER));
         }
     }
     return(true);
 }
Ejemplo n.º 20
0
        private void method_4(CellExt cellExt_0, Class7 class7_0, string[] string_0, CellExt cellExt_1)
        {
            object obj2 = cellExt_1.GetValue(false);
            string str  = this.method_6(cellExt_1, 614);

            if ((str != null) && (str.Trim().Length > 0))
            {
                int index = this.method_5(class7_0, str);
                if (index >= 0)
                {
                    string_0[index] = Convert.ToString(obj2);
                }
            }
        }
Ejemplo n.º 21
0
        public virtual CellExt getTopHead(CellExt source, int position)
        {
            CellExt ext = getTopHead(source);

            if ((ext != null) && (ext.ExtCells != null))
            {
                if ((position >= 0) && (position < ext.ExtCells.Length))
                {
                    return(ext.ExtCells[position]);
                }
                return(null);
            }
            return(null);
        }
Ejemplo n.º 22
0
        public virtual CellExt getTopHead(CellExt source)
        {
            CellExt ext = this;

            while (ext != null)
            {
                if (ext.Source == source)
                {
                    return(ext);
                }
                ext = ext.nextCell;
            }
            return(ext);
        }
Ejemplo n.º 23
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.º 24
0
        public virtual CellExt getCommonLeftHead(CellExt other)
        {
            CellExt ext = this;

            while (ext != null)
            {
                if (ext.isLeftHeadOf(other))
                {
                    return(ext);
                }
                ext = ext.prevCell;
            }
            return(ext);
        }
Ejemplo n.º 25
0
 public virtual void addMergedCells()
 {
     for (int i = 1; i < RowSize; i++)
     {
         for (int j = 1; j < ColSize; j++)
         {
             CellExt ext = getCell(i, j);
             if ((ext != null) && !isMerged(i, j))
             {
                 method_1(ext);
             }
         }
     }
 }
Ejemplo n.º 26
0
        private string method_6(CellExt cellExt_0, short short_0)
        {
            ShortMap inputMap = cellExt_0.InputMap;

            if (inputMap != null)
            {
                object obj2 = inputMap[short_0];
                if (obj2 is string)
                {
                    return((string)obj2);
                }
            }
            return(null);
        }
Ejemplo n.º 27
0
 public virtual CellExt getSubCell(CellExt source)
 {
     if (SubCells != null)
     {
         for (int i = 0; i < SubCells.Count; i++)
         {
             CellExt ext2 = (CellExt)SubCells[i];
             if (ext2.Source == source)
             {
                 return(ext2);
             }
         }
     }
     return(null);
 }
Ejemplo n.º 28
0
        public virtual int getColWidth(int col)
        {
            CellExt ext  = getCell(0, col);
            object  obj2 = null;

            if (ext != null)
            {
                obj2 = ext.getPropValue(901);
            }
            if (obj2 == null)
            {
                obj2 = PropertyDefine.DEFAULT_COL_WIDTH;
            }
            return((int)Math.Round((double)Convert.ToSingle(obj2)));
        }
Ejemplo n.º 29
0
        public virtual int getRowHeight(int row)
        {
            CellExt ext  = getCell(row, 0);
            object  obj2 = null;

            if (ext != null)
            {
                obj2 = ext.getPropValue(801);
            }
            if (obj2 == null)
            {
                obj2 = PropertyDefine.DEFAULT_ROW_HEIGHT;
            }
            return((int)Math.Round((double)Convert.ToSingle(obj2)));
        }
Ejemplo n.º 30
0
 internal virtual void vmethod_0(int int_3, int int_4)
 {
     matrix.addRows(int_3, int_4);
     for (int i = int_3 + int_4; i < RowSize; i++)
     {
         for (int j = 0; j < ColSize; j++)
         {
             CellExt ext = getCell(i, j);
             if (ext != null)
             {
                 ext.move(int_4, 0);
             }
         }
     }
 }