Пример #1
0
    public bool imethod_0(SprmCode A_0, SprmType A_1, int A_2, BinaryReader A_3)
    {
        if (A_1 != SprmType.Tap)
        {
            return(true);
        }
        base.binaryReader_0 = A_3;
        this.class758_0.method_31(A_3);
        this.class758_0.method_30(base.method_54() ? null : this.method_94());
        SprmCode code = A_0;

        if (code <= SprmCode.TTextFlow)
        {
            if (code <= SprmCode.TJc)
            {
                if (code <= SprmCode.TCVertBands)
                {
                    switch (code)
                    {
                    case SprmCode.TCHorzBands:
                        base.wordAttrCollection_0.SetAttr(0x1194, (long)A_3.ReadByte());
                        goto Label_0BB9;

                    case SprmCode.TCVertBands:
                        base.wordAttrCollection_0.SetAttr(0x119e, (long)A_3.ReadByte());
                        goto Label_0BB9;

                    case SprmCode.TCellVertAlignStyle:
                        base.wordAttrCollection_0.SetAttr(0xbf4, (VerticalAlignment)A_3.ReadByte());
                        goto Label_0BB9;

                    case SprmCode.TFCantSplit90:
                    {
                        bool flag6 = !A_3.ReadBoolean();
                        if (this.nfibEnum_0 < NFibEnum.Word2002)
                        {
                            base.wordAttrCollection_0.SetAttr(0x1108, flag6);
                        }
                        goto Label_0BB9;
                    }

                    case SprmCode.TTableHeader:
                        base.wordAttrCollection_0.SetAttr(0xfc8, A_3.ReadByte() == 1);
                        goto Label_0BB9;

                    case SprmCode.TFCantOverlap:
                    {
                        bool flag2 = A_3.ReadByte() == 0;
                        (base.wordAttrCollection_0 as RowFormat).Positioning.SetAttr(0x45, flag2);
                        goto Label_0BB9;
                    }

                    case SprmCode.TFCantSplit:
                    {
                        bool flag3 = !A_3.ReadBoolean();
                        base.wordAttrCollection_0.SetAttr(0x1108, flag3);
                        goto Label_0BB9;
                    }
                    }
                    goto Label_0B9F;
                }
                if (code <= SprmCode.TFAllowAutoFit)
                {
                    if (code != SprmCode.TPositionCode)
                    {
                        if (code != SprmCode.TFAllowAutoFit)
                        {
                            goto Label_0B9F;
                        }
                        base.wordAttrCollection_0.SetAttr(0x1090, (A_3.ReadByte() == 1) ? LayoutType.AutoFit : LayoutType.Fixed);
                    }
                    else
                    {
                        base.method_51(0x3f, 0x40);
                    }
                }
                else if (code != SprmCode.TWall)
                {
                    if (code != SprmCode.TJc)
                    {
                        goto Label_0B9F;
                    }
                    base.wordAttrCollection_0.SetAttr(0x13ed, (RowAlignment)A_3.ReadInt16());
                }
                else
                {
                    this.method_71();
                }
                goto Label_0BB9;
            }
            if (code <= SprmCode.TIstd)
            {
                if (code <= SprmCode.TFBiDi)
                {
                    if (code != SprmCode.TJcEx)
                    {
                        if (code != SprmCode.TFBiDi)
                        {
                            goto Label_0B9F;
                        }
                        base.wordAttrCollection_0.SetAttr(0x111c, A_3.ReadInt16() != 0);
                    }
                    else if (base.wordAttrCollection_0 is RowFormat)
                    {
                        this.method_93().HorizontalAlignment = (RowAlignment)A_3.ReadInt16();
                    }
                }
                else if (code != SprmCode.TMerge)
                {
                    if (code != SprmCode.TIstd)
                    {
                        goto Label_0B9F;
                    }
                    this.method_93().Istd = A_3.ReadUInt16();
                }
                else
                {
                    this.class758_0.method_5();
                }
                goto Label_0BB9;
            }
            if (code <= SprmCode.TIpgp)
            {
                if (code != SprmCode.TTlp)
                {
                    if (code == SprmCode.TIpgp)
                    {
                        goto Label_0BB9;
                    }
                    goto Label_0B9F;
                }
                A_3.ReadInt16();
                base.wordAttrCollection_0.SetAttr(0x102c, Class531.smethod_2(A_3.ReadInt16()));
                goto Label_0BB9;
            }
            switch (code)
            {
            case SprmCode.TInsert:
                this.class758_0.method_4(this.method_93());
                goto Label_0BB9;

            case SprmCode.TDxaCol:
            {
                int num5 = A_3.ReadInt16();
                this.class758_0.method_1(num5, ((float)A_3.ReadInt16()) / 20f);
                goto Label_0BB9;
            }

            case SprmCode.TTextFlow:
            {
                int           num2      = A_3.ReadUInt16();
                TextDirection direction = Class417.smethod_36(A_3.ReadUInt16());
                this.class758_0.method_0(num2, 0xbea, direction);
                goto Label_0BB9;
            }

            case SprmCode.TRsidTr:
                base.wordAttrCollection_0.SetAttr(0x1130, A_3.ReadInt32());
                goto Label_0BB9;
            }
        }
        else if (code > SprmCode.TFCellNoWrap)
        {
            if (code <= SprmCode.TCnf)
            {
                if (code <= SprmCode.TCellBrcType)
                {
                    switch (code)
                    {
                    case SprmCode.TTableShd:
                        base.method_42(0x10ea);
                        goto Label_0BB9;

                    case SprmCode.TCellBrcType:
                        this.class758_0.method_9(A_2);
                        goto Label_0BB9;

                    case SprmCode.TCellHideMark:
                    {
                        int  num6  = A_3.ReadUInt16();
                        bool flag4 = A_3.ReadBoolean();
                        this.class758_0.method_0(num6, 0xc94, flag4);
                        goto Label_0BB9;
                    }
                    }
                    goto Label_0B9F;
                }
                if (code != SprmCode.TPropRMark)
                {
                    if (code != SprmCode.TCnf)
                    {
                        goto Label_0B9F;
                    }
                    base.method_53(this, A_3, A_2, TableStylePrType.Cell);
                }
                else
                {
                    base.method_45(new RowFormat(base.document_0), false);
                }
                goto Label_0BB9;
            }
            if (code > SprmCode.TCellShdStyle)
            {
                switch (code)
                {
                case SprmCode.TTableWidth:
                    this.method_75(base.wordAttrCollection_0.method_32(0x1086) as Class15);
                    goto Label_0BB9;

                case SprmCode.TWidthBefore:
                    this.method_78(0x109a);
                    goto Label_0BB9;

                case SprmCode.TWidthAfter:
                    this.method_78(0x10a4);
                    goto Label_0BB9;

                case SprmCode.TFitText:
                {
                    int  num8  = A_3.ReadUInt16();
                    bool flag5 = A_3.ReadBoolean();
                    this.class758_0.method_0(num8, 0xc76, flag5);
                    goto Label_0BB9;
                }

                case SprmCode.TLeftIndent:
                    this.method_77(0x10f4);
                    goto Label_0BB9;
                }
            }
            else
            {
                switch (code)
                {
                case SprmCode.TCellShdExRaw:
                case SprmCode.TCellShdExRaw2:
                case SprmCode.TCellShdExRaw3:
                    this.class758_0.method_8(A_0, A_2);
                    goto Label_0BB9;

                case SprmCode.TCellBrcBottomStyle:
                case SprmCode.TCellBrcLeftStyle:
                case SprmCode.TCellBrcRightStyle:
                case SprmCode.TCellBrcInsideHStyle:
                case SprmCode.TCellBrcInsideVStyle:
                case SprmCode.TCellBrcTL2BRStyle:
                case SprmCode.TCellBrcTR2BLStyle:
                    goto Label_0AA3;

                case SprmCode.TCellShdStyle:
                {
                    Class16 class3 = Class1106.smethod_1(A_3, null);
                    if (base.method_54())
                    {
                        base.wordAttrCollection_0.SetAttr(0xc62, class3);
                    }
                    else if (base.class13_0 != null)
                    {
                        base.class13_0.Interface8.imethod_1().SetAttr(0xc62, class3);
                    }
                    goto Label_0BB9;
                }
                }
            }
        }
        else
        {
            switch (code)
            {
            case SprmCode.TFrameLeft:
                base.method_47(0x3d, 0x3b);
                goto Label_0BB9;

            case SprmCode.TFrameTop:
                base.method_48(0x3e, 60);
                goto Label_0BB9;

            case SprmCode.TFromTextLeft:
                (base.wordAttrCollection_0 as RowFormat).Positioning.SetAttr(0x43, ((float)A_3.ReadInt16()) / 20f);
                goto Label_0BB9;

            case SprmCode.TFromTextTop:
                (base.wordAttrCollection_0 as RowFormat).Positioning.SetAttr(0x41, ((float)A_3.ReadInt16()) / 20f);
                goto Label_0BB9;

            case SprmCode.TDyaRowHeight:
            {
                TableRowHeightType auto;
                int num4 = A_3.ReadInt16();
                if (num4 == 0)
                {
                    auto = TableRowHeightType.Auto;
                }
                else if (num4 > 0)
                {
                    auto = TableRowHeightType.AtLeast;
                }
                else
                {
                    auto = TableRowHeightType.Exactly;
                }
                base.wordAttrCollection_0.SetAttr(0x100e, auto);
                base.wordAttrCollection_0.SetAttr(0x1018, ((float)Math.Abs(num4)) / 20f);
                goto Label_0BB9;
            }

            case SprmCode.TFromTextRight:
                (base.wordAttrCollection_0 as RowFormat).Positioning.SetAttr(0x44, ((float)A_3.ReadInt16()) / 20f);
                goto Label_0BB9;

            case SprmCode.TFromTextBottom:
                (base.wordAttrCollection_0 as RowFormat).Positioning.SetAttr(0x42, ((float)A_3.ReadInt16()) / 20f);
                goto Label_0BB9;

            case SprmCode.TDxaLeft:
                this.int_1 = A_3.ReadInt16();
                goto Label_0BB9;

            case SprmCode.TDxaGapHalf:
            {
                int num9 = A_3.ReadInt16();
                if (this.nfibEnum_0 == NFibEnum.Word97)
                {
                    this.method_93().Paddings.Left  = num9;
                    this.method_93().Paddings.Right = num9;
                }
                goto Label_0BB9;
            }

            case SprmCode.TTableBorders80:
            case SprmCode.TTableBorders:
                this.method_70(A_0);
                goto Label_0BB9;

            case SprmCode.TDefTable:
                this.class758_0.method_2(this.method_93(), A_2, this.nfibEnum_0);
                if (!this.method_93().method_6(0xfb4) && !this.method_93().method_6(0x10e0))
                {
                    this.method_93().Paddings.Left  = 0f;
                    this.method_93().Paddings.Right = 0f;
                }
                goto Label_0BB9;

            case SprmCode.TCellShd:
            case SprmCode.TCellShdEx:
            case SprmCode.TCellShdEx2:
            case SprmCode.TCellShdEx3:
                if (!this.method_96())
                {
                    this.class758_0.method_8(A_0, A_2);
                }
                goto Label_0BB9;

            case SprmCode.TCellBrcTopStyle:
                goto Label_0AA3;

            case SprmCode.TBrcTopCv:
            case SprmCode.TBrcLeftCv:
            case SprmCode.TBrcBottomCv:
            case SprmCode.TBrcRightCv:
                this.class758_0.method_12(A_0, A_2);
                goto Label_0BB9;

            case SprmCode.TSetBrc80:
            case SprmCode.TSetBrc:
                this.class758_0.method_10(A_0);
                goto Label_0BB9;

            case SprmCode.TVertMerge:
                this.class758_0.method_6();
                goto Label_0BB9;

            case SprmCode.TVertAlign:
            {
                int num7 = A_3.ReadUInt16();
                VerticalAlignment alignment = (VerticalAlignment)A_3.ReadByte();
                this.class758_0.method_0(num7, 0xbf4, alignment);
                goto Label_0BB9;
            }

            case SprmCode.TCellPadding:
                this.class758_0.method_7();
                goto Label_0BB9;

            case SprmCode.TCellSpacingDefault:
                this.method_72();
                goto Label_0BB9;

            case SprmCode.TCellPaddingDefault:
                this.method_73();
                goto Label_0BB9;

            case SprmCode.TCellWidth:
            {
                int     num3   = A_3.ReadInt16();
                Class15 class2 = this.method_74();
                switch (class2.method_51())
                {
                case FtsWidth.None:
                    this.class758_0.method_0(num3, 0xbc6, FtsWidth.None);
                    this.class758_0.method_0(num3, 0xbc4, 0f);
                    break;

                case FtsWidth.Auto:
                    this.class758_0.method_0(num3, 0xbc6, FtsWidth.Auto);
                    this.class758_0.method_0(num3, 0xbc4, 0f);
                    break;

                case FtsWidth.Percentage:
                    this.class758_0.method_0(num3, 0xbc6, FtsWidth.Percentage);
                    this.class758_0.method_0(num3, 0xbc4, class2.method_49() / 50f);
                    break;

                case FtsWidth.Point:
                    this.class758_0.method_0(num3, 0xbc6, FtsWidth.Point);
                    this.class758_0.method_0(num3, 0xbc4, class2.method_49() / 20f);
                    break;
                }
                goto Label_0BB9;
            }

            case SprmCode.TFCellNoWrap:
            {
                int  num  = A_3.ReadUInt16();
                bool flag = !A_3.ReadBoolean();
                this.class758_0.method_0(num, 0xc6c, flag);
                goto Label_0BB9;
            }
            }
        }
        goto Label_0B9F;
Label_0AA3:
        base.method_39(smethod_1(A_0));
        goto Label_0BB9;
Label_0B9F:
        return(false);

Label_0BB9:
        return(true);
    }
