Ejemplo n.º 1
0
Archivo: Class6.cs Proyecto: ikvm/test
        private bool method_0(int int_0)
        {
            CellExt ext = this.cellExt1_1.getCell(int_0, 0);

            if (ext != null)
            {
                object obj3 = ext.getPropValue(306);
                if ((obj3 == null) || !obj3.Equals(false))
                {
                    object obj2 = ext.getPropValue(803);
                    return((obj2 != null) ? (!obj2.Equals(PropertyDefine.CRT_PAGE_HEADER) ? !obj2.Equals(PropertyDefine.CRT_PAGE_FOOTER) : false) : true);
                }
                return(false);
            }
            return(true);
        }
Ejemplo n.º 2
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.º 3
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.º 4
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.º 5
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.º 6
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.º 7
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.º 8
0
        private CellExt method_2(CellExt cellExt_2)
        {
            string cellId = (string)cellExt_2.getPropValue(452);

            if (cellId != null)
            {
                cellId = cellId.Trim();
                if (cellId.Length > 0)
                {
                    CellExt ext4 = getSource(cellId);
                    if (ext4 != null)
                    {
                        return(ext4);
                    }
                }
            }
            for (int i = cellExt_2.Col - 1; i >= 1; i--)
            {
                CellExt sub = getCell(cellExt_2.Row, i);
                if (sub != null)
                {
                    if (!sub.containRow(cellExt_2) || !PropertyDefine.CEX_VERTICAL.Equals(sub.Extensible))
                    {
                        CellExt ext3 = sub.getLeftHead();
                        if ((ext3 != null) && !cellExt_2.isLeftHeadOf(ext3))
                        {
                            return(ext3);
                        }
                    }
                    else if (!cellExt_2.isLeftHeadOf(sub))
                    {
                        return(sub);
                    }
                }
            }
            return(getCell(0, 0));
        }
Ejemplo n.º 9
0
Archivo: Class6.cs Proyecto: ikvm/test
        internal virtual void vmethod_0()
        {
            int row  = this.cellExt_0.Row;
            int col  = this.cellExt_0.Col;
            int num3 = this.cellExt1_1.RowSize - 1;
            int num4 = this.cellExt1_1.ColSize - 1;
            int num5 = this.Int32_0;
            int num6 = (row + num5) + 1;
            int num7 = (num3 - num5) - 1;

            if (num7 < 0)
            {
                num7 = 0;
            }
            this.cellExt1_0.vmethod_0(num6, num7);
            for (int i = num6; i < (num6 + num7); i++)
            {
                if (this.cellExt1_0.getCell(i, 0) == null)
                {
                    this.cellExt1_0.vmethod_3(i, 0, this.cellExt1_1.getCell((((num3 - num6) - num7) + i) + 1, 0));
                }
            }
            int num17 = this.Int32_1;
            int num13 = (col + num17) + 1;
            int num14 = (num4 - num17) - 1;

            if (num14 < 0)
            {
                num14 = 0;
            }
            int colSize = this.cellExt1_0.ColSize;

            this.cellExt1_0.vmethod_2(num13, num14, row, (row + num3) - 1, false);
            for (int j = colSize; j < (num13 + num14); j++)
            {
                if (this.cellExt1_0.getCell(0, j) == null)
                {
                    this.cellExt1_0.vmethod_3(0, j, this.cellExt1_1.getCell(0, (j - col) + 1));
                }
            }
            for (int k = 1; k <= num3; k++)
            {
                for (int m = 1; m <= num4; m++)
                {
                    CellExt ext = this.cellExt1_1.getCell(k, m);
                    if ((ext != null) && !this.cellExt1_1.isMerged(k, m))
                    {
                        this.cellExt1_0.vmethod_3((row + k) - 1, (col + m) - 1, ext);
                        if (ext.EndCol == ((col + num4) - 1))
                        {
                            for (int n = ext.Row; n <= Math.Min(ext.EndRow, num6 - 1); n++)
                            {
                                CellExt ext3 = this.cellExt1_0.getCell(n, ext.EndCol + 1);
                                if (ext3 != null)
                                {
                                    ext3.setPropValue(701, ext.getPropValue(704));
                                    ext3.setPropValue(702, ext.getPropValue(705));
                                    ext3.setPropValue(703, ext.getPropValue(706));
                                }
                            }
                        }
                        if (ext.EndRow == ((row + num3) - 1))
                        {
                            for (int num10 = ext.Col; num10 <= ext.EndCol; num10++)
                            {
                                CellExt ext2 = this.cellExt1_0.getCell(ext.EndRow + 1, num10);
                                if (ext2 != null)
                                {
                                    ext2.setPropValue(707, ext.getPropValue(710));
                                    ext2.setPropValue(708, ext.getPropValue(711));
                                    ext2.setPropValue(709, ext.getPropValue(712));
                                }
                            }
                        }
                    }
                }
            }
        }
