Ejemplo n.º 1
0
 protected override void vmethod_3(Class615 A_0)
 {
     base.bool_3 = A_0.method_9();
     if (base.bool_6)
     {
         bool     flag;
         Class210 class2 = base.method_2() as Class210;
         if (((flag = (class2 != null) ? class2.method_39() : false) && (class2 != null)) && ((base.method_30() is ShapeObject) && ((base.method_30() as ShapeObject).TextWrappingStyle == TextWrappingStyle.Inline)))
         {
             Paragraph paragraph = (base.method_30() as ShapeObject).method_28();
             if (((paragraph != null) && paragraph.IsInCell) && (base.method_5() != null))
             {
                 float num = base.method_5().method_69().Width + (base.method_30() as Interface2).imethod_3(base.method_4()).Width;
                 if (Class59.smethod_5((double)num, base.method_3().method_2(), 0.00050000002374872565) > 0)
                 {
                     flag = false;
                 }
             }
         }
         if (!flag)
         {
             base.interface1_0  = A_0.method_0();
             base.layoutState_0 = LayoutState.Splitted;
         }
         else
         {
             base.layoutState_0 = LayoutState.NotFitted;
         }
     }
     else
     {
         base.layoutState_0 = LayoutState.NotFitted;
     }
 }
Ejemplo n.º 2
0
        private void method_18()
        {
            this.method_27();
            Class615 page = new Class615(1097010747);

            this.method_19(page);
            int pageSize = this.list_1.Count * 8;

            page.StreamOffset = this.stream_0.Position;
            int num = pageSize + Class998.smethod_0(pageSize);

            page.Length = (long)num;
            MemoryStream sectionStream = new MemoryStream();
            Class889     class889      = Class889.Create((Stream)sectionStream, this.dxfVersion_0, this.encoding_0);

            foreach (Class614 class614 in this.list_1)
            {
                if (class614 != null)
                {
                    class889.vmethod_9(class614.PageNumber);
                    class889.vmethod_9((int)class614.Length);
                }
            }
            this.method_21(page, sectionStream);
            Class614 class614_1 = this.list_1[this.list_1.Count - 1];

            this.class564_0.LastPageId        = class614_1.PageNumber;
            this.class564_0.LastPageEndOffset = (ulong)(class614_1.StreamOffset + (long)num - 256L);
            this.class564_0.GapCount          = 0U;
            this.class564_0.PageCount         = (uint)(this.list_1.Count - 1);
            this.class564_0.PagesMapOffset    = (ulong)page.StreamOffset;
        }
Ejemplo n.º 3
0
 protected override void vmethod_11(Class196 A_0, Class615 A_1)
 {
     if ((base.class375_0.method_73().imethod_0() as Class205).method_3() && this.method_92(A_1))
     {
         base.class774_0.method_1(new RectangleF(base.class774_0.method_0().Location, new SizeF(base.class774_0.method_0().Width, base.class774_0.method_0().Height - (base.class375_0.method_73().imethod_0() as Class205).method_7())));
     }
 }
Ejemplo n.º 4
0
        private Class615 method_20(int sectionPageType, MemoryStream sectionStream)
        {
            Class615 page = new Class615(sectionPageType);

            this.method_27();
            page.StreamOffset = this.stream_0.Position;
            this.method_21(page, sectionStream);
            return(page);
        }
Ejemplo n.º 5
0
        private void method_22(Class615 page, Stream sectionHeaderStream)
        {
            Class889 class889 = Class889.Create(sectionHeaderStream, this.dxfVersion_0, this.encoding_0);

            class889.vmethod_9(page.SectionPageType);
            class889.vmethod_9(page.DecompressedSize);
            class889.vmethod_9(page.CompressedSize);
            class889.vmethod_9(page.CompressionType);
            class889.vmethod_11(page.Checksum);
        }
