Beispiel #1
0
    internal static void smethod_2(Class108 A_0, Class108 A_1, HeaderFooterType A_2)
    {
        HeaderFooter footer = A_1.method_8().HeadersFooters[A_2];

        switch (A_2)
        {
        case HeaderFooterType.HeaderEven:
            A_0.method_8().HeadersFooters[HeaderFooterType.HeaderEven] = footer;
            return;

        case HeaderFooterType.HeaderOdd:
            A_0.method_8().HeadersFooters[HeaderFooterType.HeaderOdd] = footer;
            return;

        case HeaderFooterType.FooterEven:
            A_0.method_8().HeadersFooters[HeaderFooterType.FooterEven] = footer;
            return;

        case HeaderFooterType.FooterOdd:
            A_0.method_8().HeadersFooters[HeaderFooterType.FooterOdd] = footer;
            return;

        case HeaderFooterType.HeaderFirstPage:
            A_0.method_8().HeadersFooters[HeaderFooterType.HeaderFirstPage] = footer;
            return;

        case HeaderFooterType.FooterFirstPage:
            A_0.method_8().HeadersFooters[HeaderFooterType.FooterFirstPage] = footer;
            return;
        }
    }
Beispiel #2
0
    private static bool smethod_7(Class857 A_0, Class108 A_1)
    {
        Class108 class2 = null;
        Class91  class3 = A_0.method_13().method_2(A_0.method_16(), null, A_0.method_20(), true);

        if (!(class3 is Class92))
        {
            class2 = smethod_11(A_0, A_0.method_14(), A_0.method_26());
        }
        bool flag  = ((class3 != null) && !(class3 is Class92)) && Class567.smethod_16(((Class93)class3).method_6());
        bool flag2 = (A_1.method_0() != A_0.method_26()) && (A_0.method_26() != null);

        if (!flag)
        {
            return(false);
        }
        return(((flag2 || A_0.method_34()) || ((class2 == null) || !A_1.method_8().SectPr.Equals(class2.method_8().SectPr))) || ((class3 is Class97) && ((Class97)class3).method_33()));
    }
Beispiel #3
0
    internal static void smethod_0(Class857 A_0)
    {
        Class108 class2 = new Class108();

        smethod_5(A_0, class2);
        Class92 class3 = A_0.method_13().method_2(class2.method_4(), null, A_0.method_20(), true) as Class92;

        if ((class3 != null) && (class3.method_4() != null))
        {
            class2.method_9(new Section(A_0.method_9()));
            smethod_1(class2.method_8(), class3.method_4());
        }
        else
        {
            class2.method_9(new Section(A_0.method_9()));
        }
        A_0.method_14().Add(class2);
        smethod_6(A_0, class2);
    }
Beispiel #4
0
    internal static void smethod_0(Class857 A_0, Class108 A_1)
    {
        int     num     = 15;
        Section section = A_1.method_8().Clone();

        section.SectPr.method_57(SectionBreakType.NoBreak);
        smethod_1(A_0, section.SectPr);
        Class95 class2 = (Class95)A_0.method_13().method_3(A_0.method_16(), BookmarkStart.b("䘴制娸伺吼倾⽀", 15), A_0.method_20());

        A_0.method_9().Settings.method_5().method_14((class2 != null) && class2.method_14());
        if ((class2 != null) && (class2.method_12() != null))
        {
            class2.method_12().method_37(section.SectPr);
        }
        A_0.method_29().Push(section);
        A_0.method_31(true);
        Class574.smethod_0(A_0, BookmarkStart.b("䘴制娸伺吼倾⽀", num), section.Body);
        A_0.method_33(true);
        A_0.method_29().Pop();
    }
Beispiel #5
0
    private static int smethod_4(Class857 A_0, Class106 A_1, Class975 A_2)
    {
        int      num    = 0;
        Class108 class2 = Class574.smethod_11(A_0, A_0.method_14(), A_0.method_26());

        if (class2 != null)
        {
            int num2 = Class969.smethod_31((double)class2.method_8().PageSetup.ClientWidth);
            int num3 = 0;
            int num4 = 0;
            if (A_1 == null)
            {
                return(num);
            }
            int num5 = (A_1.method_16() == -2147483648) ? num2 : A_1.method_16();
            foreach (Class94 class3 in A_1.method_20())
            {
                if (class3.method_12() == -2147483648)
                {
                    num3++;
                }
                else
                {
                    num4 += class3.method_12();
                }
            }
            if (A_2.method_5() > A_1.method_20().Count)
            {
                num3 += A_2.method_5() - A_1.method_20().Count;
            }
            if (num3 > 0)
            {
                num = (num5 - num4) / num3;
            }
        }
        return(num);
    }
