Ejemplo n.º 1
0
    private void method_93(Class375 A_0)
    {
        RectangleF ef20;
        int        num   = 4;
        bool       flag  = false;
        bool       flag2 = false;
        int        count = A_0.method_74().Count;

        A_0.method_105(base.method_4());
        Class210 class2 = A_0.method_73().imethod_0() as Class210;

        if (((A_0.method_73() is Paragraph) && (class2 as Class213).method_105()) && ((A_0.method_73().imethod_0() as Class213).method_59() != float.MinValue))
        {
            A_0.method_27((class2 as Class213).method_59() + (A_0.method_73() as Paragraph).Format.FrameWidthEx);
        }
        else
        {
            A_0.method_27(base.class774_0.method_13().Right);
        }
        HorizontalAlignment alignment = (class2 != null) ? class2.method_15() : HorizontalAlignment.Left;
        double num4     = base.method_4().method_169(A_0);
        PointF location = A_0.method_69().Location;

        if ((count > 0) && (A_0.method_69().Location != A_0.method_74().method_4(0).method_69().Location))
        {
            using (List <Class375> .Enumerator enumerator = A_0.method_74().GetEnumerator())
            {
                Class375 current;
                while (enumerator.MoveNext())
                {
                    current = enumerator.Current;
                    if (((!(current.method_73() is Class7) || ((current.method_73() as Class7).TextBoxFormat.TextWrappingStyle == TextWrappingStyle.Inline)) && (!(current.method_73() is DocOleObject) || ((current.method_73() as DocOleObject).Interface49.get_OlePicture().TextWrappingStyle == TextWrappingStyle.Inline))) && (!(current.method_73() is DocPicture) || ((current.method_73() as DocPicture).TextWrappingStyle == TextWrappingStyle.Inline)))
                    {
                        goto Label_01AA;
                    }
                }
                goto Label_01CC;
Label_01AA:
                location = current.method_69().Location;
            }
        }
Label_01CC:
        ef20 = new RectangleF(location, new SizeF(A_0.method_69().Width + ((float)num4), A_0.method_69().Height));
        Class312 class4 = base.method_4().method_28().method_51(ef20, base.class375_0.method_73());

        if (((!class4.method_0().IsEmpty&& (class4.method_2().method_0() != TextWrappingStyle.Inline)) && ((class4.method_2().method_0() != TextWrappingStyle.Behind) && (class4.method_2().method_0() != TextWrappingStyle.InFrontOfText))) && (class4.method_0().X > A_0.method_69().X))
        {
            double num3  = num4;
            float  right = A_0.method_74().method_4(base.method_4().method_170(A_0.method_74(), A_0.method_74().method_0(), false)).method_69().Right;
            num4 = class4.method_0().X - A_0.method_69().Right;
            if (class4.method_0().X > right)
            {
                if (class2.method_85().Right >= class4.method_0().X)
                {
                    num4 = class4.method_0().X - right;
                }
                else
                {
                    num4 = num3;
                }
            }
        }
        Paragraph paragraph = this.method_96();

        if (((paragraph != null) && base.method_73(paragraph)) && (paragraph.Format.FrameWidth == 0))
        {
            num4 = 0.0;
        }
        if (num4 < 0.0)
        {
            num4 = 0.0;
        }
        CharacterSpacing compressPunctuation = CharacterSpacing.compressPunctuation;
        bool             flag3 = false;

        if (paragraph != null)
        {
            Section section = this.method_95(paragraph);
            if (section != null)
            {
                compressPunctuation = section.PageSetup.CharacterSpacingControl;
            }
            if ((((alignment == HorizontalAlignment.Justify) && (paragraph != null)) && ((A_0.method_64() != BookmarkStart.b("礩尫䈭夯䘱䀳匵尷", num)) && (A_0.method_64() != BookmarkStart.b("礩尫䈭夯䘱䀳匵尷甹娻爽⤿ⱁ⅃х㩇⽉ⵋ╍", num)))) && ((A_0.method_74().Count > 0) && !A_0.method_74().method_4(0).method_66()))
            {
                flag = true;
            }
            flag3 = !paragraph.Document.Settings.method_5().method_29();
            if (((alignment == HorizontalAlignment.Justify) && (A_0.method_64() == BookmarkStart.b("礩尫䈭夯䘱䀳匵尷甹娻爽⤿ⱁ⅃х㩇⽉ⵋ╍", num))) && !flag3)
            {
                flag2 = true;
            }
        }
        if (compressPunctuation != CharacterSpacing.doNotCompress)
        {
            this.method_94(A_0);
        }
        if (!this.method_97(paragraph) && ((!flag2 && !flag) || ((flag && paragraph.IsEndOfSection) && (!paragraph.IsEndOfDocument && flag3))))
        {
            switch (alignment)
            {
            case HorizontalAlignment.Center:
                A_0.method_106(base.method_4(), num4);
                break;

            case HorizontalAlignment.Right:
                A_0.method_107(base.method_4(), num4);
                break;

            case HorizontalAlignment.Justify:
            case HorizontalAlignment.Distributed:
            {
                int num6 = 0;
                A_0.method_109(base.method_4(), num4, ref num6);
                for (int i = num6; i < A_0.method_74().Count; i++)
                {
                    A_0.method_74().method_4(i).method_61(alignment);
                    A_0.method_74().method_4(i).method_70(new RectangleF(A_0.method_74().method_4(i).method_69().X, A_0.method_74().method_4(i).method_69().Y, A_0.method_74().method_4(i).method_69().Width, A_0.method_74().method_4(i).method_69().Height));
                    if (i < (A_0.method_74().Count - 1))
                    {
                        A_0.method_74().method_4(i + 1).method_70(new RectangleF(A_0.method_74().method_4(i + 1).method_69().Location.X, A_0.method_74().method_4(i + 1).method_69().Location.Y, A_0.method_74().method_4(i + 1).method_69().Width, A_0.method_74().method_4(i + 1).method_69().Height));
                    }
                }
                break;
            }
            }
        }
        if (((base.method_4().method_28().method_3().Count == 2) && base.method_4().method_28().method_1()) && (A_0.method_12() != float.MinValue))
        {
            base.method_4().method_28().method_2(false);
            float  num7  = Math.Max(base.method_4().method_28().method_3().method_4(0).method_69().Bottom, base.method_4().method_28().method_28().Margins.Top);
            float  num9  = A_0.method_12() - num7;
            double num10 = ((double)num9) % A_0.method_7().method_7();
            double num11 = 0.0;
            if (((int)num10) > 0)
            {
                if (((int)(((double)num9) / A_0.method_7().method_7())) == 0)
                {
                    num11 = A_0.method_7().method_7() - num9;
                    A_0.method_94(0.0, num11, true);
                }
                else if ((num10 >= A_0.method_7().method_0()) && (num10 <= A_0.method_7().method_7()))
                {
                    num11 = A_0.method_7().method_4();
                    A_0.method_94(0.0, num11, true);
                }
                else
                {
                    num11 = Math.Abs((double)(A_0.method_7().method_4() - num10));
                    A_0.method_94(0.0, num11, true);
                }
                base.class774_0.method_18((double)A_0.method_69().Bottom);
            }
        }
    }