Exemplo n.º 1
0
    internal static string smethod_1(BinaryReader A_0, bool A_1, bool A_2)
    {
        if (A_1)
        {
            int num = A_0.ReadUInt16() * 2;
            if (!Class567.smethod_46(A_0, num))
            {
                num = 0;
            }
            byte[] buffer2 = A_0.ReadBytes(num);
            string str     = smethod_0(A_1).GetString(buffer2);
            if (A_2)
            {
                A_0.ReadUInt16();
            }
            return(str);
        }
        int count = A_0.ReadByte();

        byte[] bytes = A_0.ReadBytes(count);
        string str2  = smethod_0(A_1).GetString(bytes);

        if (A_2)
        {
            A_0.ReadByte();
        }
        return(str2);
    }
Exemplo n.º 2
0
    private static string smethod_7(BinaryReader A_0, int A_1)
    {
        int num = A_0.ReadInt32();

        if (!Class567.smethod_46(A_0, num))
        {
            num = 0;
        }
        byte[] bytes = A_0.ReadBytes(num);
        return(Encoding.GetEncoding(A_1).GetString(bytes, 0, num).TrimEnd(new char[1]));
    }
Exemplo n.º 3
0
    internal Class320(Class1089 A_0)
    {
        MemoryStream input = A_0.method_4(BookmarkStart.b("␦昨䤪䜬昮弰唲娴", 1));

        if (input != null)
        {
            BinaryReader reader = new BinaryReader(input);
            this.odtPersist1_0        = (OdtPersist1)reader.ReadUInt16();
            this.odtClipboardFormat_0 = (OdtClipboardFormat)reader.ReadUInt16();
            if (Class567.smethod_46(reader, 2))
            {
                this.odtPersist2_0 = ((OdtPersist2)reader.ReadUInt16()) & (OdtPersist2.StoredAsEmf | OdtPersist2.QueriedEmf | OdtPersist2.Reserved1 | OdtPersist2.Emf);
            }
        }
    }
Exemplo n.º 4
0
    internal Class1090(BinaryReader A_0)
    {
        int num3     = 9;
        int position = (int)A_0.BaseStream.Position;

        byte[] bytes = A_0.ReadBytes(0x40);
        if (bytes.Length >= 0x40)
        {
            int num2 = A_0.ReadUInt16();
            if (num2 <= 0x40)
            {
                if (num2 > 0)
                {
                    if (num2 > bytes.Length)
                    {
                        throw new InvalidOperationException(BookmarkStart.b("笮夰嘲ᔴ䐶䴸䤺䠼尾㕀㙂㝄≆ⵈ歊㹌㭎㹐⅒㑔ざ㱘筚㹜ぞ፠ᅢၤᝦᵨ๪६䅮", num3));
                    }
                    this.string_0 = Encoding.Unicode.GetString(bytes, 0, num2 - 2);
                }
                else
                {
                    this.string_0 = null;
                }
                this.dirEntryType_0 = (DirEntryType)A_0.ReadByte();
                if (this.dirEntryType_0 == DirEntryType.Invalid)
                {
                    A_0.BaseStream.Position = position + 0x80;
                }
                else
                {
                    this.dirEntryColor_0 = (DirEntryColor)A_0.ReadByte();
                    this.uint_2          = A_0.ReadUInt32();
                    this.uint_3          = A_0.ReadUInt32();
                    this.uint_1          = A_0.ReadUInt32();
                    this.guid_0          = new Guid(A_0.ReadBytes(0x10));
                    this.uint_5          = A_0.ReadUInt32();
                    this.long_0          = A_0.ReadInt64();
                    if (Class567.smethod_46(A_0, 20))
                    {
                        this.long_1 = A_0.ReadInt64();
                        this.uint_4 = A_0.ReadUInt32();
                        this.long_2 = A_0.ReadUInt32();
                        A_0.ReadInt32();
                    }
                }
            }
        }
    }
Exemplo n.º 5
0
    internal Class221(Class1089 A_0)
    {
        MemoryStream input = A_0.method_4(BookmarkStart.b("㜳礵笷戹爻缽ി݁", 14));

        if (input != null)
        {
            BinaryReader  reader  = new BinaryReader(input, Encoding.Unicode);
            StringBuilder builder = new StringBuilder();
            while (Class567.smethod_46(reader, 2))
            {
                char ch = reader.ReadChar();
                if (ch == '\0')
                {
                    break;
                }
                builder.Append(ch);
            }
            this.string_0 = builder.ToString();
        }
    }