Ejemplo n.º 6
0
    protected override void vmethod_10(Class615 A_0)
    {
        RectangleF ef     = base.class774_0.method_13();
        Class210   class2 = base.method_2() as Class210;
        bool       flag   = false;

        if (class2 != null)
        {
            flag = !(class2.method_19() == 0f);
        }
        if (base.class375_0.method_74().Count == 0)
        {
            if ((flag && (class2.method_13() < 0)) && !(A_0.method_8() is Class65))
            {
                ef.X     += class2.method_19();
                ef.Width -= class2.method_19();
            }
            if (class2.method_13() < 0)
            {
                ef.X     += class2.method_51();
                ef.Width -= class2.method_51();
            }
            if (class2.method_13() != -1)
            {
                if (flag && !(A_0.method_8() is Class65))
                {
                    ef.X     += class2.method_19() + class2.method_51();
                    ef.Width -= class2.method_19() + class2.method_51();
                }
                else if (!flag && !(A_0.method_8() is Class65))
                {
                    ef.X     += class2.method_51();
                    ef.Width -= class2.method_51();
                }
            }
            if ((A_0.method_8() is Class65) && ((A_0.method_8() as Class65).method_2() is Paragraph))
            {
                Paragraph paragraph = (A_0.method_8() as Class65).method_2() as Paragraph;
                int       count     = paragraph.WidgetCollection.Count;
                if ((count > 1) && (count != (A_0.method_8() as Class65).Interface3.imethod_3()))
                {
                    DocumentObject obj2 = paragraph.WidgetCollection[(count - 1) - (A_0.method_8() as Class65).Interface3.imethod_3()];
                    if ((obj2 is Break) && (((obj2 as Break).BreakType == BreakType.PageBreak) || ((obj2 as Break).BreakType == BreakType.ColumnBreak)))
                    {
                        ef.X     += class2.method_19() + class2.method_51();
                        ef.Width -= class2.method_19() + class2.method_51();
                    }
                }
            }
        }
        base.class375_1 = A_0.vmethod_0(ef);
        (base.interface30_0 as Class304).method_12(new Class206.Class215());
        (base.interface30_0 as Class304).method_14(0f);
    }
Ejemplo n.º 7
0
    protected override void vmethod_4(Class615 A_0)
    {
        base.method_61(A_0);
        base.layoutState_0 = LayoutState.Fitted;
        Class210 class2 = A_0.method_2() as Class210;

        if ((class2 != null) ? class2.method_37() : false)
        {
            base.class774_0.method_19();
            base.layoutState_0 = LayoutState.Breaked;
        }
    }
Ejemplo n.º 8
0
        private void method_17()
        {
            MemoryStream sectionStream = new MemoryStream();
            Class889     class889      = Class889.Create((Stream)sectionStream, this.dxfVersion_0, this.encoding_0);

            class889.vmethod_9(this.list_0.Count);
            class889.vmethod_9(2);
            class889.vmethod_9(29696);
            class889.vmethod_9(0);
            class889.vmethod_9(this.list_0.Count);
            foreach (Class617 class617 in this.list_0)
            {
                class889.vmethod_15(class617.SectionSize);
                class889.vmethod_9(class617.PageCount);
                class889.vmethod_9(class617.MaxDecompressedPageSize);
                class889.vmethod_9(1);
                class889.vmethod_9(class617.Compressed);
                class889.vmethod_9(class617.SectionId);
                class889.vmethod_9(class617.Encrypted);
                byte[] buffer = new byte[64];
                if (!string.IsNullOrEmpty(class617.Name))
                {
                    byte[] bytes = Encodings.Ascii.GetBytes(class617.Name);
                    int    num   = Math.Min(bytes.Length, buffer.Length);
                    for (int index = 0; index < num; ++index)
                    {
                        buffer[index] = bytes[index];
                    }
                }
                sectionStream.Write(buffer, 0, buffer.Length);
                foreach (Class616 page in class617.Pages)
                {
                    if (page.PageNumber > 0)
                    {
                        class889.vmethod_9(page.PageNumber);
                        class889.vmethod_9(page.CompressedSize);
                        class889.vmethod_15(page.StartOffset);
                    }
                }
            }
            Class615 page1 = this.method_20(1097007163, sectionStream);
            int      count = Class998.smethod_0((int)(this.stream_0.Position - page1.StreamOffset));

            this.stream_0.Write(Class998.byte_0, 0, count);
            page1.Length = this.stream_0.Position - page1.StreamOffset;
            this.method_19(page1);
        }
