コード例 #1
0
    internal void method_46(RowFormat A_0)
    {
        Class15 class2 = this.method_43();
        Class15 tablePreferredWidthInfo = A_0.TablePreferredWidthInfo;

        switch (class2.method_51())
        {
        case FtsWidth.None:
            tablePreferredWidthInfo.method_52(FtsWidth.None);
            tablePreferredWidthInfo.method_50(0f);
            return;

        case FtsWidth.Auto:
            tablePreferredWidthInfo.method_52(FtsWidth.Auto);
            tablePreferredWidthInfo.method_50(0f);
            return;

        case FtsWidth.Percentage:
            tablePreferredWidthInfo.method_52(FtsWidth.Percentage);
            tablePreferredWidthInfo.method_50(class2.method_49());
            return;

        case FtsWidth.Point:
            tablePreferredWidthInfo.method_52(FtsWidth.Point);
            tablePreferredWidthInfo.method_50(class2.method_49());
            return;
        }
    }
コード例 #2
0
    internal void method_45(CellFormat A_0)
    {
        Class15 class2 = this.method_43();

        A_0.PreferredWidth = class2;
        switch (class2.method_51())
        {
        case FtsWidth.None:
            A_0.WidthUnit = FtsWidth.None;
            A_0.CellWidth = 0f;
            return;

        case FtsWidth.Auto:
            A_0.WidthUnit = FtsWidth.Auto;
            A_0.CellWidth = 0f;
            return;

        case FtsWidth.Percentage:
            A_0.WidthUnit   = FtsWidth.Percentage;
            A_0.CellScaling = class2.method_49() / 50f;
            return;

        case FtsWidth.Point:
            A_0.WidthUnit = FtsWidth.Point;
            A_0.CellWidth = class2.method_49() / 20f;
            return;
        }
    }
コード例 #3
0
    private void method_90(SprmCode A_0, int A_1)
    {
        Class15 preferredTableWidth = (Class15)this.method_93().method_32(A_1);

        if (preferredTableWidth.IsDefault)
        {
            Table ownerTable = this.method_93().OwnerRow.OwnerTable;
            if (ownerTable != null)
            {
                preferredTableWidth = ownerTable.PreferredTableWidth;
            }
        }
        if (preferredTableWidth != null)
        {
            base.class345_0.method_5(A_0);
            base.class345_0.Write((byte)preferredTableWidth.method_51());
            base.class345_0.Write((preferredTableWidth.method_51() != FtsWidth.Percentage) ? ((short)preferredTableWidth.method_49()) : ((short)(preferredTableWidth.method_49() * 50f)));
        }
    }
コード例 #4
0
    internal void method_54(string A_0, Class15 A_1)
    {
        if (A_1 != null)
        {
            int num = (int)A_1.method_49();
            switch (A_1.method_51())
            {
            case FtsWidth.Auto:
                num = 0;
                break;

            case FtsWidth.Percentage:
                num = (int)(A_1.method_49() * 50f);
                break;

            case FtsWidth.Point:
                num = (int)A_1.method_49();
                break;
            }
            this.method_49(A_0, Class1041.smethod_8(num), Class417.smethod_33(A_1.method_51()));
        }
    }
コード例 #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);
    }
コード例 #6
0
    private void imethod_2(SprmCode A_0, int A_1, int A_2, CellAlign A_3, object A_4)
    {
        int      num  = 0x10;
        SprmCode code = A_0;

        if (code <= SprmCode.TSetBrc)
        {
            if (code > SprmCode.TTextFlow)
            {
                if (code == SprmCode.TVertAlign)
                {
                    VerticalAlignment alignment = (VerticalAlignment)A_4;
                    if (alignment != VerticalAlignment.Top)
                    {
                        this.class345_0.method_5(SprmCode.TVertAlign);
                        this.class345_0.Write((byte)3);
                        this.class345_0.Write((byte)A_1);
                        this.class345_0.Write((byte)A_2);
                        this.class345_0.Write((byte)alignment);
                        return;
                    }
                    return;
                }
                if (code == SprmCode.TSetBrc)
                {
                    this.method_27(A_1, A_2, (Border)A_4, A_3, SprmCode.TSetBrc);
                    return;
                }
            }
            else
            {
                if (code == SprmCode.TDxaCol)
                {
                    int num2 = (int)Math.Round((double)(float.Parse(A_4.ToString()) * 20f));
                    this.class345_0.method_5(SprmCode.TDxaCol);
                    this.class345_0.Write((byte)A_1);
                    this.class345_0.Write((byte)A_2);
                    this.class345_0.Write((short)num2);
                    return;
                }
                if (code == SprmCode.TTextFlow)
                {
                    TextDirection direction = (TextDirection)A_4;
                    if (direction != TextDirection.TopToBottom)
                    {
                        this.class345_0.method_5(SprmCode.TTextFlow);
                        this.class345_0.Write((byte)A_1);
                        this.class345_0.Write((byte)A_2);
                        this.class345_0.Write((ushort)direction);
                        return;
                    }
                    return;
                }
            }
        }
        else if (code > SprmCode.TCellWidth)
        {
            switch (code)
            {
            case SprmCode.TFCellNoWrap:
                if (!((bool)A_4))
                {
                    this.class345_0.method_5(SprmCode.TFCellNoWrap);
                    this.class345_0.Write((byte)3);
                    this.class345_0.Write((byte)A_1);
                    this.class345_0.Write((byte)A_2);
                    this.class345_0.Write((byte)1);
                    return;
                }
                return;

            case SprmCode.TCellHideMark:
                if ((bool)A_4)
                {
                    this.class345_0.method_5(SprmCode.TCellHideMark);
                    this.class345_0.Write((byte)3);
                    this.class345_0.Write((byte)A_1);
                    this.class345_0.Write((byte)A_2);
                    this.class345_0.Write((byte)1);
                }
                return;

            case SprmCode.TFitText:
                if ((bool)A_4)
                {
                    this.class345_0.method_5(SprmCode.TFitText);
                    this.class345_0.Write((byte)A_1);
                    this.class345_0.Write((byte)A_2);
                    this.class345_0.Write((byte)1);
                }
                return;
            }
        }
        else
        {
            if (code == SprmCode.TCellPadding)
            {
                Class354.smethod_5(this.class345_0, SprmCode.TCellPadding, A_1, A_2, A_3, A_4);
                return;
            }
            if (code == SprmCode.TCellWidth)
            {
                Class15 class2 = new Class15(FtsWidth.None, 0);
                switch (this.class732_0.method_0(A_1).WidthUnit)
                {
                case FtsWidth.Auto:
                    class2 = new Class15(FtsWidth.Auto, 0);
                    break;

                case FtsWidth.Percentage:
                    class2 = new Class15(FtsWidth.Percentage, (short)Math.Round((double)(this.class732_0.method_0(A_1).CellWidth * 50f)));
                    break;

                case FtsWidth.Point:
                    class2 = new Class15(FtsWidth.Point, (short)Math.Round((double)(this.class732_0.method_0(A_1).CellWidth * 20f)));
                    break;
                }
                this.method_23(A_1, A_2, (int)class2.method_51(), (int)class2.method_49());
                class2.Close();
                class2 = null;
                return;
            }
        }
        throw new InvalidOperationException(string.Format(BookmarkStart.b("砵圷丹᰻圽ⴿ㉁⡃⍅╇⽉≋㩍㕏㙑瑓さ㝗⡙籛╝偟ὡ䑣ၥ१٩ᥫ୭幯", num), A_0));
    }