Beispiel #1
0
        private void method_59(TextRange A_0, string A_1)
        {
            Paragraph ownerParagraph = A_0.OwnerParagraph;
            string    text           = A_0.Text;
            int       index          = text.IndexOf(A_1);
            int       num2           = ownerParagraph.Items.IndexOf(A_0);
            string    str2           = text.Substring(index + 1);

            if (str2 != string.Empty)
            {
                TextRange entity = A_0.Clone() as TextRange;
                entity.Text = str2;
                ownerParagraph.Items.Insert(num2 + 1, entity);
                A_0.Text = text.Substring(0, index);
            }
            else
            {
                A_0.Text = text.Substring(0, index);
            }
            this.method_60(ownerParagraph, num2 + 1);
            if (A_0.Text == string.Empty)
            {
                ownerParagraph.Items.Remove(A_0);
            }
        }
Beispiel #2
0
        private void method_58(TextRange A_0)
        {
            int       num            = 0;
            Paragraph ownerParagraph = A_0.OwnerParagraph;
            string    text           = A_0.Text;
            int       index          = text.IndexOf(BookmarkStart.b("⼥", 0));
            int       num3           = ownerParagraph.Items.IndexOf(A_0);
            string    str2           = text.Substring(index + 1);
            TextRange entity         = A_0.Clone() as TextRange;

            if (index > 0)
            {
                entity.Text = text.Substring(index);
                A_0.Text    = text.Substring(0, index);
            }
            else if (str2 != string.Empty)
            {
                entity.Text = str2;
                A_0.Text    = BookmarkStart.b("⼥", num);
            }
            ownerParagraph.Items.Insert(num3 + 1, entity);
        }
Beispiel #3
0
 private void method_36()
 {
     if (!this.bool_8)
     {
         string str = string.Empty;
         if (this.Text.Replace(Class816.string_4, Class816.string_27).Replace('\n', '\r').Contains(Class816.string_27))
         {
             ParagraphItemCollection items = (base.Owner is SDTInlineContent) ? (base.Owner as SDTInlineContent).Items : ((base.OwnerParagraph != null) ? base.OwnerParagraph.Items : null);
             if (items != null)
             {
                 TextRange entity = (this.textRange_0 != null) ? this.textRange_0 : this;
                 str = entity.Text.Replace(Class816.string_4, Class816.string_27).Replace('\n', '\r');
                 int       index  = str.IndexOf(Class816.string_27);
                 string    str2   = str.Substring(index + 1);
                 TextRange range2 = entity.Clone() as TextRange;
                 if ((this.textRange_0 != null) && (this.int_4 > 0))
                 {
                     this.int_4--;
                 }
                 if (index > 0)
                 {
                     range2.Text = str.Substring(index + 1);
                     entity.Text = str.Substring(0, index);
                 }
                 else if (str2 != string.Empty)
                 {
                     range2.Text = str2;
                     entity.Text = string.Empty;
                 }
                 if (str == Class816.string_27)
                 {
                     entity.Text = string.Empty;
                     range2.Text = string.Empty;
                 }
                 Paragraph paragraph2 = (base.Owner is SDTInlineContent) ? (base.Owner as SDTInlineContent).OwnerParagraph : base.OwnerParagraph;
                 Paragraph paragraph  = paragraph2.Clone() as Paragraph;
                 paragraph.method_57();
                 int num7 = paragraph2.method_5();
                 paragraph2.OwnerTextBody.Items.Insert(num7 + 1, paragraph);
                 (paragraph2.interface23_0 as Class213).method_38(false);
                 paragraph.Items.Add(range2);
                 int num2 = items.IndexOf(entity);
                 if (num2 > -1)
                 {
                     int num = (base.Document != null) ? base.Document.ClonedFields.Count : 0;
                     paragraph.method_67(items, num2 + 1);
                     int num5 = (base.Document != null) ? base.Document.ClonedFields.Count : 0;
                     int num4 = 0;
                     int num6 = num5 - num;
                     while (num4 < num6)
                     {
                         base.Document.ClonedFields.Pop();
                         num4++;
                     }
                     if (base.IsAddForIfField)
                     {
                         paragraph.IsAddForIfField = true;
                         base.m_doc.LayoutVariables.method_1().Add(paragraph);
                     }
                 }
             }
         }
     }
 }