Ejemplo n.º 9
0
        private void method_21(Class615 page, MemoryStream sectionStream)
        {
            page.DecompressedSize = (int)sectionStream.Length;
            Class565     class565      = new Class565();
            MemoryStream memoryStream1 = new MemoryStream();

            class565.method_1(sectionStream.GetBuffer(), 0, (int)sectionStream.Length, (Stream)memoryStream1);
            page.CompressedSize = (int)memoryStream1.Length;
            MemoryStream memoryStream2 = new MemoryStream();

            this.method_22(page, (Stream)memoryStream2);
            page.Checksum = Class998.smethod_1(0U, memoryStream2.GetBuffer(), 0, (int)memoryStream2.Length);
            page.Checksum = Class998.smethod_1(page.Checksum, memoryStream1.GetBuffer(), 0, (int)memoryStream1.Length);
            this.method_22(page, this.stream_0);
            this.stream_0.Write(memoryStream1.GetBuffer(), 0, (int)memoryStream1.Length);
            this.method_22(new Class615(page.SectionPageType), this.stream_0);
        }
Ejemplo n.º 10
0
    private bool method_92(Class615 A_0)
    {
        bool flag;

        using (List <Class375> .Enumerator enumerator = A_0.method_5().method_74().GetEnumerator())
        {
            while (enumerator.MoveNext())
            {
                Class375 current = enumerator.Current;
                if (current.method_73() is Footnote)
                {
                    goto Label_0034;
                }
            }
            return(false);

Label_0034:
            flag = true;
        }
        return(flag);
    }
Ejemplo n.º 11
0
    private bool method_91(Class615 A_0)
    {
        Paragraph paragraph = A_0.method_8() as Paragraph;

        if (paragraph != null)
        {
            ParagraphStyle style      = paragraph.GetStyle();
            ListFormat     listFormat = null;
            if (((paragraph.ListFormat.CurrentListLevel == null) && (style != null)) && ((style.ListFormat.CurrentListLevel != null) && style.ListFormat.HasKey(0)))
            {
                listFormat = style.ListFormat;
            }
            else
            {
                listFormat = paragraph.ListFormat;
            }
            if (((listFormat != null) && (listFormat.ListType != ListType.NoList)) && (listFormat.CurrentListLevel != null))
            {
                int                 listLevelNumber;
                ListStyle           style2     = null;
                ListStyleCollection listStyles = paragraph.Document.ListStyles;
                if (((paragraph.ListFormat.CurrentListLevel == null) && (style != null)) && (style.ListFormat.CurrentListLevel != null))
                {
                    listLevelNumber = style.ListFormat.ListLevelNumber;
                    style2          = listStyles.FindByName(style.ListFormat.CustomStyleName);
                }
                else
                {
                    listLevelNumber = paragraph.ListFormat.ListLevelNumber;
                    style2          = listStyles.FindByName(paragraph.ListFormat.CustomStyleName);
                }
                if (style2.GetNearLevel(listLevelNumber).NumberPosition == 0f)
                {
                    return(!(paragraph.Format.FirstLineIndent == 0f));
                }
                return(true);
            }
        }
        return(false);
    }
