Example #1
0
    private bool imethod_0(SprmCode A_0, SprmType A_1, int A_2, BinaryReader A_3)
    {
        SprmType type = A_1;

        if (type == SprmType.Pap)
        {
            return(this.class141_0.imethod_0(A_0, A_1, A_2, A_3));
        }
        if (type != SprmType.Tap)
        {
            return(true);
        }
        if (this.rowFormat_0 == null)
        {
            this.rowFormat_0 = new RowFormat(this.class764_0.method_42());
            this.rowFormat_0.SetAttr(0x1090, LayoutType.Fixed);
            this.class143_0.method_64(this.rowFormat_0, this.class1150_0.int_0);
        }
        return(this.class143_0.imethod_0(A_0, A_1, A_2, A_3));
    }
Example #2
0
        /// <summary>
        /// parses the byte to retrieve a SPRM
        /// </summary>
        /// <param name="bytes">The bytes</param>
        public SinglePropertyModifier(byte[] bytes)
        {
            //first 2 bytes are the operation code ...
            this.OpCode = (OperationCode)System.BitConverter.ToUInt16(bytes, 0);

            //... whereof bit 9 is fSpec ...
            UInt32 j = (UInt32)this.OpCode << 22;

            j = j >> 31;
            if (j == 1)
            {
                this.fSpec = true;
            }
            else
            {
                this.fSpec = false;
            }

            //... and bits 10,11,12 are the type ...
            UInt32 i = (UInt32)this.OpCode << 19;

            i         = i >> 29;
            this.Type = (SprmType)i;

            //... and last 3 bits are the spra
            byte spra   = (byte)((Int32)this.OpCode >> 13);
            byte opSize = GetOperandSize(spra);

            if (opSize == 255)
            {
                switch (OpCode)
                {
                case OperationCode.sprmTDefTable:
                case OperationCode.sprmTDefTable10:
                    //the variable length stand in the bytes 2 and 3
                    Int16 opSizeTable = System.BitConverter.ToInt16(bytes, 2);
                    //and the arguments start at the byte after that (byte3)
                    this.Arguments = new byte[opSizeTable - 1];
                    //Arguments start at byte 4
                    Array.Copy(bytes, 4, this.Arguments, 0, Arguments.Length);
                    break;

                case OperationCode.sprmPChgTabs:
                    this.Arguments = new byte[bytes[2]];
                    Array.Copy(bytes, 3, this.Arguments, 0, Arguments.Length);
                    break;

                default:
                    //the variable length stand in the byte after the opcode (byte2)
                    opSize = bytes[2];
                    //and the arguments start at the byte after that (byte3)
                    this.Arguments = new byte[opSize];
                    Array.Copy(bytes, 3, this.Arguments, 0, Arguments.Length);
                    break;
                }
            }
            else
            {
                this.Arguments = new byte[opSize];
                Array.Copy(bytes, 2, this.Arguments, 0, Arguments.Length);
            }
        }
Example #3
0
    internal void method_1(byte[] A_0)
    {
        int num = 6;

        if (A_0 != null)
        {
            Stream baseStream = this.binaryReader_0.BaseStream;
            baseStream.Position = 0L;
            baseStream.Write(A_0, 0, A_0.Length);
            baseStream.Position = 0L;
            for (int i = 0; baseStream.Position < A_0.Length; i++)
            {
                int      position = (int)baseStream.Position;
                SprmCode code     = (SprmCode)this.binaryReader_0.ReadUInt16();
                int      count    = smethod_1(this.binaryReader_0, code);
                SprmType type     = (SprmType)(((int)(code & 0x1c00)) >> 10);
                if (bool_1)
                {
                    byte[] buffer = new byte[count];
                    long   num8   = baseStream.Position;
                    baseStream.Read(buffer, 0, count);
                    baseStream.Position = num8;
                }
                if (this.method_0(code, i))
                {
                    int      num4   = this.binaryReader_0.ReadInt32();
                    Class428 class2 = Class430.smethod_0(this.binaryReader_1, num4);
                    if (this.class479_0 == null)
                    {
                        this.class479_0 = new Class479(this.interface15_0, this.binaryReader_1);
                    }
                    this.class479_0.method_2(this.bool_0);
                    this.class479_0.method_1(class2.method_2());
                    baseStream.Position = A_0.Length;
                }
                else
                {
                    int num6 = (int)baseStream.Position;
                    int num2 = num6 + count;
                    if (!this.interface15_0.imethod_0(code, type, count, this.binaryReader_0) && bool_1)
                    {
                        int num9 = Math.Min((int)(num2 - position), (int)(A_0.Length - position));
                        string.Format(BookmarkStart.b("樫䄭䔯就倳ᘵ䴷吹堻儽⌿㝁⥃⍅♇㹉⥋⩍灏őѓѕᕗ恙❛湝婟㩡ᥣ䙥ᡧ୩ṫ཭ᵯ᝱s፵੷婹ၻ᭽늇붋벏늑ꚛ뺝\udb9f\u90a1\ud9a3\u88a5", num), (int)code, count, Class85.smethod_5(A_0, position, num9));
                    }
                    if (baseStream.Position != num2)
                    {
                        if ((baseStream.Position != num6) && (baseStream.Position == num2))
                        {
                            switch (code)
                            {
                            case SprmCode.TCellShdEx:
                            case SprmCode.TCellShdExRaw:
                            case SprmCode.PChgTabs:
                            case SprmCode.CShdEx:
                                goto Label_01CC;
                            }
                            throw new InvalidOperationException(string.Format(BookmarkStart.b("攫䀭匯崱䘳䐵崷夹䠻刽㤿扁㙃⍅⥇⹉汋ᵍOQᥓ汕⍗橙晛ٝᵟ䱡䑣⍥ၧᩩ५൭ѯ᝱ၳ噵ͷ䭹Ż剽ꁿꢇ늑꒕몙ﺛ풟잡힣袥", num), (int)code, count, baseStream.Position - num6));
                        }
                        baseStream.Position = num2;
                    }
                    Label_01CC :;
                }
            }
        }
    }