Beispiel #6
0
    internal static DocumentObject smethod_4(Class857 A_0, Class108 A_1, DocumentObject A_2)
    {
        int num = 0x10;

        if (smethod_8(A_0) && ((A_2 == null) || (A_2 is Body)))
        {
            bool flag2;
            if (((A_2 is TableCell) || (A_2 is TextBox)) || (A_2 is HeaderFooter))
            {
                return(A_2);
            }
            Section lastSection = A_0.method_9().LastSection;
            bool    flag        = smethod_7(A_0, A_1);
            if ((flag2 = ((A_0.method_32() || A_0.method_30()) || flag) || (A_0.method_9().Sections.Count == 0)) || ((A_2 == null) && (A_0.method_29().Count == 0)))
            {
                if (A_0.method_29().Count == 0)
                {
                    if (flag2)
                    {
                        lastSection = A_1.method_8();
                        A_0.method_9().Sections.Add(lastSection);
                    }
                }
                else
                {
                    Section section2 = (Section)A_0.method_29().Peek();
                    lastSection = section2.Clone();
                    A_1.method_8().SectPr.method_37(lastSection.SectPr);
                    smethod_5((Class17)section2.SectPr.Clone(), lastSection.SectPr);
                    A_0.method_9().Sections.Add(lastSection);
                }
                Section section3 = (Section)A_0.method_9().GetChildElements(1, 1)[0];
                if ((flag && (((A_0.method_38() == null) || A_0.method_38().method_10()) || (section3.Body.ChildObjects.Count != 0))) && bool_0)
                {
                    lastSection.SectPr.method_57(SectionBreakType.NewPage);
                }
                Class91 class2 = A_0.method_13().method_2(A_0.method_16(), null, A_0.method_20(), true);
                if (!(class2 is Class92))
                {
                    Class93 class3 = (Class93)class2;
                    A_0.method_27((class3 != null) ? class3.method_6() : BookmarkStart.b("攵䰷嬹刻娽ℿぁ⁃", num));
                    A_0.method_35((((A_0.method_16() != BookmarkStart.b("攵䰷嬹刻娽ℿぁ⁃", num)) && (class3 != null)) && (class3 is Class97)) && Class567.smethod_16(class3.method_6()));
                }
            }
            smethod_6(A_0.method_9());
            A_0.method_33(false);
            A_0.method_31(false);
            foreach (Paragraph paragraph2 in A_0.method_36())
            {
                if (paragraph2.ParentObject != lastSection.Body)
                {
                    lastSection.Body.method_13(paragraph2);
                }
            }
            A_0.method_36().Clear();
            return(lastSection.Body);
        }
        if (A_2 != null)
        {
            foreach (Paragraph paragraph in A_0.method_36())
            {
                if (paragraph.Owner == null)
                {
                    A_2.method_13(paragraph);
                }
            }
        }
        return(A_2);
    }
Beispiel #7
0
    internal static bool smethod_0(Class857 A_0, DocumentObject A_1, Class108 A_2)
    {
        int num = 14;

        A_0.method_39(new Class1052());
        A_0.method_38().method_1(A_0.method_11().method_1());
        A_0.method_38().method_13(string.Format(BookmarkStart.b("伳ص䔷᜹伻儽㔿ぁ❃⍅", 14), A_0.method_38().method_0()));
        string str = A_0.method_38().method_0();

        if (str != null)
        {
            if (!(str == BookmarkStart.b("䀳圵娷嘹夻ጽ⼿⑁楃╅❇⑉㡋⭍㹏♑", num)))
            {
                if (!(str == BookmarkStart.b("唳娵䠷刹崻尽┿㙁ⵃ╅⥇♉態❍㹏㙑ㅓ⹕", num)))
                {
                    goto Label_020E;
                }
                A_0.method_38().method_7(FieldType.FieldIndex);
                A_0.method_38().method_9(BookmarkStart.b("紳砵簷缹搻", num));
            }
            else
            {
                A_0.method_38().method_7(FieldType.FieldTOC);
                A_0.method_38().method_9(BookmarkStart.b("怳礵笷", num));
            }
            Class396 class3 = A_0.method_11();
            A_0.method_38().method_5(class3.method_12(BookmarkStart.b("䜳䈵䄷嘹夻ጽ⸿⍁⥃⍅", num), null));
            if (Class567.smethod_16(A_0.method_38().method_4()))
            {
                Section section = A_2.method_8().Clone();
                section.SectPr.method_57(SectionBreakType.NoBreak);
                Class95 class4 = (Class95)A_0.method_13().method_3(A_0.method_38().method_4(), BookmarkStart.b("䜳匵嬷丹唻儽⸿", num), A_0.method_20());
                if ((class4 != null) && (class4.method_12() != null))
                {
                    ((Class17)section.SectPr.Clone()).method_37(section.SectPr);
                }
                A_0.method_29().Push(section);
                A_0.method_31(true);
            }
            smethod_2(A_0, A_1);
            smethod_1(A_0);
            if (A_1 == null)
            {
                A_1 = A_0.method_9().LastSection.Body;
            }
            List <DocumentObject> childElements = A_1.GetChildElements(DocumentObjectType.Paragraph, false);
            if (childElements.Count != 0)
            {
                Paragraph paragraph1 = (Paragraph)childElements[childElements.Count - 1];
            }
            else
            {
                new Paragraph(A_0.method_9());
            }
            if (Class567.smethod_16(A_0.method_38().method_4()))
            {
                A_0.method_33(true);
                A_0.method_29().Pop();
            }
            return(true);
        }
Label_020E:
        A_0.method_38().method_11(true);
        smethod_2(A_0, A_1);
        return(false);
    }
