示例#1
0
        internal TextRange method_30()
        {
            TextRange range = new TextRange(base.Document);
            string    str   = char.ConvertFromUtf32(this.CharacterCode);

            Spire.Doc.Formatting.CharacterFormat characterFormat = range.CharacterFormat;
            characterFormat.ImportContainer(this.CharacterFormat);
            characterFormat.method_21(this.CharacterFormat);
            if ((!this.CharacterFormat.HasValue(0) && !string.IsNullOrEmpty(this.FontName)) && (this.FontName != this.CharacterFormat.FontName))
            {
                characterFormat.ApplyBase(base.method_28().BreakCharacterFormat.BaseFormat);
                characterFormat.FontSize = this.CharacterFormat.FontSize;
            }
            range.Text = str;
            range.method_0(base.Owner);
            return(range);
        }
示例#2
0
        private void method_43(ParagraphItemCollection A_0, string A_1, int A_2)
        {
            int num = 15;

            if (this.dictionary_0 == null)
            {
                this.dictionary_0 = new Dictionary <string, TextRange>();
            }
            string    key   = A_1 + BookmarkStart.b("樴", num) + A_2;
            TextRange range = null;

            if (this.dictionary_0.ContainsKey(key))
            {
                range = this.dictionary_0[key];
            }
            else
            {
                range = new TextRange(base.Document);
                range.CharacterFormat.ApplyBase(this.CharacterFormat);
                range.method_0(base.Owner);
                range.characterCategory_0 = this.CharacterCategory;
                range.StartPos            = A_2;
                range.int_4       = A_1.Length;
                range.string_9    = A_1;
                range.string_8    = A_1;
                range.textRange_0 = this;
                if (!string.IsNullOrEmpty(A_1))
                {
                    range.bool_12 = Class57.smethod_11(A_1[0]);
                    range.bool_13 = Class57.smethod_11(A_1[A_1.Length - 1]);
                    range.bool_14 = Class57.smethod_12(A_1[0]);
                    range.bool_15 = Class57.smethod_12(A_1[A_1.Length - 1]);
                    range.bool_10 = Class57.smethod_6(A_1[0]) == Spire.Doc.CharacterCategory.FarEast;
                    range.bool_11 = Class57.smethod_6(A_1[A_1.Length - 1]) == Spire.Doc.CharacterCategory.FarEast;
                }
                this.dictionary_0.Add(key, range);
            }
            A_0.InnerList.Add(range);
        }