Ejemplo n.º 1
0
        SizeF Interface2.Measure(Class196 dc)
        {
            int       num            = 5;
            SizeF     ef             = new SizeF(0.0045f, 0f);
            Paragraph ownerParagraph = base.OwnerParagraph;

            if ((ownerParagraph == null) && (base.Owner is SDTInlineContent))
            {
                ownerParagraph = (base.Owner as SDTInlineContent).OwnerParagraph;
            }
            if (ownerParagraph != null)
            {
                ef.Height = dc.method_1() ? dc.method_309(b("∪", num), dc.method_376(ownerParagraph.BreakCharacterFormat), null).Height : dc.method_316(b("∪", num), dc.method_365(ownerParagraph.BreakCharacterFormat), null).Height;
                if (ownerParagraph.ParaStyle != null)
                {
                    ef.Height = Math.Min(ef.Height, dc.method_1() ? dc.method_309(b("∪", num), dc.method_376(ownerParagraph.ParaStyle.CharacterFormat), null).Height : dc.method_316(b("∪", num), dc.method_365(ownerParagraph.ParaStyle.CharacterFormat), null).Height);
                }
            }
            int num2 = base.Document.DocLayoter.method_28().method_31() + 1;

            if (base.Document.DocLayoter.dictionary_1.ContainsKey(this.Name))
            {
                base.Document.DocLayoter.dictionary_1[this.Name] = num2;
                return(ef);
            }
            base.Document.DocLayoter.dictionary_1.Add(this.Name, num2);
            return(ef);
        }
Ejemplo n.º 2
0
        SizeF Interface2.Measure(Class196 dc)
        {
            SizeF  ef  = new SizeF();
            string str = char.ConvertFromUtf32(this.CharacterCode);

            Spire.Doc.Formatting.CharacterFormat characterFormat = this.CharacterFormat;
            if ((!this.CharacterFormat.HasValue(0) && (this.FontName != string.Empty)) && (this.FontName != this.CharacterFormat.FontName))
            {
                characterFormat = new Spire.Doc.Formatting.CharacterFormat(base.Document);
                characterFormat.ImportContainer(this.CharacterFormat);
                characterFormat.method_21(this.CharacterFormat);
                characterFormat.ApplyBase(base.method_28().BreakCharacterFormat.BaseFormat);
                characterFormat.FontSize = this.CharacterFormat.FontSize;
                characterFormat.FontName = this.FontName;
            }
            if (this.CharacterFormat.IsSmallCaps)
            {
                ef = dc.method_1() ? dc.method_310(str, dc.method_376(characterFormat), null, true) : dc.method_317(str, dc.method_365(characterFormat), null, true);
            }
            else
            {
                ef = dc.method_1() ? dc.method_309(str, dc.method_376(characterFormat), null) : dc.method_316(str, dc.method_365(characterFormat), null);
            }
            ef.Height       = this.CharacterFormat.FontSize;
            characterFormat = null;
            return(ef);
        }
Ejemplo n.º 3
0
        SizeF Interface2.Measure(Class196 dc)
        {
            int       num            = 0x11;
            SizeF     ef             = new SizeF();
            Paragraph ownerParagraph = base.OwnerParagraph;

            if ((ownerParagraph == null) && (base.Owner is SDTInlineContent))
            {
                ownerParagraph = (base.Owner as SDTInlineContent).OwnerParagraph;
            }
            if (ownerParagraph != null)
            {
                ef.Height = dc.method_1() ? dc.method_309(BookmarkStart.b("㸶", num), dc.method_376(ownerParagraph.BreakCharacterFormat), null).Height : dc.method_316(BookmarkStart.b("㸶", num), dc.method_365(ownerParagraph.BreakCharacterFormat), null).Height;
                if (ownerParagraph.ParaStyle != null)
                {
                    ef.Height = Math.Min(ef.Height, dc.method_1() ? dc.method_309(BookmarkStart.b("㸶", num), dc.method_376(ownerParagraph.ParaStyle.CharacterFormat), null).Height : dc.method_316(BookmarkStart.b("㸶", num), dc.method_365(ownerParagraph.ParaStyle.CharacterFormat), null).Height);
                }
            }
            return(ef);
        }
        SizeF Interface2.Measure(Class196 dc)
        {
            string dropDownValue = string.Empty;

            if (this.dropDownCollection_0.Count > 0)
            {
                dropDownValue = this.DropDownValue;
            }
            if (!dc.method_1())
            {
                return(dc.method_316(dropDownValue, this.CharacterFormat.Font, null));
            }
            return(dc.method_309(dropDownValue, dc.method_376(this.CharacterFormat), null));
        }
