private void method_16(ShapeBase A_0)
    {
        Stream       baseStream = this.class423_0.method_59().BaseStream;
        BinaryWriter writer     = this.class423_0.method_59();
        int          position   = (int)baseStream.Position;
        Class1107    class2     = new Class1107 {
            bool_0 = true,
            int_1  = position
        };

        this.class423_0.method_38(Class816.string_13, A_0.CharacterFormat, class2);
        Class262 class3 = new Class262(A_0);

        class3.method_1(writer);
        if (A_0.CanHaveImage)
        {
            ShapeObject obj2 = (ShapeObject)A_0;
            if (obj2.ImageData.IsLink && !obj2.HasImageBytes)
            {
                Class813.smethod_2(obj2.ImageData.SourceFullName, 0x7fffffff, writer, false, false);
            }
        }
        Class931.smethod_1(A_0, writer);
        int num2 = (int)baseStream.Position;

        class3.int_2        = num2 - position;
        baseStream.Position = position;
        class3.method_1(writer);
        baseStream.Position = num2;
    }
Exemple #2
0
 internal void method_62(byte[] A_0, CharacterFormat A_1, Class1107 A_2, Dictionary <string, int> A_3)
 {
     this.dictionary_0         = A_3;
     base.wordAttrCollection_0 = A_1;
     this.class1107_0          = A_2;
     this.class479_0.method_1(A_0);
 }
    private int method_11(ref string A_0, Class1107 A_1)
    {
        int length = A_0.Length;

        if (A_0.Length > 1)
        {
            int num2 = -1;
            if (((A_0.Length >= 10) && (A_1.int_1 != 0)) && A_1.bool_0)
            {
                A_0 = string.Empty;
                return(length);
            }
            if ((A_0.Length > 10) && this.method_12(A_0))
            {
                return(length);
            }
            A_0  = A_0.Trim(new char[1]);
            num2 = A_0.IndexOfAny(Class818.char_20);
            if (num2 > -1)
            {
                if (num2 == 0)
                {
                    num2 = 1;
                }
                A_0 = A_0.Substring(0, num2);
                int num3 = this.method_13(A_0);
                if (num3 <= -1)
                {
                    return(num2);
                }
                if (num3 == 0)
                {
                    num3 = 1;
                }
                A_0 = A_0.Substring(0, num3);
                return(num3);
            }
            num2 = this.method_13(A_0);
            if (num2 > -1)
            {
                if (num2 == 0)
                {
                    num2 = 1;
                }
                A_0 = A_0.Substring(0, num2);
                return(num2);
            }
            if ((A_0.Length > 1) && (A_0[0] == '('))
            {
                num2 = 1;
                A_0  = A_0.Substring(0, 1);
                return(1);
            }
        }
        return(length);
    }
    private void method_17(Class454 A_0)
    {
        Class1107 class2 = new Class1107 {
            bool_0 = true,
            bool_3 = true,
            int_1  = A_0.method_0()
        };

        this.class423_0.method_38(Class816.string_13, this.method_21(), class2);
    }
Exemple #5
0
    internal int method_38(int A_0, Class428 A_1, out CharacterFormat A_2, out Class1107 A_3)
    {
        int      num    = base.method_15().method_11(A_0);
        Class431 class2 = base.method_15().method_25(num);

        A_2 = new CharacterFormat(this.document_0);
        A_3 = new Class1107();
        this.class140_0.method_62(class2.method_2(), A_2, A_3, this.method_47());
        this.class140_0.method_62(A_1.method_2(), A_2, A_3, this.method_47());
        return(base.method_15().method_16(num + 1));
    }
Exemple #6
0
    private void imethod_40(Class1107 A_0, CharacterFormat A_1)
    {
        Symbol symbol = new Symbol(this.document_0);

        byte[] bytes = BitConverter.GetBytes(A_0.char_0);
        symbol.CharacterCode = bytes[0];
        symbol.CharCodeExt   = bytes[1];
        symbol.FontName      = A_0.string_0;
        symbol.CharacterFormat.method_73(A_1);
        this.documentObject_0.method_13(symbol);
    }
 private void method_15(CharacterFormat A_0, Class1107 A_1, Class537 A_2, int A_3, int A_4)
 {
     if (A_4 != 0)
     {
         string str = new string(A_2.method_2(), A_3, A_4);
         if ((A_4 != 1) || (str[0] != '\x0001'))
         {
             int    startIndex = 0;
             string str2       = str;
             do
             {
                 startIndex += this.method_11(ref str, A_1);
                 this.method_16(str, A_0);
                 str = str2.Substring(startIndex);
             }while (!string.IsNullOrEmpty(str));
         }
     }
 }