Ejemplo n.º 10
0
 public virtual void calculate()
 {
     try
     {
         Hashtable dataSetsMap = _env.DataSetsMap;
         if (dataSetsMap != null)
         {
             foreach (var item in dataSetsMap.Values)
             {
                 if (null != item)
                 {
                     var set = item as DataSet;
                     if (null != set)
                     {
                         set.finish();
                     }
                 }
             }
         }
         bool complicated = Complicated;
         checkMacros();
         prepareCalculate();
         initMerged();
         Queue queue = new Queue();
         while (!cellList.Empty)
         {
             CellExt cell = (CellExt)cellList.Renamed;
             object  obj2 = cell.getPropValue(PropertyDefine.GRID_DATA_TYPE /*301*/);
             if (!PropertyDefine.CDT_GRAPH.Equals(obj2) && !PropertyDefine.CDT_FLASH.Equals(obj2))
             {
                 try
                 {
                     Current = cell;
                     cell.calculate();
                     cell.clearDependCells();
                     continue;
                 }
                 catch (Exception0 exception2)
                 {
                     if (exception2.Cell.dependOn(cell))
                     {
                         throw new ReportError(new StringBuilder(exception2.Cell.SourceId).Append("与").Append(cell.SourceId).Append("循环引用").ToString());
                     }
                     cell.addDependCell(exception2.Cell);
                     cellList.put(cell);
                     continue;
                 }
                 catch (Exception exception3)
                 {
                     throw exception3;
                 }
             }
             queue.put(cell);
         }
         resetDSCurrent();
         setDSCurrent();
         int_1 = GRAPH;
         while (!queue.Empty)
         {
             CellExt ext = (CellExt)queue.Renamed;
             Current = ext;
             ext.calculate();
         }
         method_6();
         if (SubRptType != SRT_IMPORT)
         {
             addMergedCells();
         }
         method_7();
         if (Input)
         {
             try
             {
                 new InputExp(this).calculate();
             }
             catch (Exception exception)
             {
                 throw new ReportError("报表为填报时计算出错,错误信息为 " + exception.Message);
             }
         }
         int_1 = FINISHED;
     }
     catch (ReportError error)
     {
         if (Current != null)
         {
             error.CellId = Current.SourceId;
         }
         throw error;
     }
     catch (Exception exception4)
     {
         if (Current == null)
         {
             throw new ReportError(exception4.Message, exception4);
         }
         if (exception4 is CircularRefineException)
         {
             throw new ReportError(new StringBuilder("单元格").Append(((CircularRefineException)exception4).Cell.SourceId).Append("中有错误,").Append(exception4.Message).ToString().ToString(), exception4);
         }
         throw new ReportError(new StringBuilder("单元格").Append(Current.SourceId).Append("中有错误,").Append(exception4.Message).ToString().ToString(), exception4);
     }
 }