Example #4
0
    public bool imethod_0(SprmCode A_0, SprmType A_1, int A_2, BinaryReader A_3)
    {
        if (A_1 != SprmType.Pap)
        {
            return(true);
        }
        base.binaryReader_0 = A_3;
        SprmCode code = A_0;

        if (code > SprmCode.PNestEx)
        {
            if (code <= SprmCode.PDxaLeft1)
            {
                switch (code)
                {
                case SprmCode.PIpgp:
                case SprmCode.PTableProps:
                    goto Label_1033;

                case SprmCode.PRsid:
                    switch (base.binaryReader_0.ReadInt32())
                    {
                    case 0:
                        base.wordAttrCollection_0.SetAttr(0x62c, false);
                        break;

                    case 1:
                        base.wordAttrCollection_0.SetAttr(0x62c, true);
                        break;
                    }
                    goto Label_1033;

                case SprmCode.PBrcBar:
                    base.method_38(0x578);
                    goto Label_1033;

                case SprmCode.PBrcTop:
                    base.method_38(0x546);
                    goto Label_1033;

                case SprmCode.PBrcLeft:
                    base.method_38(0x550);
                    goto Label_1033;

                case SprmCode.PBrcBottom:
                    base.method_38(0x55a);
                    goto Label_1033;

                case SprmCode.PBrcRight:
                    base.method_38(0x564);
                    goto Label_1033;

                case SprmCode.PBrcBetween:
                    base.method_38(0x56e);
                    goto Label_1033;

                case SprmCode.PDyaLine:
                {
                    LineSpacingRule exactly;
                    int             num2 = base.binaryReader_0.ReadInt16();
                    bool            flag = base.binaryReader_0.ReadInt16() != 0;
                    if (num2 >= 0)
                    {
                        exactly = flag ? LineSpacingRule.Multiple : LineSpacingRule.AtLeast;
                    }
                    else
                    {
                        exactly = LineSpacingRule.Exactly;
                    }
                    base.wordAttrCollection_0.SetAttr(0x677, exactly);
                    float num3 = ((float)num2) / 20f;
                    base.wordAttrCollection_0.SetAttr(0x672, num3);
                    goto Label_1033;
                }

                case SprmCode.PDxaRight80:
                    base.wordAttrCollection_0.SetAttr(0x65e, ((float)base.binaryReader_0.ReadInt16()) / 20f);
                    goto Label_1033;

                case SprmCode.PDxaLeft80:
                    this.method_70(0x654, ((float)base.binaryReader_0.ReadInt16()) / 20f);
                    goto Label_1033;

                case SprmCode.PDxaLeft180:
                    this.method_70(0x668, ((float)base.binaryReader_0.ReadInt16()) / 20f);
                    goto Label_1033;

                case SprmCode.PItap:
                    if (this.class1150_0 != null)
                    {
                        this.class1150_0.int_0 = base.binaryReader_0.ReadInt32();
                        if ((this.class1150_0.int_0 < 0) || (this.class1150_0.int_0 > 0x3e8))
                        {
                            this.class1150_0.int_0 = 1;
                        }
                    }
                    goto Label_1033;

                case SprmCode.PDxaAbs:
                    base.method_47(3, 8);
                    goto Label_1033;

                case SprmCode.PDyaAbs:
                    base.method_48(4, 15);
                    goto Label_1033;

                case SprmCode.PDxaWidth:
                    (base.wordAttrCollection_0 as ParagraphFormat).Frame.SetAttr(0x11, base.binaryReader_0.ReadInt16());
                    goto Label_1033;

                case SprmCode.PDyaFromText:
                    (base.wordAttrCollection_0 as ParagraphFormat).Frame.SetAttr(0x10, base.binaryReader_0.ReadInt16());
                    goto Label_1033;

                case SprmCode.PDxaFromText:
                    (base.wordAttrCollection_0 as ParagraphFormat).Frame.SetAttr(9, base.binaryReader_0.ReadInt16());
                    goto Label_1033;

                case SprmCode.PDxaRight:
                    base.wordAttrCollection_0.SetAttr(0x47e, ((float)base.binaryReader_0.ReadInt16()) / 20f);
                    goto Label_1033;

                case SprmCode.PDxaLeft:
                    this.method_70(0x488, ((float)base.binaryReader_0.ReadInt16()) / 20f);
                    goto Label_1033;

                case SprmCode.PDxaLeft1:
                    this.method_70(0x492, ((float)base.binaryReader_0.ReadInt16()) / 20f);
                    goto Label_1033;
                }
            }
            else
            {
                if (code <= SprmCode.PAnld)
                {
                    if (code <= SprmCode.PIstdPermute)
                    {
                        switch (code)
                        {
                        case SprmCode.PDyaBefore:
                            base.wordAttrCollection_0.SetAttr(0x4b0, ((float)base.binaryReader_0.ReadInt16()) / 20f);
                            goto Label_1033;

                        case SprmCode.PDyaAfter:
                            base.wordAttrCollection_0.SetAttr(0x4c4, ((float)base.binaryReader_0.ReadInt16()) / 20f);
                            goto Label_1033;

                        case SprmCode.PIstdPermute:
                        {
                            A_3.ReadByte();
                            int   num7     = A_3.ReadUInt16();
                            int   num9     = A_3.ReadUInt16();
                            int   num11    = num9 - num7;
                            int[] numArray = new int[num11 + 1];
                            for (int i = 0; i < numArray.Length; i++)
                            {
                                numArray[i] = A_3.ReadUInt16();
                            }
                            if ((this.method_82().Istd > num7) && (this.method_82().Istd <= num9))
                            {
                                this.method_82().Istd = numArray[this.method_82().Istd - num7];
                            }
                            goto Label_1033;
                        }
                        }
                        goto Label_100B;
                    }
                    if (code != SprmCode.PChgTabs)
                    {
                        if (code != SprmCode.PChgTabsWithTolerance)
                        {
                            if (code == SprmCode.PAnld)
                            {
                                goto Label_1033;
                            }
                            goto Label_100B;
                        }
                        Class757.smethod_0(base.binaryReader_0, this.method_82().Tabs, true);
                    }
                    else
                    {
                        Class757.smethod_0(base.binaryReader_0, this.method_82().Tabs, false);
                    }
                    goto Label_1033;
                }
                switch (code)
                {
                case SprmCode.PShdEx:
                    base.method_42(0x5b4);
                    goto Label_1033;

                case SprmCode.PBrcTopEx:
                    base.method_39(0x546);
                    goto Label_1033;

                case SprmCode.PBrcLeftEx:
                    base.method_39(0x550);
                    goto Label_1033;

                case SprmCode.PBrcBottomEx:
                    base.method_39(0x55a);
                    goto Label_1033;

                case SprmCode.PBrcRightEx:
                    base.method_39(0x564);
                    goto Label_1033;

                case SprmCode.PBrcBetweenEx:
                    base.method_39(0x56e);
                    goto Label_1033;

                case SprmCode.PNumRM:
                    if (this.method_82().method_31(0x465) == null)
                    {
                        this.method_82().SetAttr(0x465, new Class578());
                    }
                    this.method_80((Class578)this.method_82().method_31(0x465));
                    goto Label_1033;

                case SprmCode.PCnf:
                    base.method_53(this, A_3, A_2, TableStylePrType.Para);
                    goto Label_1033;

                case SprmCode.PTIstdInfo:
                    goto Label_1033;

                case SprmCode.PPropRMark:
                    base.method_44(new ParagraphFormat(base.document_0));
                    goto Label_1033;
                }
            }
        }
        else
        {
            if (code <= SprmCode.PIncLvl)
            {
                if (code <= SprmCode.PSubTableEndOfRow)
                {
                    switch (code)
                    {
                    case SprmCode.PJc:
                        base.wordAttrCollection_0.SetAttr(0x64a, (HorizontalAlignment)base.binaryReader_0.ReadByte());
                        goto Label_1033;

                    case SprmCode.PFSideBySide:
                        base.wordAttrCollection_0.SetAttr(0x406, base.binaryReader_0.ReadByte() == 1);
                        goto Label_1033;

                    case SprmCode.PFKeep:
                        base.wordAttrCollection_0.SetAttr(0x410, base.binaryReader_0.ReadByte() == 1);
                        goto Label_1033;

                    case SprmCode.PFKeepFollow:
                        base.wordAttrCollection_0.SetAttr(0x41a, base.binaryReader_0.ReadByte() == 1);
                        goto Label_1033;

                    case SprmCode.PFPageBreakBefore:
                        base.wordAttrCollection_0.SetAttr(0x424, base.binaryReader_0.ReadByte() == 1);
                        goto Label_1033;

                    case SprmCode.PFNoLineNumb:
                        base.wordAttrCollection_0.SetAttr(0x46a, base.binaryReader_0.ReadByte() == 1);
                        goto Label_1033;

                    case SprmCode.PFInTable:
                        if (((this.class1150_0 != null) && (base.binaryReader_0.ReadByte() == 1)) && (this.class1150_0.int_0 == 0))
                        {
                            this.class1150_0.int_0 = 1;
                        }
                        goto Label_1033;

                    case SprmCode.PFTtp:
                        if (this.class1150_0 != null)
                        {
                            this.class1150_0.bool_0 = base.binaryReader_0.ReadByte() == 1;
                        }
                        goto Label_1033;

                    case SprmCode.PFNoAutoHyph:
                        base.wordAttrCollection_0.SetAttr(0x582, base.binaryReader_0.ReadByte() == 1);
                        goto Label_1033;

                    case SprmCode.PFLockAnchor:
                        (base.wordAttrCollection_0 as ParagraphFormat).Frame.SetAttr(5, base.binaryReader_0.ReadByte() == 1);
                        goto Label_1033;

                    case SprmCode.PFWidowControl:
                        base.wordAttrCollection_0.SetAttr(0x5be, base.binaryReader_0.ReadByte() == 1);
                        goto Label_1033;

                    case SprmCode.PFKinsoku:
                        base.wordAttrCollection_0.SetAttr(0x42e, base.binaryReader_0.ReadByte() == 1);
                        goto Label_1033;

                    case SprmCode.PFWordWrap:
                        base.wordAttrCollection_0.SetAttr(0x438, base.binaryReader_0.ReadByte() == 1);
                        goto Label_1033;

                    case SprmCode.PFOverflowPunct:
                        base.wordAttrCollection_0.SetAttr(0x442, base.binaryReader_0.ReadByte() == 1);
                        goto Label_1033;

                    case SprmCode.PFTopLinePunct:
                        base.wordAttrCollection_0.SetAttr(0x44c, base.binaryReader_0.ReadByte() == 1);
                        goto Label_1033;

                    case SprmCode.PFAutoSpaceDE:
                        base.wordAttrCollection_0.SetAttr(0x4d8, base.binaryReader_0.ReadByte() == 1);
                        goto Label_1033;

                    case SprmCode.PFAutoSpaceDN:
                        base.wordAttrCollection_0.SetAttr(0x4e2, base.binaryReader_0.ReadByte() == 1);
                        goto Label_1033;

                    case SprmCode.PWr:
                        (base.wordAttrCollection_0 as ParagraphFormat).Frame.SetAttr(0x12, (FrameTextWrap)base.binaryReader_0.ReadByte());
                        goto Label_1033;

                    case SprmCode.PFBiDi:
                        this.method_82().IsBidi = base.binaryReader_0.ReadByte() == 1;
                        goto Label_1033;

                    case SprmCode.PFNumRMIns:
                        if (this.method_82().method_31(0x465) == null)
                        {
                            this.method_82().SetAttr(0x465, new Class578());
                        }
                        ((Class578)this.method_82().method_31(0x465)).method_7(A_3.ReadByte() != 0);
                        goto Label_1033;

                    case SprmCode.PCrLf:
                        goto Label_1033;

                    case SprmCode.PFUsePgsuSettings:
                        base.wordAttrCollection_0.SetAttr(0x4ec, base.binaryReader_0.ReadByte() == 1);
                        goto Label_1033;

                    case SprmCode.PFAdjustRight:
                        base.wordAttrCollection_0.SetAttr(0x4f6, base.binaryReader_0.ReadByte() == 1);
                        goto Label_1033;

                    case SprmCode.PSubTableEndOfCell:
                        if (this.class1150_0 != null)
                        {
                            this.class1150_0.bool_2 = base.binaryReader_0.ReadByte() == 1;
                        }
                        goto Label_1033;

                    case SprmCode.PSubTableEndOfRow:
                        if (this.class1150_0 != null)
                        {
                            this.class1150_0.bool_1 = base.binaryReader_0.ReadByte() == 1;
                        }
                        goto Label_1033;
                    }
                    goto Label_100B;
                }
                if (code <= SprmCode.PFNoAllowOverlap)
                {
                    switch (code)
                    {
                    case SprmCode.PFBeforeAuto:
                        base.wordAttrCollection_0.SetAttr(0x4ba, base.binaryReader_0.ReadByte() == 1);
                        goto Label_1033;

                    case SprmCode.PFAfterAuto:
                        base.wordAttrCollection_0.SetAttr(0x4ce, base.binaryReader_0.ReadByte() == 1);
                        goto Label_1033;

                    case SprmCode.PJcEx:
                    {
                        HorizontalAlignment alignment = (HorizontalAlignment)base.binaryReader_0.ReadByte();
                        base.wordAttrCollection_0.SetAttr(0x3fc, alignment);
                        goto Label_1033;
                    }

                    case SprmCode.PFNoAllowOverlap:
                        (base.wordAttrCollection_0 as ParagraphFormat).Frame.SetAttr(13, base.binaryReader_0.ReadByte() == 1);
                        goto Label_1033;
                    }
                    goto Label_100B;
                }
                if (code != SprmCode.PNoSpaceBetweenSameStyle)
                {
                    if (code != SprmCode.PFMirrorIndents)
                    {
                        if (code == SprmCode.PIncLvl)
                        {
                            goto Label_1033;
                        }
                        goto Label_100B;
                    }
                    base.wordAttrCollection_0.SetAttr(0x479, base.binaryReader_0.ReadByte() == 1);
                }
                else
                {
                    base.wordAttrCollection_0.SetAttr(0x3fe, base.binaryReader_0.ReadByte() == 1);
                }
                goto Label_1033;
            }
            if (code > SprmCode.PShd)
            {
                if (code <= SprmCode.PIstd)
                {
                    switch (code)
                    {
                    case SprmCode.PWAlignFont:
                        base.wordAttrCollection_0.SetAttr(0x5e6, (TextAlignment)base.binaryReader_0.ReadUInt16());
                        goto Label_1033;

                    case SprmCode.PFrameTextFlow:
                        (base.wordAttrCollection_0 as ParagraphFormat).Frame.SetAttr(14, (TextDirection)base.binaryReader_0.ReadInt16());
                        goto Label_1033;

                    case SprmCode.PIstd:
                    {
                        int num12 = base.binaryReader_0.ReadInt16();
                        this.method_82().Istd = num12;
                        base.wordAttrCollection_0.SetAttr(0x3e8, num12);
                        goto Label_1033;
                    }
                    }
                    goto Label_100B;
                }
                switch (code)
                {
                case SprmCode.PIlfo:
                {
                    int num6 = base.binaryReader_0.ReadInt16();
                    if (num6 == 0x7ff)
                    {
                        num6 = 0;
                    }
                    base.wordAttrCollection_0.SetAttr(0x460, num6);
                    goto Label_1033;
                }

                case SprmCode.PNest:
                    this.method_71(0x654);
                    goto Label_1033;
                }
                if (code != SprmCode.PNestEx)
                {
                    goto Label_100B;
                }
                this.method_71(0x488);
                goto Label_1033;
            }
            if (code <= SprmCode.PPc)
            {
                if (code != SprmCode.PIlvl)
                {
                    if (code != SprmCode.PPc)
                    {
                        goto Label_100B;
                    }
                    base.method_51(11, 12);
                }
                else
                {
                    byte num = base.binaryReader_0.ReadByte();
                    num = ListLevel.smethod_0(num) ? num : ((byte)0);
                    this.method_82().SetAttr(0x456, num);
                }
                goto Label_1033;
            }
            switch (code)
            {
            case SprmCode.PWHeightAbs:
            {
                int num8 = base.binaryReader_0.ReadInt16();
                if (num8 <= 0)
                {
                    if (num8 < 0)
                    {
                        (base.wordAttrCollection_0 as ParagraphFormat).Frame.SetAttr(6, (short)num8);
                        (base.wordAttrCollection_0 as ParagraphFormat).Frame.SetAttr(7, FrameSizeRule.AtLeast);
                    }
                    else
                    {
                        (base.wordAttrCollection_0 as ParagraphFormat).Frame.SetAttr(6, (short)0);
                        (base.wordAttrCollection_0 as ParagraphFormat).Frame.SetAttr(7, FrameSizeRule.Auto);
                    }
                }
                else
                {
                    (base.wordAttrCollection_0 as ParagraphFormat).Frame.SetAttr(6, (short)num8);
                    (base.wordAttrCollection_0 as ParagraphFormat).Frame.SetAttr(7, FrameSizeRule.Exact);
                }
                goto Label_1033;
            }

            case SprmCode.PDcs:
            {
                int num10 = base.binaryReader_0.ReadInt16();
                (base.wordAttrCollection_0 as ParagraphFormat).Frame.SetAttr(20, ((DropCapPosition)num10) & ((DropCapPosition)7));
                (base.wordAttrCollection_0 as ParagraphFormat).Frame.SetAttr(0x15, (num10 & 0xf8) >> 3);
                goto Label_1033;
            }

            case SprmCode.PShd:
                base.method_40(0x5b4);
                goto Label_1033;

            case SprmCode.PWall:
                base.binaryReader_0.ReadByte();
                goto Label_1033;

            case SprmCode.POutLvl:
                base.wordAttrCollection_0.SetAttr(0x500, base.binaryReader_0.ReadByte());
                goto Label_1033;
            }
        }
Label_100B:
        return(this.method_69(A_0, A_3));

Label_1033:
        return(true);
    }
