Beispiel #1
0
    internal static Class925 smethod_1(CellFormat A_0, TableCell A_1)
    {
        Class925   class2 = smethod_0(A_0, A_1);
        CellFormat format = class2.cellFormat_0;

        format.HorizontalMerge = CellMerge.Continue;
        format.SetAttr(0xc26, A_0.Borders.Top);
        format.SetAttr(0xc30, A_0.Borders.Left);
        format.SetAttr(0xc3a, A_0.Borders.Bottom);
        format.SetAttr(0xc44, A_0.Borders.Right);
        format.SetAttr(0xc4e, A_0.Borders.DiagonalDown);
        format.SetAttr(0xc58, A_0.Borders.DiagonalUp);
        format.SetAttr(0xc26, A_0.Borders.Top);
        return(class2);
    }
Beispiel #2
0
    private void method_17(Class477 A_0)
    {
        int num  = smethod_2(A_0.method_0());
        int num2 = this.class656_0.method_14(num);

        for (int i = 0; i < num2; i++)
        {
            A_0.method_1()[i] = Class925.smethod_2();
        }
        int num6 = smethod_3(A_0.method_0(), A_0.method_0().Cells.Count);
        int num4 = this.class656_0.method_14(num6);

        for (int j = num4; j < this.method_9(); j++)
        {
            A_0.method_1()[j] = Class925.smethod_2();
        }
        if ((num2 > 0) || (num4 < this.method_9()))
        {
            this.bool_9  = true;
            this.bool_10 = true;
        }
    }
Beispiel #3
0
    private bool method_21(Class925 A_0, int A_1, int A_2)
    {
        bool flag;

        if (flag = A_0.method_2())
        {
            CellFormat format = A_0.method_0();
            bool       flag2  = A_1 == 0;
            bool       flag3  = A_1 == (this.class982_0.Count - 1);
            bool       flag4  = !flag2 && smethod_1(format, 0xc26, this.class982_0.method_0(A_1 - 1).method_1()[A_2].method_0(), 0xc3a);
            bool       flag7  = !flag3 && smethod_1(format, 0xc3a, this.class982_0.method_0(A_1 + 1).method_1()[A_2].method_0(), 0xc26);
            if (this.border_0 == null)
            {
                return(flag);
            }
            if ((flag2 && this.bool_5) || ((!flag2 && this.bool_7) && !flag4))
            {
                format.SetAttr(0xc26, this.border_0);
            }
            if ((flag3 && this.bool_6) || ((!flag3 && this.bool_7) && !flag7))
            {
                format.SetAttr(0xc3a, this.border_0);
            }
            bool flag6 = A_2 == 0;
            bool flag5 = A_2 == (this.method_9() - 1);
            bool flag8 = !flag6 && smethod_1(format, 0xc30, this.class982_0.method_0(A_1).method_1()[A_2 - 1].method_0(), 0xc44);
            bool flag9 = !flag5 && smethod_1(format, 0xc44, this.class982_0.method_0(A_1).method_1()[A_2 + 1].method_0(), 0xc30);
            if ((flag6 && this.bool_3) || ((!flag6 && this.bool_8) && !flag8))
            {
                format.SetAttr(0xc30, this.border_0);
            }
            if ((flag5 && this.bool_4) || ((!flag5 && this.bool_8) && !flag9))
            {
                format.SetAttr(0xc44, this.border_0);
            }
        }
        return(flag);
    }
Beispiel #4
0
    private void method_19()
    {
        for (int i = 0; i < this.method_9(); i++)
        {
            int num3 = 1;
            for (int j = this.class982_0.Count - 1; j >= 0; j--)
            {
                Class925 class2 = this.class982_0.method_0(j).method_1()[i];
                switch (class2.method_0().VerticalMerge)
                {
                case CellMerge.None:
                case CellMerge.Start:
                    class2.method_6(num3);
                    num3 = 1;
                    break;

                case CellMerge.Continue:
                    num3++;
                    break;
                }
            }
        }
    }
