Beispiel #1
0
        private void method_4(BodyRegion A_0)
        {
            ParagraphBase bookmarkStart = this.CurrentBookmark.BookmarkStart;

            if (bookmarkStart != null)
            {
                bool      flag           = false;
                int       num            = bookmarkStart.method_5();
                Paragraph ownerParagraph = bookmarkStart.OwnerParagraph;
                Paragraph paragraph2     = new Paragraph(ownerParagraph.Document);
                if (bookmarkStart.NextSibling == null)
                {
                    flag = true;
                }
                if ((A_0 is Paragraph) && (bookmarkStart.NextSibling == null))
                {
                    paragraph2 = A_0 as Paragraph;
                    flag       = false;
                }
                num++;
                TextBodyPart.smethod_0(ownerParagraph, num, paragraph2);
                int index = paragraph2.method_5();
                ownerParagraph.OwnerTextBody.Items.Insert(index, A_0);
                if (((flag && (paragraph2.Text == "")) && ((bookmarkStart.OwnerBase != null) && (bookmarkStart.OwnerBase.OwnerBase != null))) && (bookmarkStart.OwnerBase.OwnerBase is Body))
                {
                    int num3 = (bookmarkStart.OwnerBase.OwnerBase as Body).Paragraphs.IndexOf(paragraph2);
                    (bookmarkStart.OwnerBase.OwnerBase as Body).Paragraphs.RemoveAt(num3);
                }
            }
        }
Beispiel #2
0
 public void InsertTextBodyPart(TextBodyPart bodyPart)
 {
     if (this.CurrentBookmark.BookmarkStart != null)
     {
         bodyPart.PasteAfter(this.bookmark_0.BookmarkStart);
     }
 }
Beispiel #3
0
        public void ReplaceBookmarkContent(TextBodyPart bodyPart, bool isKeepSourceFirstParaFormat, bool saveFormatting)
        {
            bodyPart.bool_3 = isKeepSourceFirstParaFormat;
            this.method_0(saveFormatting, false);
            BodyRegion      owner  = this.bookmark_0.BookmarkStart.Owner as BodyRegion;
            int             num    = owner.method_5();
            int             num2   = this.bookmark_0.BookmarkStart.method_5();
            CharacterFormat format = this.method_1(this.bookmark_0.BookmarkStart);

            bodyPart.method_1(owner.OwnerTextBody, num, num2 + 1, format, saveFormatting);
            bodyPart.bool_3 = false;
        }
Beispiel #4
0
 public void ReplaceBookmarkContent(TextBodyPart bodyPart, bool isKeepSourceFirstParaFormat)
 {
     this.ReplaceBookmarkContent(bodyPart, isKeepSourceFirstParaFormat, false);
 }
Beispiel #5
0
 public void ReplaceBookmarkContent(TextBodyPart bodyPart)
 {
     this.ReplaceBookmarkContent(bodyPart, false);
 }