Ejemplo n.º 12
0
    private void method_17(Class615 A_0, int A_1, ref bool A_2, ref bool A_3, bool A_4)
    {
        if (((!A_0.method_15() || A_3) || (!A_4 || (A_1 != 0))) || ((!(A_0.method_0() is Class65) || ((A_0.method_0() as Class65).imethod_4(0) is Section)) || (!((A_0.method_0() as Class65).imethod_4(0) is Class65) || !(((A_0.method_0() as Class65).imethod_4(0) as Class65).method_2() is Section))))
        {
            A_2 = true;
            A_3 = false;
            return;
        }
        Section section = ((A_0.method_0() as Class65).imethod_4(0) as Class65).method_2() as Section;

        if (section.Columns.Count <= 1)
        {
            return;
        }
        float width = section.Columns[0].Width;
        bool  flag  = true;

        using (IEnumerator enumerator = section.Columns.GetEnumerator())
        {
            while (enumerator.MoveNext())
            {
                Column current = (Column)enumerator.Current;
                if (width != current.Width)
                {
                    goto Label_010C;
                }
                width = current.Width;
            }
            goto Label_0124;
Label_010C:
            flag = false;
        }
Label_0124:
        if (!flag && !section.PageSetup.EqualColumnWidth)
        {
            A_2 = false;
            A_3 = true;
        }
    }
Ejemplo n.º 13
0
    private void method_16(Class196 A_0, RectangleF A_1, Interface18 A_2)
    {
        bool flag = false;
        int  num  = 0;

        A_1 = new RectangleF(new PointF(A_1.Location.X, A_1.Location.Y + 12f), new SizeF(A_1.Width, A_1.Height - 12f));
        foreach (Footnote footnote in A_0.method_127())
        {
            Class615 class2 = Class615.smethod_0(footnote.TextBody, this, A_1.Width);
            Class375 class3 = class2.vmethod_0(A_1);
            if (class2.method_15() || ((class2.method_1() == LayoutState.NotFitted) && (class2.method_0() != null)))
            {
                RectangleF ef;
                A_0.method_28().method_5().method_7(class3);
                A_2.imethod_1(out ef, out A_1, ref num, ref flag, true);
                A_1.Y += 12f;
                Interface3 interface2 = class2.method_0() as Interface3;
                class2 = Class615.smethod_0(interface2, this, A_1.Width);
                class3 = class2.vmethod_0(A_1);
            }
            A_0.method_28().method_5().method_7(class3);
            A_1 = class2.method_3().method_13();
        }
    }
Ejemplo n.º 14
0
    public void method_15(Interface3 A_0, Interface18 A_1, Class196 A_2)
    {
        RectangleF ef;
        RectangleF ef2;

        this.bool_0 = A_0 is HeaderFooter;
        bool              flag       = false;
        bool              flag2      = true;
        Interface3        interface2 = A_0;
        List <Interface3> list       = new List <Interface3>();
        List <Class375>   list2      = new List <Class375>();

        this.class196_0 = A_2;
        this.class196_0.method_136(this.bool_0);
        this.class196_0.method_133(A_1);
        this.int_0 = 0;
        while (A_1.imethod_1(out ef, out ef2, ref this.int_0, ref flag, flag2))
        {
            if (ef2.Equals(RectangleF.Empty))
            {
                return;
            }
            this.rectangleF_1 = ef2;
            this.imethod_2(ef);
            Class615 class2 = Class615.smethod_0(interface2, this, ef2.Width);
            Class375 class3 = class2.vmethod_0(ef2);
            if (!flag)
            {
                list.Clear();
                list2.Clear();
                A_1.imethod_2(class3);
            }
            else
            {
                list.Insert(list.Count, interface2);
                list2.Insert(list2.Count, class3);
            }
            if (!class2.method_15() && (((class2.method_1() != LayoutState.NotFitted) || (class2.method_0() == null)) || (!(class2.method_0() is Class65) || !((class2.method_0() as Class65).imethod_4(0) is Section))))
            {
                if ((interface2 is Document) || ((interface2 is Class65) && ((interface2 as Class65).method_2() is Document)))
                {
                    this.method_16(A_2, class2.method_3().method_13(), A_1);
                    return;
                }
                break;
            }
            if ((class2.method_1() == LayoutState.NotFitted) && (class2.method_0() != null))
            {
                (this.delegate3_0.Target as Class195).method_36(true);
            }
            this.method_18(class2);
            Class65 class4 = class2.method_0() as Class65;
            bool    flag3  = flag;
            if (A_1.imethod_4(class4, class2.method_1(), class3, ref flag3))
            {
                if (flag3 && flag)
                {
                    int count = list2.Count;
                    for (int i = 0; i < count; i++)
                    {
                        A_1.imethod_2(list2[0]);
                        list.RemoveAt(0);
                        list2.RemoveAt(0);
                    }
                }
                else if (flag)
                {
                    A_1.imethod_3(class3);
                }
                interface2 = class4;
            }
            else
            {
                A_1.imethod_3(class3);
                if (list.Count > 0)
                {
                    interface2 = list[0];
                }
            }
        }
    }