Exemple #8
0
 internal byte[] method_65(CharacterFormat A_0, Class1107 A_1, bool A_2)
 {
     this.class1107_0 = A_1;
     this.bool_3      = A_2;
     return(base.method_1(A_0));
 }
Exemple #9
0
 internal Class431 method_64(CharacterFormat A_0, Class1107 A_1, bool A_2)
 {
     return(new Class431(this.method_65(A_0, A_1, A_2)));
 }
    private bool method_26(Class762 A_0, FootnoteType A_1, Class537 A_2, int A_3, int A_4, Class1107 A_5, CharacterFormat A_6)
    {
        int num = 0;

        A_0.bool_0 = A_2.method_2()[A_3] == '\x0002';
        if (A_0.bool_0 && !A_5.bool_0)
        {
            return(false);
        }
        string str = null;

        if (!A_0.bool_0)
        {
            str = new string(A_2.method_2(), A_3, A_4 - A_3);
            if ((A_5.bool_0 && (A_5.char_0 != '\0')) && (str == BookmarkStart.b("ล", num)))
            {
                if (A_5.string_0 != null)
                {
                    A_6.FontName = A_5.string_0;
                }
                str = new string(new char[] { Class742.smethod_2(A_5.char_0) });
            }
        }
        this.class764_0.method_43().imethod_23(A_1, A_0.bool_0, str, A_6);
        new Class1108(this.class764_0, Class700.smethod_0(A_1)).method_4(A_0.method_2(), A_0.method_6());
        this.class764_0.method_43().imethod_24();
        return(true);
    }
    private void method_17(char A_0, int A_1, CharacterFormat A_2, Class1107 A_3)
    {
        int num = this.class764_0.method_5().method_6(A_1);

        switch (A_0)
        {
        case '\x0001':
            if (A_3.bool_1)
            {
                this.method_18(A_2, A_3.int_1);
                return;
            }
            if (A_3.bool_3)
            {
                this.method_19(A_2, A_3.int_1);
                return;
            }
            this.method_20(A_2, A_3.int_1);
            return;

        case '\x0005':
            if (this.subDocumentType_0 == SubDocumentType.Main)
            {
                this.method_27(num, A_2);
                return;
            }
            this.class764_0.method_43().imethod_13(A_0, A_2);
            return;

        case '\b':
            this.method_23(num, A_2);
            return;

        case '\x0013':
        {
            Class766 class5 = this.class764_0.method_7().method_0(this.subDocumentType_0, num);
            if (class5 == null)
            {
                class5 = new Class766(0x13, 0);
            }
            this.class764_0.method_43().imethod_15(A_2, class5.method_2());
            return;
        }

        case '\x0014':
        {
            Class454 class3 = null;
            if (A_3.bool_2 && A_3.bool_3)
            {
                class3 = this.class764_0.method_41(A_3.int_1);
            }
            this.class764_0.method_43().imethod_16(A_2, class3);
            return;
        }

        case '\x0015':
        {
            bool     flag   = false;
            bool     flag2  = false;
            Class766 class6 = this.class764_0.method_7().method_0(this.subDocumentType_0, num);
            if (class6 != null)
            {
                flag  = class6.method_13();
                flag2 = class6.method_9();
            }
            this.class764_0.method_43().imethod_17(A_2, flag2, flag);
            return;
        }

        case '(':
            if (A_2.HasKey(400))
            {
                A_2.Remove(400);
            }
            if (A_3.bool_0)
            {
                this.class764_0.method_43().imethod_40(A_3, A_2);
                return;
            }
            this.method_16(A_3.char_0.ToString(), A_2);
            return;

        case '<':
        {
            Class487 class7 = this.class764_0.method_17().method_5(this.int_2++);
            if (class7 != null)
            {
                Class9 class2 = new Class9(this.class764_0.method_42(), class7.method_0());
                class2.method_23(class7.method_1());
                class2.method_27(class7.method_3());
                class2.method_25(class7.method_2());
                using (IEnumerator enumerator = class7.method_4().System.Collections.IEnumerable.GetEnumerator())
                {
                    while (enumerator.MoveNext())
                    {
                        Class901 current = (Class901)enumerator.Current;
                        class2.method_28().method_3(current);
                    }
                }
                this.class764_0.method_43().imethod_36(class2);
                this.stack_0.Push(class2);
            }
            return;
        }

        case '>':
            if (this.stack_0.Count > 0)
            {
                this.stack_0.Pop();
                this.class764_0.method_43().imethod_37();
                return;
            }
            return;
        }
        this.class764_0.method_43().imethod_13(A_0, A_2);
    }
    private void method_14(CharacterFormat A_0, Class1107 A_1, Class537 A_2, int A_3, ref int A_4, bool A_5)
    {
        if ((!A_1.bool_0 && (A_4 == 1)) && (A_2.method_2()[A_3] == '\x0015'))
        {
            A_1.bool_0 = true;
        }
        int  num2 = A_3;
        int  num  = A_3;
        int  num3 = A_3 + A_4;
        int  num6 = A_4;
        bool flag = false;
        int  num5 = A_2.method_0(num) - num;

        while (num < num3)
        {
            int num4 = num + num5;
            if ((this.class130_0.method_1() == num4) || (this.class130_1.method_1() == num4))
            {
                flag = true;
            }
            char ch = A_2.method_2()[num];
            if (((((ch != '\b') && !A_1.bool_0) && ((this.class132_0.method_1() != num4) && (this.class136_0.method_1() != num4))) && (((this.class135_0.method_1() != num4) && (this.class133_0.method_1() != num4)) && ((this.class131_0.method_1() != num4) && (this.class134_0.method_1() != num4)))) && ((this.class129_0.method_1() != num4) && !flag))
            {
                if (A_5 || (ch.ToString().IndexOfAny(Class818.char_20) <= -1))
                {
                    goto Label_0290;
                }
                if (num == num2)
                {
                    num++;
                }
                A_4 = num - num2;
                break;
            }
            CharacterFormat format = (CharacterFormat)A_0.Clone();
            if (!A_1.bool_0 && (num > num2))
            {
                this.method_15(format, A_1, A_2, num2, num - num2);
                num2 = num;
            }
            this.class132_0.method_2(num4);
            if (this.class135_0.method_1() == this.class136_0.method_1())
            {
                this.class136_0.method_2(num4);
                this.class135_0.method_2(num4);
                this.class133_0.method_2(num4);
            }
            else
            {
                this.class135_0.method_2(num4);
                this.class133_0.method_2(num4);
                this.class136_0.method_2(num4);
            }
            this.class131_0.method_2(num4);
            this.class134_0.method_2(num4);
            this.class129_0.method_2(num4);
            if (flag)
            {
                FootnoteType type;
                flag = false;
                if (this.class130_0.method_1() == num4)
                {
                    this.class130_0.method_2(num4);
                }
                else
                {
                    this.class130_1.method_2(num4);
                }
                Class762 class2 = this.method_25(num4, out type);
                if ((class2 != null) && this.method_26(class2, type, A_2, num, num3, A_1, format))
                {
                    num2 = num3;
                }
            }
            else if ((A_1.bool_0 && ((A_4 == 1) || (Array.IndexOf <char>(Class818.char_22, ch) > -1))) || (ch == '\b'))
            {
                if (((A_4 > 1) && (num > num2)) && (Array.IndexOf <char>(Class818.char_22, ch) > -1))
                {
                    this.method_15(format, A_1, A_2, num2, num - num2);
                }
                this.method_17(ch, num4, format, A_1);
                num2 = num + 1;
            }
Label_0290:
            num++;
        }
        if (A_5)
        {
            num--;
        }
        if (num > num2)
        {
            this.method_15(A_0, A_1, A_2, num2, num - num2);
            A_4 = (A_4 < num6) ? (num - A_3) : A_4;
        }
    }