Beispiel #5
0
    private void method_18()
    {
        for (int i = 0; i < this.class982_0.Count; i++)
        {
            int num3 = 1;
            for (int j = this.method_9() - 1; j >= 0; j--)
            {
                Class925 class2 = this.class982_0.method_0(i).method_1()[j];
                switch (class2.method_0().HorizontalMerge)
                {
                case CellMerge.None:
                case CellMerge.Start:
                    class2.method_0().TwipCellWidth = this.method_5(j, num3);
                    class2.method_4(num3);
                    num3 = 1;
                    break;

                case CellMerge.Continue:
                    num3++;
                    break;
                }
            }
        }
    }
Beispiel #6
0
    private void method_14()
    {
        RowCollection rows  = this.table_0.Rows;
        int           count = rows.Count;

        for (int i = 0; i < count; i++)
        {
            Class477 class2 = new Class477(this.method_9(), rows[i]);
            this.class982_0.Add(class2);
            this.method_17(class2);
            CellCollection cells = class2.method_0().Cells;
            int            num9  = cells.Count;
            for (int j = 0; j < num9; j++)
            {
                int        num4       = 0;
                float      width      = 0f;
                Section    section    = this.table_0.method_55();
                TableCell  cell4      = cells[j];
                CellFormat cellFormat = cell4.CellFormat;
                if (((cell4.CellWidthType == CellWidthType.Auto) && (cellFormat.HorizontalMerge != CellMerge.Continue)) && (cellFormat.VerticalMerge != CellMerge.Continue))
                {
                    if (this.table_0.PreferredTableWidth.method_51() == FtsWidth.Percentage)
                    {
                        if (this.table_0.IsInCell)
                        {
                            TableCell owner = this.table_0.Owner as TableCell;
                            if (owner.CellWidthType == CellWidthType.Percentage)
                            {
                                float num15 = owner.CellFormat.SamePaddingsAsTable ? owner.OwnerRow.OwnerTable.TableFormat.Paddings.PaddingWidth : owner.CellFormat.Paddings.PaddingWidth;
                                width = ((owner.Scaling / 100f) * section.PageSetup.ClientWidth) - num15;
                            }
                            else if (owner.CellWidthType == CellWidthType.Auto)
                            {
                                width = section.PageSetup.ClientWidth - this.table_0.TableFormat.Paddings.PaddingWidth;
                            }
                            else
                            {
                                width = owner.Width;
                            }
                        }
                        else
                        {
                            width = (section.PageSetup.ClientWidth * this.table_0.PreferredTableWidth.method_49()) / 100f;
                        }
                    }
                    else if (this.table_0.PreferredTableWidth.method_51() == FtsWidth.Auto)
                    {
                        if (this.table_0.IsInCell)
                        {
                            TableCell cell2 = this.table_0.Owner as TableCell;
                            if (cell2.CellWidthType == CellWidthType.Percentage)
                            {
                                float num11 = cell2.CellFormat.SamePaddingsAsTable ? cell2.OwnerRow.OwnerTable.TableFormat.Paddings.PaddingWidth : cell2.CellFormat.Paddings.PaddingWidth;
                                width = ((cell2.Scaling / 100f) * section.PageSetup.ClientWidth) - num11;
                            }
                            else if (cell2.CellWidthType == CellWidthType.Auto)
                            {
                                width = section.PageSetup.ClientWidth - this.table_0.TableFormat.Paddings.PaddingWidth;
                            }
                            else
                            {
                                width = cell2.Width;
                            }
                        }
                        else
                        {
                            width = section.PageSetup.ClientWidth - this.table_0.TableFormat.Paddings.PaddingWidth;
                        }
                    }
                    else
                    {
                        width = this.table_0.PreferredTableWidth.method_49();
                    }
                    num4 = (int)((width / ((float)num9)) * 20f);
                }
                else if (cell4.CellWidthType == CellWidthType.Percentage)
                {
                    if (this.table_0.PreferredTableWidth.method_51() == FtsWidth.Percentage)
                    {
                        if (this.table_0.IsInCell)
                        {
                            TableCell cell7 = this.table_0.Owner as TableCell;
                            if (cell7.CellWidthType == CellWidthType.Percentage)
                            {
                                float num17 = cell7.CellFormat.SamePaddingsAsTable ? cell7.OwnerRow.OwnerTable.TableFormat.Paddings.PaddingWidth : cell7.CellFormat.Paddings.PaddingWidth;
                                width = ((cell7.Scaling / 100f) * section.PageSetup.ClientWidth) - num17;
                            }
                            else if (cell7.CellWidthType == CellWidthType.Auto)
                            {
                                width = section.PageSetup.ClientWidth - this.table_0.TableFormat.Paddings.PaddingWidth;
                            }
                            else
                            {
                                width = cell7.Width;
                            }
                        }
                        else
                        {
                            width = (section.PageSetup.ClientWidth * this.table_0.PreferredTableWidth.method_49()) / 100f;
                        }
                    }
                    else if (this.table_0.PreferredTableWidth.method_51() == FtsWidth.Auto)
                    {
                        if (this.table_0.IsInCell)
                        {
                            TableCell cell = this.table_0.Owner as TableCell;
                            if (cell.CellWidthType == CellWidthType.Percentage)
                            {
                                float num16 = cell.CellFormat.SamePaddingsAsTable ? cell.OwnerRow.OwnerTable.TableFormat.Paddings.PaddingWidth : cell.CellFormat.Paddings.PaddingWidth;
                                width = ((cell.Scaling / 100f) * section.PageSetup.ClientWidth) - num16;
                            }
                            else if (cell.CellWidthType == CellWidthType.Auto)
                            {
                                width = section.PageSetup.ClientWidth - this.table_0.TableFormat.Paddings.PaddingWidth;
                            }
                            else
                            {
                                width = cell.Width;
                            }
                        }
                        else
                        {
                            width = section.PageSetup.ClientWidth - this.table_0.TableFormat.Paddings.PaddingWidth;
                        }
                    }
                    else
                    {
                        width = this.table_0.PreferredTableWidth.method_49();
                    }
                    num4 = (int)(((cell4.Scaling * width) / 100f) * 20f);
                }
                else
                {
                    num4 = (int)(cellFormat.CellWidthEx * 20f);
                }
                if (((cellFormat.HorizontalMerge != CellMerge.Continue) && (cellFormat.VerticalMerge != CellMerge.Continue)) || (num4 != 0))
                {
                    Class925 class3 = Class925.smethod_0(cellFormat, cell4);
                    int      num12  = smethod_3(class2.method_0(), j);
                    int      index  = this.class656_0.method_14(num12);
                    int      num13  = num12 + num4;
                    int      num6   = this.class656_0.method_14(num13);
                    class2.method_1()[index] = class3;
                    TableCell cell6 = cell4;
                    TableCell cell5 = cell4;
                    if (cellFormat.HorizontalMerge == CellMerge.Start)
                    {
                        for (int m = j + 1; m < num9; m++)
                        {
                            TableCell cell8 = cells[m];
                            if (cell8.CellFormat.HorizontalMerge != CellMerge.Continue)
                            {
                                break;
                            }
                            cell6 = cell8;
                        }
                    }
                    if (cellFormat.VerticalMerge == CellMerge.Start)
                    {
                        for (int n = i + 1; n < count; n++)
                        {
                            TableCell cell9 = smethod_4(rows[n], num12);
                            if ((cell9 == null) || (cell9.CellFormat.VerticalMerge != CellMerge.Continue))
                            {
                                break;
                            }
                            cell5 = cell9;
                        }
                    }
                    CellFormat format2 = class3.method_0();
                    this.method_15(format2, cell4, 0xc26);
                    this.method_15(format2, cell4, 0xc30);
                    this.method_15(format2, cell5, 0xc3a);
                    this.method_15(format2, cell6, 0xc44);
                    this.method_15(format2, cell4, 0xc4e);
                    this.method_15(format2, cell4, 0xc58);
                    this.method_16(format2, cell4, 0xbfe);
                    this.method_16(format2, cell4, 0xc12);
                    this.method_16(format2, cell4, 0xc08);
                    this.method_16(format2, cell4, 0xc1c);
                    for (int k = index + 1; k < num6; k++)
                    {
                        class2.method_1()[k] = Class925.smethod_1(format2, cell4);
                    }
                    if ((num6 - index) > 1)
                    {
                        this.bool_9 = true;
                    }
                }
            }
        }
    }