Ejemplo n.º 15
0
 private void method_19(Class615 page)
 {
     page.PageNumber = this.list_1.Count + 1;
     this.list_1.Add((Class614)page);
 }
Ejemplo n.º 16
0
 private void method_18(Class615 A_0)
 {
     if (A_0.method_15())
     {
         Interface1 interface3 = A_0.method_0();
         Class65    class4     = null;
         while (interface3 != null)
         {
             if (!(interface3 is Class65))
             {
                 break;
             }
             class4     = interface3 as Class65;
             interface3 = class4.method_0();
         }
         if (((class4 != null) && (interface3 is DocumentObject)) && interface3.imethod_0().imethod_14())
         {
             List <Interface1> list = new List <Interface1>();
             int        num2        = class4.method_3();
             Interface1 item        = interface3;
             for (Interface1 interface5 = (item as DocumentObject).PreviousSibling as Interface1; interface5 != null; interface5 = (interface5 as DocumentObject).PreviousSibling as Interface1)
             {
                 if (!interface5.imethod_0().imethod_20())
                 {
                     break;
                 }
                 num2--;
                 item = interface5;
                 list.Add(item);
             }
             if (num2 < class4.method_3())
             {
                 class4.method_4(num2);
                 class4.method_1(item);
                 Class375 class6 = null;
                 Class375 class5 = A_0.method_5();
                 while (true)
                 {
                     if ((class5 == null) || (class5.method_74().Count <= 0))
                     {
                         break;
                     }
                     if (((class5.method_73() is Paragraph) && (class5.method_74().Count > 0)) && (class5.method_74().method_4(0).method_73() is Paragraph))
                     {
                         class6 = class5;
                         break;
                     }
                     class5 = class5.method_74().method_4(class5.method_74().Count - 1);
                 }
                 if (class6 != null)
                 {
                     for (int i = class6.method_74().Count - 1; i >= 0; i--)
                     {
                         if (list.Count <= 0)
                         {
                             break;
                         }
                         Class375 class2 = class6.method_74().method_4(i);
                         for (int j = class2.method_74().Count - 1; j >= 0; j--)
                         {
                             Class375   class3     = class2.method_74().method_4(j);
                             Interface1 interface2 = class3.method_73();
                             interface2 = (interface2 is Class7) ? ((interface2 as Class7).TextBox as Interface1) : interface2;
                             if (list.Contains(interface2))
                             {
                                 class2.method_72().method_45(class3);
                                 class2.method_72().method_42(class3);
                                 class2.method_74().method_11(class3);
                                 list.Remove(interface2);
                             }
                             if (list.Count <= 0)
                             {
                                 break;
                             }
                         }
                     }
                 }
             }
             list = null;
         }
     }
 }
Ejemplo n.º 17
0
 protected override void vmethod_5(Class615 A_0)
 {
     base.method_61(A_0);
     base.interface1_1 = A_0.method_0();
     base.bool_6       = true;
 }