Пример #2
0
    private static void smethod_3(RowFormat A_0, Class581 A_1)
    {
        int      num    = 4;
        Class394 class2 = A_1.imethod_1();
        string   key    = class2.method_1();

        if (key != null)
        {
            int num2;
            if (Class1160.dictionary_153 == null)
            {
                Dictionary <string, int> dictionary1 = new Dictionary <string, int>(10);
                dictionary1.Add(BookmarkStart.b("帩丫䈭术", num), 0);
                dictionary1.Add(BookmarkStart.b("䀩伫", num), 1);
                dictionary1.Add(BookmarkStart.b("帩丫䈭猯圱堳娵欷䨹崻崽⤿ⱁ⍃", num), 2);
                dictionary1.Add(BookmarkStart.b("帩丫䈭礯就倳", num), 3);
                dictionary1.Add(BookmarkStart.b("帩丫䈭爯崱䘳刵崷䠹伻", num), 4);
                dictionary1.Add(BookmarkStart.b("天䐫䨭", num), 5);
                dictionary1.Add(BookmarkStart.b("帩丫䈭簯匱䴳夵䴷丹", num), 6);
                dictionary1.Add(BookmarkStart.b("帩丫䈭猯圱堳娵男嬹主", num), 7);
                dictionary1.Add(BookmarkStart.b("帩丫䈭簯崱嬳崵", num), 8);
                dictionary1.Add(BookmarkStart.b("䬩䈫䀭弯䘱唳䈵儷唹刻", num), 9);
                Class1160.dictionary_153 = dictionary1;
            }
            if (Class1160.dictionary_153.TryGetValue(key, out num2))
            {
                switch (num2)
                {
                case 0:
                    class2.method_46(A_0);
                    return;

                case 1:
                    A_0.HorizontalAlignment = Class859.smethod_0(class2.method_28());
                    return;

                case 2:
                    A_0.SetAttr(0x10c2, class2.method_42());
                    return;

                case 3:
                    A_0.SetAttr(0x10f4, class2.method_42());
                    return;

                case 4:
                    smethod_4(A_0, class2);
                    return;

                case 5:
                    A_0.SetAttr(0x10ea, class2.method_39());
                    return;

                case 6:
                    smethod_5(A_0, class2);
                    return;

                case 7:
                    smethod_6(A_0, class2);
                    return;

                case 8:
                    A_0.SetAttr(0x102c, Class531.smethod_2(Class114.smethod_8(class2.method_28())));
                    return;

                case 9:
                    Class519.smethod_10(A_1, A_0);
                    return;
                }
            }
        }
        class2.vmethod_1();
    }