Exemplo n.º 6
0
    internal Class553(Class1089 A_0)
    {
        MemoryStream input = A_0.method_4(BookmarkStart.b("〰瀲娴娶䤸琺弼唾", 11));

        if (input != null)
        {
            BinaryReader reader = new BinaryReader(input);
            this.int_1      = reader.ReadInt32();
            this.int_2      = reader.ReadInt32();
            this.byte_0     = reader.ReadBytes(4);
            this.guid_0     = new Guid(reader.ReadBytes(0x10));
            this.string_3   = Class627.smethod_2(reader);
            this.class451_1 = new Class451(reader, false);
            this.string_0   = Class627.smethod_2(reader);
            if (Class567.smethod_46(reader, 4) && (reader.ReadInt32() == 0x71b239f4))
            {
                this.string_1   = Class1029.smethod_6(reader);
                this.class451_0 = new Class451(reader, true);
                this.string_2   = Class1029.smethod_6(reader);
            }
        }
    }
Exemplo n.º 7
0
    private bool method_11(ListLevel A_0)
    {
        bool flag2;
        int  num = 7;

        A_0.method_10(this.binaryReader_0.ReadInt32());
        A_0.PatternType = (ListPatternType)this.binaryReader_0.ReadByte();
        int num2 = this.binaryReader_0.ReadByte();

        A_0.NumberAlignment       = ((ListNumberAlignment)num2) & (ListNumberAlignment.Right | ListNumberAlignment.Center);
        A_0.IsLegalStyleNumbering = (num2 & 4) != 0;
        bool flag = (num2 & 8) != 0;

        A_0.bool_8      = (num2 & 0x10) != 0;
        A_0.bool_9      = (num2 & 0x20) != 0;
        A_0.Word6Legacy = (num2 & 0x40) != 0;
        A_0.bool_7      = (num2 & 0x80) != 0;
        this.binaryReader_0.ReadBytes(9);
        A_0.FollowCharacter = (FollowCharacterType)this.binaryReader_0.ReadByte();
        A_0.LegacySpace     = this.binaryReader_0.ReadInt32();
        A_0.LegacyIndent    = this.binaryReader_0.ReadInt32();
        int num3 = this.binaryReader_0.ReadByte();
        int num4 = this.binaryReader_0.ReadByte();
        int num5 = this.binaryReader_0.ReadByte() - 1;

        this.binaryReader_0.ReadByte();
        if (flag && (num5 == 0))
        {
            A_0.NoRestartByHigher = true;
        }
        this.class141_0.method_65(new Class428(this.binaryReader_0, num4).method_2(), A_0.ParagraphFormat, null);
        if ((this.class703_0.nfibEnum_0 == NFibEnum.Word97BiDi) && !A_0.ParagraphFormat.method_6(0x618))
        {
            A_0.ParagraphFormat.IsBidi = true;
            Class646.smethod_1(A_0.ParagraphFormat);
            A_0.ParagraphFormat.Remove(0x618);
        }
        else
        {
            Class646.smethod_1(A_0.ParagraphFormat);
        }
        this.class140_0.method_62(new Class428(this.binaryReader_0, num3).method_2(), A_0.CharacterFormat, null, this.dictionary_2);
        uint   num7       = this.binaryReader_0.ReadUInt16();
        Stream baseStream = this.binaryReader_0.BaseStream;

        baseStream.Position -= 2L;
        if (flag2 = Class567.smethod_46(this.binaryReader_0, (int)num7))
        {
            string str = Class813.smethod_1(this.binaryReader_0, true, false);
            if ((ListLevel.smethod_1(str) && (str != null)) && ((str.Length <= 30) && (str.IndexOf(0xffff) < 0)))
            {
                for (int i = 0; i < 9; i++)
                {
                    str = str.Replace(((char)i).ToString(), string.Format(BookmarkStart.b("ࠬ吮İ串", num), i + 1));
                }
                if (A_0.PatternType == ListPatternType.Bullet)
                {
                    A_0.BulletCharacter = str;
                }
                else
                {
                    A_0.LevelText = str;
                    string str3  = BookmarkStart.b("ࠬ", num) + ((A_0.LevelNumber + 1)).ToString();
                    int    index = str.IndexOf(str3);
                    if (index != -1)
                    {
                        A_0.NumberPrefix = str.Substring(0, index);
                        A_0.NumberPrefix = this.method_12(A_0.NumberPrefix);
                        int startIndex = index + 2;
                        A_0.NumberSufix = str.Substring(startIndex, str.Length - startIndex);
                    }
                    else
                    {
                        A_0.NoPlaceholder = true;
                        if (!string.IsNullOrEmpty(str))
                        {
                            A_0.NumberPrefix = str;
                        }
                        else
                        {
                            A_0.NumberPrefix = (string)(A_0.NumberSufix = null);
                        }
                        A_0.NoLevelText = true;
                    }
                }
            }
        }
        smethod_0(A_0);
        return(flag2);
    }