Ejemplo n.º 11
0
        private void method_7()
        {
            short key     = 301;
            int   colSize = ColSize;
            int   num3    = 1;
            int   rowSize = RowSize;

            for (int i = 1; i < rowSize; i++)
            {
                int col = colSize - 1;
                while (col >= 1)
                {
                    CellExt ext3 = getCell(i, col);
                    if ((ext3 != null) && !PropertyDefine.CDT_BLANK.Equals(ext3.getPropValue(key)))
                    {
                        break;
                    }
                    col--;
                }
                if ((col + 1) > num3)
                {
                    num3 = col + 1;
                }
            }
            key            = 308;
            matrix.ColSize = num3;
            rowSize        = RowSize;
            for (int j = 1; j < rowSize; j++)
            {
                CellExt ext2;
                if (method_5(j))
                {
                    continue;
                }
                bool flag = false;
                int  num7 = 1;
                goto Label_00CD;
Label_009F:
                ext2 = getCell(j, num7);
                if (ext2 != null)
                {
                    object obj2 = ext2.getPropValue(key);
                    if ((obj2 != null) && ((bool)obj2))
                    {
                        goto Label_00D4;
                    }
                }
                num7++;
Label_00CD:
                if (num7 >= num3)
                {
                    goto Label_00DF;
                }
                goto Label_009F;
Label_00D4:
                method_10(ext2);
                flag = true;
Label_00DF:
                if (!flag)
                {
                    for (num7 = num3; num7 >= 1; num7--)
                    {
                        CellExt ext = getCell(j, num7);
                        if (ext != null)
                        {
                            method_10(ext);
                        }
                    }
                }
            }
        }
Ejemplo n.º 12
0
Archivo: Class3.cs Proyecto: ikvm/test
 public static CellSet transfer(CellExt1 ecs, CellSet cs, bool only)
 {
     if (cs == null)
     {
         cs = new CellSet(ecs.RowSize, ecs.ColSize);
     }
     for (int i = 0; i < ecs.RowSize; i++)
     {
         for (int j = 0; j < ecs.ColSize; j++)
         {
             CellExt ext = ecs.getCell(i, j);
             if (ext != null)
             {
                 if (ecs.isMerged(i, j))
                 {
                     Cell cell = cs.getCell(ext.Row, ext.Col);
                     if (cell != null)
                     {
                         cell = (Cell)cell.Clone();
                     }
                     cs.setCell(i, j, cell);
                     if (((i <= 1) || (ecs.getCell(i - 1, j) == null)) || ecs.isMerged(i - 1, j))
                     {
                         cs.setPropertyValue(i, j, 707, ext.getPropValue(707));
                         cs.setPropertyValue(i, j, 709, ext.getPropValue(709));
                         cs.setPropertyValue(i, j, 708, ext.getPropValue(708));
                     }
                     if (((j <= 1) || (ecs.getCell(i, j - 1) == null)) || ecs.isMerged(i, j - 1))
                     {
                         cs.setPropertyValue(i, j, 701, ext.getPropValue(701));
                         cs.setPropertyValue(i, j, 703, ext.getPropValue(703));
                         cs.setPropertyValue(i, j, 702, ext.getPropValue(702));
                     }
                     if (((i + 1) == ecs.RowSize) || (ecs.getCell(i + 1, j) == null))
                     {
                         cs.setPropertyValue(i, j, 710, ext.getPropValue(710));
                         cs.setPropertyValue(i, j, 712, ext.getPropValue(712));
                         cs.setPropertyValue(i, j, 711, ext.getPropValue(711));
                     }
                     if (((j + 1) == ecs.ColSize) || (ecs.getCell(i, j + 1) == null))
                     {
                         cs.setPropertyValue(i, j, 704, ext.getPropValue(704));
                         cs.setPropertyValue(i, j, 706, ext.getPropValue(706));
                         cs.setPropertyValue(i, j, 705, ext.getPropValue(705));
                     }
                 }
                 else
                 {
                     Cell cell2 = new Cell();
                     cell2.setValuesMap(ext.PropTable);
                     cs.setCell(i, j, cell2);
                 }
             }
             if (only)
             {
                 ecs.vmethod_3(i, j, null);
             }
         }
     }
     return(cs);
 }