Example #5
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);
    }
Example #6
0
    private bool imethod_0(SprmCode A_0, SprmType A_1, int A_2, BinaryReader A_3)
    {
        if (A_1 != SprmType.Sep)
        {
            return(true);
        }
        base.binaryReader_0 = A_3;
        SprmCode code = A_0;

        if (code > SprmCode.SPgbProp)
        {
            switch (code)
            {
            case SprmCode.SBrcTop:
                base.method_38(0x852);
                goto Label_0BBA;

            case SprmCode.SBrcLeft:
                base.method_38(0x85c);
                goto Label_0BBA;

            case SprmCode.SBrcBottom:
                base.method_38(0x866);
                goto Label_0BBA;

            case SprmCode.SBrcRight:
                base.method_38(0x870);
                goto Label_0BBA;

            case SprmCode.SDxtCharSpace:
                base.wordAttrCollection_0.SetAttr(0x974, base.binaryReader_0.ReadInt32());
                goto Label_0BBA;

            case SprmCode.SRsid:
                base.wordAttrCollection_0.SetAttr(0x8ca, base.binaryReader_0.ReadInt32());
                goto Label_0BBA;

            case SprmCode.SPgnStart:
                base.wordAttrCollection_0.SetAttr(0x898, base.binaryReader_0.ReadInt32());
                goto Label_0BBA;

            case SprmCode.SDyaTop:
                base.wordAttrCollection_0.SetAttr(0x8fc, ((float)base.binaryReader_0.ReadInt16()) / 20f);
                goto Label_0BBA;

            case SprmCode.SDyaBottom:
                base.wordAttrCollection_0.SetAttr(0x906, ((float)base.binaryReader_0.ReadInt16()) / 20f);
                goto Label_0BBA;

            case SprmCode.SDxaLnn:
                base.wordAttrCollection_0.SetAttr(0x960, ((float)base.binaryReader_0.ReadUInt16()) / 20f);
                goto Label_0BBA;

            case SprmCode.SDxaColumns:
                base.wordAttrCollection_0.SetAttr(0x942, (int)base.binaryReader_0.ReadInt16());
                goto Label_0BBA;

            case SprmCode.SDyaHdrTop:
                base.wordAttrCollection_0.SetAttr(0x910, ((float)base.binaryReader_0.ReadUInt16()) / 20f);
                goto Label_0BBA;

            case SprmCode.SDyaHdrBottom:
                base.wordAttrCollection_0.SetAttr(0x91a, ((float)base.binaryReader_0.ReadUInt16()) / 20f);
                goto Label_0BBA;

            case SprmCode.SDyaLinePitch:
                base.wordAttrCollection_0.SetAttr(0x87a, ((float)base.binaryReader_0.ReadInt16()) / 20f);
                goto Label_0BBA;

            case SprmCode.SXaPage:
                base.wordAttrCollection_0.SetAttr(0x8d4, ((float)base.binaryReader_0.ReadInt16()) / 20f);
                goto Label_0BBA;

            case SprmCode.SYaPage:
                base.wordAttrCollection_0.SetAttr(0x8de, ((float)base.binaryReader_0.ReadInt16()) / 20f);
                goto Label_0BBA;

            case SprmCode.SDxaLeft:
                base.wordAttrCollection_0.SetAttr(0x8e8, ((float)base.binaryReader_0.ReadInt16()) / 20f);
                goto Label_0BBA;

            case SprmCode.SDxaRight:
                base.wordAttrCollection_0.SetAttr(0x8f2, ((float)base.binaryReader_0.ReadInt16()) / 20f);
                goto Label_0BBA;

            case SprmCode.SDzaGutter:
                base.wordAttrCollection_0.SetAttr(0x908, ((float)base.binaryReader_0.ReadInt16()) / 20f);
                goto Label_0BBA;

            case SprmCode.SBrcTopEx:
                base.method_39(0x852);
                goto Label_0BBA;

            case SprmCode.SBrcLeftEx:
                base.method_39(0x85c);
                goto Label_0BBA;

            case SprmCode.SBrcBottomEx:
                base.method_39(0x866);
                goto Label_0BBA;

            case SprmCode.SBrcRightEx:
                base.method_39(0x870);
                goto Label_0BBA;

            case SprmCode.SPropRMark:
                base.method_44(new Class17(base.document_0));
                goto Label_0BBA;

            case SprmCode.SDxaColWidth:
            {
                int num7 = base.binaryReader_0.ReadByte();
                this.method_68(num7).Width = ((float)base.binaryReader_0.ReadInt16()) / 20f;
                goto Label_0BBA;
            }

            case SprmCode.SDxaColSpacing:
            {
                int num3 = base.binaryReader_0.ReadByte();
                this.method_68(num3).Space = ((float)base.binaryReader_0.ReadInt16()) / 20f;
                goto Label_0BBA;
            }
            }
        }
        else if (code > SprmCode.SColumns)
        {
            switch (code)
            {
            case SprmCode.SLnnMin:
                base.wordAttrCollection_0.SetAttr(0x884, base.binaryReader_0.ReadInt16() + 1);
                goto Label_0BBA;

            case SprmCode.SPgnStart97:
                base.wordAttrCollection_0.SetAttr(0x898, (int)base.binaryReader_0.ReadInt16());
                goto Label_0BBA;

            case SprmCode.SDmPaperReq:
                base.wordAttrCollection_0.SetAttr(0x82a, (int)base.binaryReader_0.ReadInt16());
                goto Label_0BBA;

            case SprmCode.SNLnnMod:
                base.wordAttrCollection_0.SetAttr(0x848, (int)base.binaryReader_0.ReadInt16());
                goto Label_0BBA;

            case SprmCode.SClm:
                base.wordAttrCollection_0.SetAttr(0x97e, (GridPitchType)base.binaryReader_0.ReadInt16());
                goto Label_0BBA;

            case SprmCode.STextFlow:
                switch (base.binaryReader_0.ReadInt16())
                {
                case 1:
                    base.wordAttrCollection_0.SetAttr(0x988, TextDirection.RightToLeft);
                    goto Label_0BBA;

                case 4:
                    base.wordAttrCollection_0.SetAttr(0x988, TextDirection.TopToBottomRotated);
                    goto Label_0BBA;
                }
                base.wordAttrCollection_0.SetAttr(0x988, TextDirection.TopToBottom);
                goto Label_0BBA;

            case SprmCode.SNFtn:
                base.wordAttrCollection_0.SetAttr(0x9d8, (int)base.binaryReader_0.ReadInt16());
                goto Label_0BBA;

            case SprmCode.SNfcFtnRef:
                base.wordAttrCollection_0.SetAttr(0x9e2, (FootnoteNumberFormat)base.binaryReader_0.ReadInt16());
                goto Label_0BBA;

            case SprmCode.SNEdn:
                base.wordAttrCollection_0.SetAttr(0xa3c, (int)base.binaryReader_0.ReadInt16());
                goto Label_0BBA;

            case SprmCode.SNfcEdnRef:
                base.wordAttrCollection_0.SetAttr(0xa46, (FootnoteNumberFormat)base.binaryReader_0.ReadInt16());
                goto Label_0BBA;

            case SprmCode.SPgbProp:
            {
                int num4 = base.binaryReader_0.ReadUInt16();
                base.wordAttrCollection_0.SetAttr(0x8ac, ((PageBordersApplyType)num4) & ((PageBordersApplyType)7));
                base.wordAttrCollection_0.SetAttr(0x8b6, ((num4 & 0x18) >> 3) == 0);
                base.wordAttrCollection_0.SetAttr(0x8c0, (PageBorderOffsetFrom)((num4 & 0xe0) >> 5));
                goto Label_0BBA;
            }
            }
        }
        else
        {
            switch (code)
            {
            case SprmCode.ScnsPgn:
                base.wordAttrCollection_0.SetAttr(0x7e4, (PageSeparator)base.binaryReader_0.ReadByte());
                goto Label_0BBA;

            case SprmCode.SHeadingPgn:
                base.wordAttrCollection_0.SetAttr(0x88e, (int)base.binaryReader_0.ReadByte());
                goto Label_0BBA;

            case SprmCode.SFEvenlySpaced:
                base.wordAttrCollection_0.SetAttr(0x938, base.binaryReader_0.ReadByte() == 1);
                goto Label_0BBA;

            case SprmCode.SFProtected:
                base.wordAttrCollection_0.SetAttr(0x956, base.binaryReader_0.ReadByte() == 1);
                goto Label_0BBA;

            case SprmCode.SBkc:
                base.wordAttrCollection_0.SetAttr(0x7ee, (SectionBreakType)base.binaryReader_0.ReadByte());
                goto Label_0BBA;

            case SprmCode.SFTitlePage:
                base.wordAttrCollection_0.SetAttr(0x7f8, base.binaryReader_0.ReadByte() != 0);
                goto Label_0BBA;

            case SprmCode.SNfcPgn:
                base.wordAttrCollection_0.SetAttr(0x7da, (PageNumberStyle)base.binaryReader_0.ReadByte());
                goto Label_0BBA;

            case SprmCode.SFPgnRestart:
            {
                bool flag = base.binaryReader_0.ReadByte() == 1;
                base.wordAttrCollection_0.SetAttr(0x802, flag);
                if (flag)
                {
                    base.wordAttrCollection_0.SetAttr(0x898, 0);
                }
                goto Label_0BBA;
            }

            case SprmCode.SFEndnote:
                base.wordAttrCollection_0.SetAttr(0x834, base.binaryReader_0.ReadByte() != 1);
                goto Label_0BBA;

            case SprmCode.SLnc:
                base.wordAttrCollection_0.SetAttr(0x83e, (LineNumberingRestartMode)base.binaryReader_0.ReadByte());
                goto Label_0BBA;

            case SprmCode.SGprfIhdt:
                goto Label_0BBA;

            case SprmCode.SLBetween:
                base.wordAttrCollection_0.SetAttr(0x80c, base.binaryReader_0.ReadByte() == 1);
                goto Label_0BBA;

            case SprmCode.SVjc:
                base.wordAttrCollection_0.SetAttr(0x924, (PageAlignment)base.binaryReader_0.ReadByte());
                goto Label_0BBA;

            case SprmCode.SBOrientation:
                base.wordAttrCollection_0.SetAttr(0x8a2, (PageOrientation)base.binaryReader_0.ReadByte());
                goto Label_0BBA;

            case SprmCode.SFpc:
                base.wordAttrCollection_0.SetAttr(0x9c4, (FootnotePosition)base.binaryReader_0.ReadByte());
                goto Label_0BBA;

            case SprmCode.SRncFtn:
                base.wordAttrCollection_0.SetAttr(0x9ce, (FootnoteRestartRule)base.binaryReader_0.ReadByte());
                goto Label_0BBA;

            case SprmCode.SRncEdn:
                base.wordAttrCollection_0.SetAttr(0xa32, (FootnoteRestartRule)base.binaryReader_0.ReadByte());
                goto Label_0BBA;

            case SprmCode.SFBiDi:
                base.wordAttrCollection_0.SetAttr(0x992, base.binaryReader_0.ReadByte() == 1);
                goto Label_0BBA;

            case SprmCode.SFRTLGutter:
                base.wordAttrCollection_0.SetAttr(0x96a, base.binaryReader_0.ReadByte() == 1);
                goto Label_0BBA;

            case SprmCode.SWall:
                base.binaryReader_0.ReadByte();
                goto Label_0BBA;

            case SprmCode.SDmBinFirst:
                base.wordAttrCollection_0.SetAttr(0x816, (int)base.binaryReader_0.ReadInt16());
                goto Label_0BBA;

            case SprmCode.SDmBinOther:
                base.wordAttrCollection_0.SetAttr(0x820, (int)base.binaryReader_0.ReadInt16());
                goto Label_0BBA;

            case SprmCode.SColumns:
            {
                int num = base.binaryReader_0.ReadInt16() + 1;
                base.wordAttrCollection_0.SetAttr(0x92e, num);
                if (num > 1)
                {
                    ColumnCollection columns = new ColumnCollection(base.document_0);
                    for (int i = 0; i < num; i++)
                    {
                        Column column = new Column(base.document_0);
                        columns.Add(column);
                    }
                    base.wordAttrCollection_0.SetAttr(0x94c, columns);
                }
                goto Label_0BBA;
            }
            }
        }
        return(false);

Label_0BBA:
        return(true);
    }
