示例#1
0
    private static Class15 smethod_2(BinaryReader A_0)
    {
        FtsWidth width = (FtsWidth)A_0.ReadByte();
        int      num   = A_0.ReadInt16();

        return(new Class15(width, (short)num));
    }
示例#2
0
    internal Class15 method_43()
    {
        int      num  = 8;
        int      num2 = 0;
        FtsWidth auto = FtsWidth.Auto;
        bool     flag = false;

        while (base.method_19())
        {
            string str = base.method_1();
            if (str != null)
            {
                if (!(str == BookmarkStart.b("夭", num)))
                {
                    if (str == BookmarkStart.b("娭䤯䈱儳", num))
                    {
                        auto = Class417.smethod_31(base.method_3());
                    }
                }
                else
                {
                    flag = smethod_0(base.method_3());
                    num2 = this.method_50(base.method_3());
                }
            }
        }
        if ((auto == FtsWidth.Percentage) && !flag)
        {
            num2 /= 50;
        }
        return(new Class15(auto, num2));
    }
示例#3
0
    private Class15 method_74()
    {
        FtsWidth width = (FtsWidth)base.binaryReader_0.ReadByte();
        int      num   = base.binaryReader_0.ReadInt16();

        return(new Class15(width, (short)num));
    }
示例#4
0
    private void method_75(Class15 A_0)
    {
        Class15  class2 = A_0;
        FtsWidth width  = (FtsWidth)base.binaryReader_0.ReadByte();

        class2.method_52(width);
        class2.method_50((width != FtsWidth.Percentage) ? ((float)base.binaryReader_0.ReadInt16()) : (((float)base.binaryReader_0.ReadInt16()) / 50f));
    }
示例#5
0
    internal FtsWidth method_51()
    {
        FtsWidth width = (FtsWidth) base[2];

        if ((this.method_49() > 0f) || ((width != FtsWidth.Point) && (width != FtsWidth.Percentage)))
        {
            return(width);
        }
        return(FtsWidth.Auto);
    }
示例#6
0
 public TableCell(IDocument document) : base((Document)document, null)
 {
     this.color_0         = Color.Empty;
     this.float_3         = float.MinValue;
     this.byte_3          = 1;
     this.int_8           = 1;
     this.int_9           = 1;
     this.short_0         = 1;
     this.ftsWidth_0      = FtsWidth.Auto;
     this.cellWidthType_0 = Spire.Doc.CellWidthType.Auto;
     this.cellFormat_0    = new Spire.Doc.Formatting.CellFormat();
     this.cellFormat_0.method_0(this);
     this.characterFormat_0 = new Spire.Doc.Formatting.CharacterFormat(base.Document);
 }
示例#7
0
    private static void smethod_1(Class15 A_0, PreferredWidth A_1)
    {
        Class15  class2 = A_0;
        FtsWidth auto   = FtsWidth.Auto;

        switch (A_1.Type)
        {
        case WidthType.Percentage:
            auto = FtsWidth.Percentage;
            break;

        case WidthType.Twip:
            auto = FtsWidth.Point;
            break;
        }
        class2.method_52(auto);
        class2.method_50((float)A_1.Value);
    }
示例#8
0
        internal bool method_37()
        {
            bool flag = true;

            if (this.Cells.Count > 1)
            {
                FtsWidth widthUnit = this.Cells[0].CellFormat.WidthUnit;
                if (this.Cells[0].WidthType == FtsWidth.Auto)
                {
                    this.bool_8 = true;
                }
                else if (this.Cells[0].WidthType == FtsWidth.Percentage)
                {
                    this.bool_9 = true;
                }
                int num   = 1;
                int count = this.Cells.Count;
                while (num < count)
                {
                    if (flag && (this.Cells[num].CellFormat.WidthUnit != widthUnit))
                    {
                        flag = false;
                    }
                    if (this.Cells[num].WidthType == FtsWidth.Auto)
                    {
                        this.bool_8 = true;
                    }
                    else if (this.Cells[num].WidthType == FtsWidth.Percentage)
                    {
                        this.bool_9 = true;
                    }
                    num++;
                }
            }
            return(flag);
        }
