Examples of XWPFHyperlink


Examples of org.apache.poi.xwpf.usermodel.XWPFHyperlink

 
  public XWPFHyperlink getHyperlinkByID(String id) {
    Iterator<XWPFHyperlink> iter = hyperlinks.iterator();
    while(iter.hasNext())
    {
      XWPFHyperlink link = iter.next();
      if(link.getId().equals(id))
        return link;
    }
   
    return null;
  }
View Full Code Here

Examples of org.apache.poi.xwpf.usermodel.XWPFHyperlink

          }

          boolean addedHREF = false;
          if(run instanceof XWPFHyperlinkRun) {
             XWPFHyperlinkRun linkRun = (XWPFHyperlinkRun)run;
             XWPFHyperlink link = linkRun.getHyperlink(document);
             if(link != null && link.getURL() != null) {
                xhtml.startElement("a", "href", link.getURL());
                addedHREF = true;
             } else if(linkRun.getAnchor() != null && linkRun.getAnchor().length() > 0) {
                xhtml.startElement("a", "href", "#" + linkRun.getAnchor());
                addedHREF = true;
             }
View Full Code Here

Examples of org.apache.poi.xwpf.usermodel.XWPFHyperlink

       // Do the text
       for(XWPFRun run : paragraph.getRuns()) {
          List<String> tags = new ArrayList<String>();
          if(run instanceof XWPFHyperlinkRun) {
             XWPFHyperlinkRun linkRun = (XWPFHyperlinkRun)run;
             XWPFHyperlink link = linkRun.getHyperlink(document);
             if(link != null && link.getURL() != null) {
                xhtml.startElement("a", "href", link.getURL());
                tags.add("a");
             } else if(linkRun.getAnchor() != null && linkRun.getAnchor().length() > 0) {
                xhtml.startElement("a", "href", "#" + linkRun.getAnchor());
                tags.add("a");
             }
View Full Code Here

Examples of org.apache.poi.xwpf.usermodel.XWPFHyperlink

       }

       boolean addedHREF = false;
       if(run instanceof XWPFHyperlinkRun) {
          XWPFHyperlinkRun linkRun = (XWPFHyperlinkRun)run;
          XWPFHyperlink link = linkRun.getHyperlink(document);
          if(link != null && link.getURL() != null) {
             xhtml.startElement("a", "href", link.getURL());
             addedHREF = true;
          } else if(linkRun.getAnchor() != null && linkRun.getAnchor().length() > 0) {
             xhtml.startElement("a", "href", "#" + linkRun.getAnchor());
             addedHREF = true;
          }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.