Beispiel #8
0
    internal static void smethod_0(Class857 A_0, Class108 A_1, string A_2)
    {
        int              num        = 6;
        Class92          class2     = A_0.method_13().method_2(A_1.method_4(), null, A_0.method_20(), true) as Class92;
        HeaderFooterType type       = smethod_1(A_1, A_2);
        HeaderFooter     evenHeader = null;

        switch (type)
        {
        case HeaderFooterType.HeaderEven:
            evenHeader = A_1.method_8().HeadersFooters.EvenHeader;
            break;

        case HeaderFooterType.HeaderOdd:
            evenHeader = A_1.method_8().HeadersFooters.OddHeader;
            break;

        case HeaderFooterType.FooterEven:
            evenHeader = A_1.method_8().HeadersFooters.EvenFooter;
            break;

        case HeaderFooterType.FooterOdd:
            evenHeader = A_1.method_8().HeadersFooters.OddFooter;
            break;

        case HeaderFooterType.HeaderFirstPage:
            evenHeader = A_1.method_8().HeadersFooters.FirstPageHeader;
            break;

        case HeaderFooterType.FooterFirstPage:
            evenHeader = A_1.method_8().HeadersFooters.FirstPageFooter;
            break;
        }
        Class17 class3 = null;

        if (class2 != null)
        {
            Class107 class4 = A_2.StartsWith(BookmarkStart.b("䐫䬭儯嘱儳䐵", num)) ? class2.method_12() : class2.method_14();
            if (class4 != null)
            {
                class3 = class4.method_4();
            }
            if (A_2.EndsWith(BookmarkStart.b("ī䈭唯吱䀳", num)))
            {
                A_0.method_9().Settings.bool_37 = true;
            }
            if (class3 != null)
            {
                class3.method_37(A_1.method_8().SectPr);
            }
            while (A_0.method_11().method_9(A_2))
            {
                string key = A_0.method_11().method_1();
                if (key != null)
                {
                    int num2;
                    if (Class1160.dictionary_109 == null)
                    {
                        Dictionary <string, int> dictionary1 = new Dictionary <string, int>(11);
                        dictionary1.Add(BookmarkStart.b("尫", num), 0);
                        dictionary1.Add(BookmarkStart.b("䐫", num), 1);
                        dictionary1.Add(BookmarkStart.b("䀫䜭䌯䘱", num), 2);
                        dictionary1.Add(BookmarkStart.b("堫伭刯帱儳", num), 3);
                        dictionary1.Add(BookmarkStart.b("堫伭刯帱儳ᬵ圷尹ᄻ崽⼿ⱁぃ⍅♇㹉", num), 4);
                        dictionary1.Add(BookmarkStart.b("䴫䈭䀯娱唳吵崷丹唻崽ℿ⹁楃⽅♇⹉⥋㙍", num), 5);
                        dictionary1.Add(BookmarkStart.b("䔫䈭尯䜱䜳䈵䨷嬹䠻圽⼿ⱁ楃⽅♇⹉⥋㙍", num), 6);
                        dictionary1.Add(BookmarkStart.b("堫伭刯帱儳ᬵ儷吹堻嬽㠿", num), 7);
                        dictionary1.Add(BookmarkStart.b("䌫䰭娯圱圳䈵ᔷ匹刻娽┿㩁", num), 8);
                        dictionary1.Add(BookmarkStart.b("夫崭唯䀱ᤳ張嘷帹夻䘽", num), 9);
                        dictionary1.Add(BookmarkStart.b("丫䜭刯帱崳夵強䠹崻丽⠿㭁", num), 10);
                        Class1160.dictionary_109 = dictionary1;
                    }
                    if (Class1160.dictionary_109.TryGetValue(key, out num2))
                    {
                        switch (num2)
                        {
                        case 0:
                        case 1:
                        {
                            Class1099.smethod_1(A_0, A_0.method_11().method_1(), evenHeader);
                            continue;
                        }

                        case 2:
                        {
                            Class530.smethod_0(A_0, evenHeader, null);
                            continue;
                        }

                        case 3:
                        {
                            Class90.smethod_0(A_0, evenHeader);
                            continue;
                        }

                        case 4:
                        case 5:
                        case 6:
                        case 7:
                        case 8:
                        case 9:
                        case 10:
                        {
                            if (!Class246.smethod_0(A_0, evenHeader, A_1))
                            {
                                A_0.method_11().vmethod_1();
                            }
                            continue;
                        }
                        }
                    }
                }
                A_0.method_11().vmethod_1();
            }
        }
    }