Пример #1
0
 public XWPFCommentsDecorator(XWPFParagraph paragraph, XWPFParagraphDecorator nextDecorator)
     : base(paragraph, nextDecorator)
 {
     this.commentText = new StringBuilder();
     foreach (CT_MarkupRange commentRangeStart in paragraph.GetCTP().GetCommentRangeStartList())
     {
         XWPFComment commentById;
         if ((commentById = paragraph.GetDocument().GetCommentByID(commentRangeStart.id)) != null)
         {
             this.commentText.Append("\tComment by " + commentById.GetAuthor() + ": " + commentById.GetText());
         }
     }
 }
Пример #2
0
        public XWPFCommentsDecorator(XWPFParagraph paragraph, XWPFParagraphDecorator nextDecorator)
            : base(paragraph, nextDecorator)
        {
            ;

            XWPFComment comment;
            commentText = new StringBuilder();

            foreach (CT_MarkupRange anchor in paragraph.GetCTP().GetCommentRangeStartList())
            {
                if ((comment = paragraph.Document.GetCommentByID(anchor.id)) != null)
                    commentText.Append("\tComment by " + comment.GetAuthor() + ": " + comment.GetText());
            }
        }
Пример #3
0
        public XWPFCommentsDecorator(XWPFParagraph paragraph, XWPFParagraphDecorator nextDecorator)
            : base(paragraph, nextDecorator)
        {
            ;

            XWPFComment comment;

            commentText = new StringBuilder();

            foreach (CT_MarkupRange anchor in paragraph.GetCTP().GetCommentRangeStartList())
            {
                if ((comment = paragraph.Document.GetCommentByID(anchor.id)) != null)
                {
                    commentText.Append("\tComment by " + comment.Author + ": " + comment.Text);
                }
            }
        }
 public XWPFHyperlinkDecorator(XWPFParagraph prgrph, XWPFParagraphDecorator nextDecorator, bool outputHyperlinkUrls)
     : base(prgrph, nextDecorator)
 {
     this.hyperlinkText = new StringBuilder();
     foreach (CT_Hyperlink1 hyperlink in this.paragraph.GetCTP().GetHyperlinkList())
     {
         foreach (CT_R ctR in hyperlink.GetRList())
         {
             foreach (CT_Text ctText in ctR.GetTList())
             {
                 this.hyperlinkText.Append(ctText.Value);
             }
         }
         if (outputHyperlinkUrls && this.paragraph.GetDocument().GetHyperlinkByID(hyperlink.id) != null)
         {
             this.hyperlinkText.Append(" <" + this.paragraph.GetDocument().GetHyperlinkByID(hyperlink.id).URL + ">");
         }
     }
 }
Пример #5
0
        /**
         * @param prgrph The paragraph of text to work on
         * @param outputHyperlinkUrls Should we output the links too, or just the link text?
         */
        public XWPFHyperlinkDecorator(XWPFParagraph prgrph, XWPFParagraphDecorator nextDecorator, bool outputHyperlinkUrls)
            : base(prgrph, nextDecorator)
        {
            hyperlinkText = new StringBuilder();

            // loop over hyperlink anchors
            foreach (CT_Hyperlink1 link in paragraph.GetCTP().GetHyperlinkList())
            {
                foreach (CT_R r in link.GetRList())
                {
                    // Loop over text Runs
                    foreach (CT_Text text in r.GetTList())
                    {
                        hyperlinkText.Append(text.Value);
                    }
                }
                if (outputHyperlinkUrls && paragraph.GetDocument().GetHyperlinkByID(link.id) != null)
                {
                    hyperlinkText.Append(" <" + paragraph.GetDocument().GetHyperlinkByID(link.id).URL + ">");
                }
            }
        }
Пример #6
0
        /**
         * @param prgrph The paragraph of text to work on
         * @param outputHyperlinkUrls Should we output the links too, or just the link text?
         */
        public XWPFHyperlinkDecorator(XWPFParagraph prgrph, XWPFParagraphDecorator nextDecorator, bool outputHyperlinkUrls)
            : base(prgrph, nextDecorator)
        {
            hyperlinkText = new StringBuilder();

            // loop over hyperlink anchors
            foreach (CT_Hyperlink1 link in paragraph.GetCTP().GetHyperlinkList())
            {
                foreach (CT_R r in link.GetRList())
                {
                    // Loop over text Runs
                    foreach (CT_Text text in r.GetTList())
                    {
                        hyperlinkText.Append(text.Value);
                    }
                }
                if (outputHyperlinkUrls && paragraph.Document.GetHyperlinkByID(link.id) != null)
                {
                    hyperlinkText.Append(" <" + paragraph.Document.GetHyperlinkByID(link.id).URL + ">");
                }
            }
        }
Пример #7
0
 /**
  * @param nextDecorator The next decorator to use
  * @param outputHyperlinkUrls Should we output the links too, or just the link text?
  */
 public XWPFHyperlinkDecorator(XWPFParagraphDecorator nextDecorator, bool outputHyperlinkUrls) :
     this(nextDecorator.paragraph, nextDecorator, outputHyperlinkUrls)
 {
 }
Пример #8
0
 /**
  * @param nextDecorator The next decorator to use
  * @param outputHyperlinkUrls Should we output the links too, or just the link text?
  */
 public XWPFHyperlinkDecorator(XWPFParagraphDecorator nextDecorator, bool outputHyperlinkUrls) :
     this(nextDecorator.paragraph, nextDecorator, outputHyperlinkUrls)
 {
 }
Пример #9
0
 public XWPFCommentsDecorator(XWPFParagraphDecorator nextDecorator):
     this(nextDecorator.paragraph, nextDecorator)
 {
 }
Пример #10
0
 public XWPFCommentsDecorator(XWPFParagraphDecorator nextDecorator) :
     this(nextDecorator.paragraph, nextDecorator)
 {
 }
Пример #11
0
 public XWPFParagraphDecorator(XWPFParagraph paragraph, XWPFParagraphDecorator nextDecorator)
 {
     this.paragraph     = paragraph;
     this.nextDecorator = nextDecorator;
 }
 public XWPFParagraphDecorator(XWPFParagraph paragraph, XWPFParagraphDecorator nextDecorator)
 {
     this.paragraph = paragraph;
     this.nextDecorator = nextDecorator;
 }