示例#9
0
        internal void method_39(float A_0)
        {
            if (((this.Cells.Count > 0) && (A_0 > 0f)) && !this.IsSameWidthTypeOfCells)
            {
                List <TableCell> list2 = new List <TableCell>();
                List <TableCell> list3 = new List <TableCell>();
                List <TableCell> list  = new List <TableCell>();
                List <TableCell> list4 = new List <TableCell>();
                foreach (TableCell cell2 in this.Cells)
                {
                    FtsWidth widthType = cell2.WidthType;
                    switch (widthType)
                    {
                    case FtsWidth.None:
                    case FtsWidth.Auto:
                        list3.Add(cell2);
                        break;

                    case FtsWidth.Percentage:
                        list.Add(cell2);
                        break;

                    case FtsWidth.Point:
                        list2.Add(cell2);
                        break;

                    default:
                        if (widthType == FtsWidth.ftsDxaSys)
                        {
                            list4.Add(cell2);
                        }
                        break;
                    }
                }
                if (list3.Count > 0)
                {
                    float num = A_0;
                    if (list2.Count > 0)
                    {
                        foreach (TableCell cell4 in list2)
                        {
                            num -= cell4.Width;
                        }
                    }
                    if (list.Count > 0)
                    {
                        foreach (TableCell cell in list)
                        {
                            num -= (cell.Scaling / 100f) * A_0;
                        }
                    }
                    if (list4.Count > 0)
                    {
                        foreach (TableCell cell3 in list4)
                        {
                            num -= cell3.Width / 20f;
                        }
                    }
                    float num3  = num / ((float)list3.Count);
                    int   num2  = 0;
                    int   count = list3.Count;
                    while (num2 < count)
                    {
                        if (list3[num2].Width == 0f)
                        {
                            list3[num2].Width = num3;
                        }
                        num2++;
                    }
                }
                list2.Clear();
                list2 = null;
                list3.Clear();
                list3 = null;
                list.Clear();
                list = null;
                list4.Clear();
                list4 = null;
            }
        }
示例#10
0
 public void method_43(FtsWidth A_0)
 {
     this.ftsWidth_0 = A_0;
 }
示例#11
0
 internal void method_54(FtsWidth A_0)
 {
     base[2] = A_0;
 }
示例#12
0
 internal Class15(FtsWidth A_0, int A_1)
 {
     this.method_52(A_0);
     this.method_50((float)A_1);
 }
示例#13
0
    internal static void smethod_0(BinaryReader A_0, CellFormat A_1)
    {
        CellMerge start;
        CellMerge none;
        int       num   = A_0.ReadInt16();
        bool      flag  = (num & 1) != 0;
        bool      flag2 = (num & 2) != 0;

        if (flag)
        {
            start = CellMerge.Start;
        }
        else if (flag2)
        {
            start = CellMerge.Continue;
        }
        else
        {
            start = CellMerge.None;
        }
        A_1.SetAttr(0xbe0, start);
        A_1.SetAttr(0xbea, Class417.smethod_36((num & 0x1c) >> 2));
        bool flag3 = (num & 0x20) != 0;

        if ((num & 0x40) != 0)
        {
            none = CellMerge.Start;
        }
        else if (flag3)
        {
            none = CellMerge.Continue;
        }
        else
        {
            none = CellMerge.None;
        }
        A_1.SetAttr(0xbd6, none);
        A_1.SetAttr(0xbf4, (VerticalAlignment)((num & 0x180) >> 7));
        FtsWidth width = (FtsWidth)((num & 0xe00) >> 9);
        int      num2  = A_0.ReadInt16();

        switch (width)
        {
        case FtsWidth.Auto:
            A_1.SetAttr(0xbc6, width);
            A_1.SetAttr(0xbc4, 0f);
            break;

        case FtsWidth.Percentage:
            A_1.SetAttr(0xbc6, width);
            A_1.SetAttr(0xbc4, ((float)num2) / 50f);
            break;

        case FtsWidth.Point:
            A_1.SetAttr(0xbc6, width);
            A_1.SetAttr(0xbc4, ((float)num2) / 20f);
            break;
        }
        A_1.SetAttr(0xc76, (num & 0x1000) != 0);
        A_1.SetAttr(0xc6c, (num & 0x2000) == 0);
        smethod_2(A_0, A_1, 0xc26);
        smethod_2(A_0, A_1, 0xc30);
        smethod_2(A_0, A_1, 0xc3a);
        smethod_2(A_0, A_1, 0xc44);
    }