コード例 #1
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);
                }
            }
        }
コード例 #2
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 + ">");
                }
            }
        }
コード例 #3
0
 public XWPFParagraphDecorator(XWPFParagraph paragraph, XWPFParagraphDecorator nextDecorator)
 {
     this.paragraph     = paragraph;
     this.nextDecorator = nextDecorator;
 }
コード例 #4
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)
        {
        }
コード例 #5
0
 public XWPFCommentsDecorator(XWPFParagraphDecorator nextDecorator) :
     this(nextDecorator.paragraph, nextDecorator)
 {
 }