Example #7
0
    private bool imethod_0(SprmCode A_0, SprmType A_1, int A_2, BinaryReader A_3)
    {
        if (A_1 != SprmType.Chp)
        {
            return(true);
        }
        base.binaryReader_0 = A_3;
        SprmCode code = A_0;

        if (code <= SprmCode.CCharScale)
        {
            if (code <= SprmCode.CHighlight)
            {
                if (code <= SprmCode.CFItalicBi)
                {
                    if (code <= SprmCode.CFOle2)
                    {
                        switch (code)
                        {
                        case SprmCode.CFRMarkDel:
                            if ((base.binaryReader_0.ReadByte() != 0) && !this.method_77().IsInsertRevision)
                            {
                                this.method_77().IsDeleteRevision = true;
                                this.method_77().DeleteRevision   = new Class579(EditRevisionType.Deletion);
                            }
                            goto Label_0FEB;

                        case SprmCode.CFRMarkIns:
                            if ((base.binaryReader_0.ReadByte() != 0) && !this.method_77().IsDeleteRevision)
                            {
                                this.method_77().IsInsertRevision = true;
                                this.method_77().InsertRevision   = new Class579(EditRevisionType.Insertion);
                            }
                            goto Label_0FEB;

                        case SprmCode.CFFldVanish:
                        case SprmCode.Noop:
                            goto Label_0FEB;

                        case SprmCode.CFData:
                            if (this.class1107_0 != null)
                            {
                                this.class1107_0.bool_1 = base.binaryReader_0.ReadByte() == 1;
                            }
                            goto Label_0FEB;

                        case SprmCode.CFOle2:
                            if (this.class1107_0 != null)
                            {
                                this.class1107_0.bool_3 = base.binaryReader_0.ReadByte() == 1;
                            }
                            goto Label_0FEB;
                        }
                    }
                    else
                    {
                        if (code <= SprmCode.CFSpecVanish)
                        {
                            if (code != SprmCode.CFWebHidden)
                            {
                                if (code != SprmCode.CFSpecVanish)
                                {
                                    goto Label_0FCB;
                                }
                                base.wordAttrCollection_0.SetAttr(10, this.method_75(base.binaryReader_0.ReadByte(), 10));
                            }
                            goto Label_0FEB;
                        }
                        switch (code)
                        {
                        case SprmCode.CFBold:
                            base.wordAttrCollection_0.SetAttr(60, this.method_75(base.binaryReader_0.ReadByte(), 60));
                            goto Label_0FEB;

                        case SprmCode.CFItalic:
                            base.wordAttrCollection_0.SetAttr(70, this.method_75(base.binaryReader_0.ReadByte(), 70));
                            goto Label_0FEB;

                        case SprmCode.CFStrike:
                            base.wordAttrCollection_0.SetAttr(80, this.method_75(base.binaryReader_0.ReadByte(), 80));
                            goto Label_0FEB;

                        case SprmCode.CFOutline:
                            base.wordAttrCollection_0.SetAttr(90, this.method_75(base.binaryReader_0.ReadByte(), 90));
                            goto Label_0FEB;

                        case SprmCode.CFShadow:
                            base.wordAttrCollection_0.SetAttr(100, this.method_75(base.binaryReader_0.ReadByte(), 100));
                            goto Label_0FEB;

                        case SprmCode.CFSmallCaps:
                            base.wordAttrCollection_0.SetAttr(110, this.method_75(base.binaryReader_0.ReadByte(), 110));
                            goto Label_0FEB;

                        case SprmCode.CFCaps:
                            base.wordAttrCollection_0.SetAttr(120, this.method_75(base.binaryReader_0.ReadByte(), 120));
                            goto Label_0FEB;

                        case SprmCode.CFVanish:
                            base.wordAttrCollection_0.SetAttr(130, this.method_75(base.binaryReader_0.ReadByte(), 130));
                            goto Label_0FEB;

                        case SprmCode.CFImprint:
                            base.wordAttrCollection_0.SetAttr(180, this.method_75(base.binaryReader_0.ReadByte(), 180));
                            goto Label_0FEB;

                        case SprmCode.CFSpec:
                            if (this.class1107_0 != null)
                            {
                                this.class1107_0.bool_0 = base.binaryReader_0.ReadByte() == 1;
                            }
                            goto Label_0FEB;

                        case SprmCode.CFObj:
                            if (this.class1107_0 != null)
                            {
                                this.class1107_0.bool_2 = base.binaryReader_0.ReadByte() == 1;
                            }
                            goto Label_0FEB;

                        case SprmCode.CFEmboss:
                            base.wordAttrCollection_0.SetAttr(170, this.method_75(base.binaryReader_0.ReadByte(), 170));
                            goto Label_0FEB;

                        case SprmCode.CFBiDi:
                            base.wordAttrCollection_0.SetAttr(0x109, this.method_75(base.binaryReader_0.ReadByte(), 0x109));
                            goto Label_0FEB;

                        case SprmCode.CFBoldBi:
                            base.wordAttrCollection_0.SetAttr(250, this.method_75(base.binaryReader_0.ReadByte(), 250));
                            goto Label_0FEB;

                        case SprmCode.CFItalicBi:
                            base.wordAttrCollection_0.SetAttr(260, this.method_75(base.binaryReader_0.ReadByte(), 260));
                            goto Label_0FEB;
                        }
                    }
                    goto Label_0FCB;
                }
                if (code <= SprmCode.CFComplexScript)
                {
                    switch (code)
                    {
                    case SprmCode.CFUsePgsuSettings:
                        base.wordAttrCollection_0.SetAttr(330, this.method_75(base.binaryReader_0.ReadByte(), 330));
                        goto Label_0FEB;

                    case SprmCode.CFNoProof:
                        base.wordAttrCollection_0.SetAttr(440, this.method_75(base.binaryReader_0.ReadByte(), 440));
                        goto Label_0FEB;
                    }
                    if (code != SprmCode.CFComplexScript)
                    {
                        goto Label_0FCB;
                    }
                    base.wordAttrCollection_0.SetAttr(0x10c, this.method_75(base.binaryReader_0.ReadByte(), 0x10c));
                }
                else if (code <= SprmCode.CIdctHint)
                {
                    if (code != SprmCode.CSfxText)
                    {
                        if (code != SprmCode.CIdctHint)
                        {
                            goto Label_0FCB;
                        }
                        base.wordAttrCollection_0.SetAttr(400, (int)base.binaryReader_0.ReadByte());
                    }
                    else
                    {
                        base.wordAttrCollection_0.SetAttr(310, (TextEffect)base.binaryReader_0.ReadByte());
                    }
                }
                else if (code != SprmCode.CLineBreakClear)
                {
                    if (code != SprmCode.CHighlight)
                    {
                        goto Label_0FCB;
                    }
                    int num = base.binaryReader_0.ReadByte();
                    if ((num >= 0) && (num < Class1006.list_0.Count))
                    {
                        Color color = Class1006.list_0[num];
                        base.wordAttrCollection_0.SetAttr(20, color);
                    }
                }
                else
                {
                    base.wordAttrCollection_0.SetAttr(0x2d, (LineBreakClear)base.binaryReader_0.ReadByte());
                }
            }
            else if (code <= SprmCode.CNeedFontFixup)
            {
                if (code <= SprmCode.CIco)
                {
                    switch (code)
                    {
                    case SprmCode.CKcd:
                        base.wordAttrCollection_0.SetAttr(770, (Emphasis)A_3.ReadByte());
                        goto Label_0FEB;

                    case SprmCode.CKul:
                        base.wordAttrCollection_0.SetAttr(140, this.method_76(base.binaryReader_0.ReadByte()));
                        goto Label_0FEB;
                    }
                    if (code != SprmCode.CIco)
                    {
                        goto Label_0FCB;
                    }
                    base.wordAttrCollection_0.SetAttr(160, Class624.smethod_1((Word97Color)base.binaryReader_0.ReadByte()));
                }
                else if (code <= SprmCode.CFDStrike)
                {
                    if (code != SprmCode.CIss)
                    {
                        if (code != SprmCode.CFDStrike)
                        {
                            goto Label_0FCB;
                        }
                        base.wordAttrCollection_0.SetAttr(300, this.method_75(base.binaryReader_0.ReadByte(), 300));
                    }
                    else
                    {
                        base.wordAttrCollection_0.SetAttr(210, (VerticalAlignment)base.binaryReader_0.ReadByte());
                    }
                }
                else
                {
                    if (code != SprmCode.CWall)
                    {
                        if (code == SprmCode.CNeedFontFixup)
                        {
                            goto Label_0FEB;
                        }
                        goto Label_0FCB;
                    }
                    base.binaryReader_0.ReadByte();
                }
            }
            else if (code <= SprmCode.CIdslRMark)
            {
                if (code != SprmCode.CFSdtVanish)
                {
                    if (code != SprmCode.CIbstRMark)
                    {
                        if (code == SprmCode.CIdslRMark)
                        {
                            goto Label_0FEB;
                        }
                        goto Label_0FCB;
                    }
                    this.method_73(this.method_77().InsertRevision);
                }
            }
            else if (code <= SprmCode.CHpsKern)
            {
                if (code != SprmCode.CHpsPos)
                {
                    if (code != SprmCode.CHpsKern)
                    {
                        goto Label_0FCB;
                    }
                    base.wordAttrCollection_0.SetAttr(220, ((float)base.binaryReader_0.ReadUInt16()) / 2f);
                }
                else
                {
                    base.wordAttrCollection_0.SetAttr(200, ((float)base.binaryReader_0.ReadInt16()) / 2f);
                }
            }
            else if (code != SprmCode.CYsri)
            {
                if (code != SprmCode.CCharScale)
                {
                    goto Label_0FCB;
                }
                base.wordAttrCollection_0.SetAttr(290, (short)base.binaryReader_0.ReadUInt16());
            }
            else
            {
                base.wordAttrCollection_0.SetAttr(460, (HyphenRule)base.binaryReader_0.ReadByte());
                base.wordAttrCollection_0.SetAttr(470, (int)base.binaryReader_0.ReadByte());
            }
            goto Label_0FEB;
        }
        if (code > SprmCode.CBrc)
        {
            if (code <= SprmCode.CFMathPr)
            {
                if (code <= SprmCode.CPbiIBullet)
                {
                    switch (code)
                    {
                    case SprmCode.CCv:
                        base.wordAttrCollection_0.SetAttr(160, Class624.smethod_7(base.binaryReader_0.ReadInt32()));
                        goto Label_0FEB;

                    case SprmCode.CUnderlineColor:
                        base.wordAttrCollection_0.SetAttr(450, Class624.smethod_7(base.binaryReader_0.ReadInt32()));
                        goto Label_0FEB;
                    }
                    if (code != SprmCode.CPbiIBullet)
                    {
                        goto Label_0FCB;
                    }
                    base.wordAttrCollection_0.SetAttr(480, base.binaryReader_0.ReadInt32());
                }
                else if (code <= SprmCode.CSymbol)
                {
                    if (code != SprmCode.CPicLocation)
                    {
                        if (code != SprmCode.CSymbol)
                        {
                            goto Label_0FCB;
                        }
                        if (this.class1107_0 != null)
                        {
                            this.class1107_0.string_0 = this.class52_0.method_9(base.binaryReader_0.ReadUInt16());
                            this.class1107_0.char_0   = (char)base.binaryReader_0.ReadUInt16();
                            this.class1107_0.bool_0   = true;
                        }
                    }
                    else if (this.class1107_0 != null)
                    {
                        this.class1107_0.int_1  = base.binaryReader_0.ReadInt32();
                        this.class1107_0.bool_0 = true;
                    }
                }
                else
                {
                    if (code != SprmCode.CDxaSpace)
                    {
                        if (code == SprmCode.CFMathPr)
                        {
                            goto Label_0FEB;
                        }
                        goto Label_0FCB;
                    }
                    base.wordAttrCollection_0.SetAttr(150, ((float)base.binaryReader_0.ReadInt16()) / 20f);
                }
                goto Label_0FEB;
            }
            if (code > SprmCode.CDispFldRMark)
            {
                if (code <= SprmCode.CFELayout)
                {
                    switch (code)
                    {
                    case SprmCode.CShdEx:
                        base.method_42(370);
                        goto Label_0FEB;

                    case SprmCode.CBrcEx:
                        base.method_39(360);
                        goto Label_0FEB;
                    }
                    if (code != SprmCode.CFELayout)
                    {
                        goto Label_0FCB;
                    }
                    this.method_71(A_3);
                    goto Label_0FEB;
                }
                switch (code)
                {
                case SprmCode.CCnf:
                    base.method_53(this, A_3, A_2, TableStylePrType.Run);
                    goto Label_0FEB;

                case SprmCode.CPropRMark:
                    base.method_44(new CharacterFormat(base.document_0));
                    goto Label_0FEB;
                }
            }
            else if (code > SprmCode.CMajority50)
            {
                switch (code)
                {
                case SprmCode.CPropRMarkOld:
                case SprmCode.CDispFldRMark:
                    goto Label_0FEB;
                }
            }
            else
            {
                switch (code)
                {
                case SprmCode.CMajority:
                case SprmCode.CMajority50:
                    goto Label_0FEB;

                case SprmCode.CHpsNew50:
                    goto Label_0F30;
                }
            }
            goto Label_0FCB;
        }
        if (code > SprmCode.CFtcDefault)
        {
            if (code <= SprmCode.CHpsBi)
            {
                switch (code)
                {
                case SprmCode.CLid_60:
                {
                    short num6 = (short)base.binaryReader_0.ReadUInt16();
                    base.wordAttrCollection_0.SetAttr(380, num6);
                    base.wordAttrCollection_0.SetAttr(340, num6);
                    base.wordAttrCollection_0.SetAttr(390, num6);
                    goto Label_0FEB;
                }

                case SprmCode.CHps:
                    goto Label_0F30;

                case SprmCode.CFtcAscii:
                    this.method_70(230, base.binaryReader_0.ReadInt16());
                    goto Label_0FEB;

                case SprmCode.CFtcFarEast:
                    this.method_70(0xeb, base.binaryReader_0.ReadInt16());
                    goto Label_0FEB;

                case SprmCode.CFtcOther:
                    this.method_70(240, base.binaryReader_0.ReadInt16());
                    goto Label_0FEB;

                case SprmCode.CFtcBi:
                    this.method_70(270, base.binaryReader_0.ReadInt16());
                    goto Label_0FEB;

                case SprmCode.CIcoBi:
                    goto Label_0FEB;

                case SprmCode.CHpsBi:
                    base.wordAttrCollection_0.SetAttr(350, ((float)base.binaryReader_0.ReadUInt16()) / 2f);
                    goto Label_0FEB;
                }
            }
            else
            {
                if (code <= SprmCode.CObjLocation)
                {
                    if (code != SprmCode.CDttmRMark)
                    {
                        if (code != SprmCode.CObjLocation)
                        {
                            goto Label_0FCB;
                        }
                        if (this.class1107_0 != null)
                        {
                            this.class1107_0.int_1 = base.binaryReader_0.ReadInt32();
                        }
                    }
                    else
                    {
                        this.method_74(this.method_77().InsertRevision);
                    }
                    goto Label_0FEB;
                }
                switch (code)
                {
                case SprmCode.CCharacterRsid:
                    base.wordAttrCollection_0.SetAttr(30, base.binaryReader_0.ReadInt32());
                    goto Label_0FEB;

                case SprmCode.CInsertRsid:
                    base.wordAttrCollection_0.SetAttr(40, base.binaryReader_0.ReadInt32());
                    goto Label_0FEB;

                case SprmCode.CRsidRMDel:
                    goto Label_0FEB;

                case SprmCode.CDttmRMarkDel:
                    this.method_74(this.method_77().DeleteRevision);
                    goto Label_0FEB;

                case SprmCode.CBrc:
                    base.method_38(360);
                    goto Label_0FEB;
                }
            }
            goto Label_0FCB;
        }
        if (code <= SprmCode.CLidFarEast_80)
        {
            switch (code)
            {
            case SprmCode.CIbstRMarkDel:
                this.method_73(this.method_77().DeleteRevision);
                goto Label_0FEB;

            case SprmCode.CShd:
                base.method_40(370);
                goto Label_0FEB;

            case SprmCode.CIdslRMarkDel:
            case SprmCode.CLidUndocumented3:
                goto Label_0FEB;

            case SprmCode.CLidBi:
                base.wordAttrCollection_0.SetAttr(340, (short)base.binaryReader_0.ReadUInt16());
                goto Label_0FEB;

            case SprmCode.CLid_80:
            {
                int num2 = base.binaryReader_0.ReadUInt16();
                if (num2 != 0x400)
                {
                    base.wordAttrCollection_0.SetAttr(380, (short)num2);
                }
                goto Label_0FEB;
            }

            case SprmCode.CLidFarEast_80:
            {
                int num4 = base.binaryReader_0.ReadUInt16();
                if (num4 != 0x400)
                {
                    base.wordAttrCollection_0.SetAttr(390, (short)num4);
                }
                goto Label_0FEB;
            }
            }
            goto Label_0FCB;
        }
        if (code <= SprmCode.CPbiGrf)
        {
            switch (code)
            {
            case SprmCode.CLid:
                base.wordAttrCollection_0.SetAttr(380, (short)base.binaryReader_0.ReadUInt16());
                goto Label_0FEB;

            case SprmCode.CLidFarEast:
                base.wordAttrCollection_0.SetAttr(390, (short)base.binaryReader_0.ReadUInt16());
                goto Label_0FEB;

            case SprmCode.CPbiGrf:
                base.wordAttrCollection_0.SetAttr(490, (PictureBulletFlags)base.binaryReader_0.ReadInt16());
                goto Label_0FEB;
            }
            goto Label_0FCB;
        }
        if (code != SprmCode.CIstd)
        {
            if (code != SprmCode.CFtcDefault)
            {
                goto Label_0FCB;
            }
            string str2 = this.class52_0.method_9(base.binaryReader_0.ReadInt16());
            base.wordAttrCollection_0.SetAttr(230, str2);
            base.wordAttrCollection_0.SetAttr(270, str2);
            base.wordAttrCollection_0.SetAttr(0xeb, str2);
            base.wordAttrCollection_0.SetAttr(240, str2);
            goto Label_0FEB;
        }
        int    num5 = base.binaryReader_0.ReadInt16();
        string name = string.Empty;

        using (Dictionary <string, int> .Enumerator enumerator = this.dictionary_0.GetEnumerator())
        {
            KeyValuePair <string, int> current;
            while (enumerator.MoveNext())
            {
                current = enumerator.Current;
                if (current.Value == num5)
                {
                    goto Label_0AD9;
                }
            }
            goto Label_0AF1;
Label_0AD9:
            name = current.Key;
        }
Label_0AF1:
        if (base.wordAttrCollection_0.Document.Styles.FindByName(name, StyleType.CharacterStyle) != null)
        {
            (base.wordAttrCollection_0 as CharacterFormat).CharStyleName = name;
        }
        goto Label_0FEB;
Label_0F30:
        base.wordAttrCollection_0.SetAttr(190, ((float)base.binaryReader_0.ReadUInt16()) / 2f);
        goto Label_0FEB;
Label_0FCB:
        return(false);

Label_0FEB:
        return(true);
    }