Ejemplo n.º 5
0
    public static Interface19[] smethod_0(Class196 A_0, double A_1, Interface21 A_2, string A_3, float A_4, float A_5, bool A_6)
    {
        StringFormat format;
        int          num = 3;

        format = new StringFormat(StringFormat.GenericTypographic)
        {
            FormatFlags = format.FormatFlags | StringFormatFlags.MeasureTrailingSpaces,
            FormatFlags = format.FormatFlags | StringFormatFlags.NoClip,
            Trimming    = StringTrimming.Word
        };
        string str2 = (A_3 != null) ? A_3 : A_2.imethod_5();

        if ((A_2 is Field) ? (A_2 as Field).CharacterFormat.AllCaps : (A_2 as TextRange).CharacterFormat.AllCaps)
        {
            str2 = str2.ToUpper();
        }
        if ((A_2 is Field) ? (A_2 as Field).CharacterFormat.AllCaps : (A_2 as TextRange).CharacterFormat.AllCaps)
        {
            str2 = str2.ToUpper();
        }
        Font font = null;
        sprᝪ rᝪ   = null;

        if (A_0.method_1())
        {
            rᝪ = (A_2 is Field) ? A_0.method_376((A_2 as Field).CharacterFormat) : A_0.method_378(A_2 as TextRange);
        }
        else
        {
            font = (A_2 is Field) ? A_0.method_365((A_2 as Field).CharacterFormat) : A_0.method_367(A_2 as TextRange);
        }
        Class544 class3 = new Class544();

        class3.method_1(A_0);
        class3.method_2(A_0.method_405(A_2 as TextRange));
        class3.method_3(A_2);
        Class545 class2 = class3.method_5(str2, A_0.method_151(), font, rᝪ, format, new SizeF((float)A_1, float.MaxValue));

        if (class2.struct11_0.Length > 0)
        {
            Interface19[] interfaceArray2 = new Interface19[2];
            interfaceArray2[0] = new Class542(A_2, class2.struct11_0[0].string_0);
            string str = string.Empty;
            if ((class2.string_0 == null) && (class2.struct11_0.Length > 1))
            {
                for (int i = 1; i < class2.method_1(); i++)
                {
                    if (class2.struct11_0[i].string_0 == BookmarkStart.b("न", num))
                    {
                        str = str + BookmarkStart.b("⌨", num);
                    }
                    else
                    {
                        str = str + BookmarkStart.b("⌨", num) + class2.struct11_0[i].string_0;
                    }
                }
            }
            else
            {
                str = class2.string_0;
            }
            if ((str == BookmarkStart.b("⌨", num)) || (str == BookmarkStart.b("␨", num)))
            {
                str = BookmarkStart.b("न", num);
            }
            if ((str != null) && (str.StartsWith(BookmarkStart.b("⌨", num)) || str.StartsWith(BookmarkStart.b("␨", num))))
            {
                str = str.Remove(0, 1).TrimStart(new char[0]);
            }
            interfaceArray2[1] = new Class542(A_2, str);
            return(interfaceArray2);
        }
        if (((A_2 == null) || (A_2.imethod_5() == null)) || !(A_2.imethod_5() != string.Empty))
        {
            return(null);
        }
        (A_2 as TextRange).TextToSplit = class2.string_0;
        if (A_0.method_323(A_2 as TextRange, (A_2 as TextRange).TextToSplit).Width > A_1)
        {
            return(smethod_1(A_0, A_1, A_2, null, A_4, A_5, A_6));
        }
        return(new Interface19[] { new Class542(A_2, string.Empty), new Class542(A_2, class2.string_0) });
    }