@Override public String getAddress() { return exHyper.getLinkURL(); }
/** * Gets the type of the hyperlink action. * Must be a <code>LINK_*</code> constant</code> * * @return the hyperlink URL * @see InteractiveInfoAtom */ @Override public HyperlinkType getType() { switch (info.getInteractiveInfoAtom().getHyperlinkType()) { case InteractiveInfoAtom.LINK_Url: return (exHyper.getLinkURL().startsWith("mailto:")) ? HyperlinkType.EMAIL : HyperlinkType.URL; case InteractiveInfoAtom.LINK_NextSlide: case InteractiveInfoAtom.LINK_PreviousSlide: case InteractiveInfoAtom.LINK_FirstSlide: case InteractiveInfoAtom.LINK_LastSlide: case InteractiveInfoAtom.LINK_SlideNumber: return HyperlinkType.DOCUMENT; case InteractiveInfoAtom.LINK_CustomShow: case InteractiveInfoAtom.LINK_OtherPresentation: case InteractiveInfoAtom.LINK_OtherFile: return HyperlinkType.FILE; default: case InteractiveInfoAtom.LINK_NULL: return HyperlinkType.NONE; } }
private static void find(Record[] records, ExObjList exobj, List out){ for (int i = 0; i < records.length; i++) { //see if we have InteractiveInfo in the textrun's records if( records[i] instanceof InteractiveInfo){ InteractiveInfo hldr = (InteractiveInfo)records[i]; InteractiveInfoAtom info = hldr.getInteractiveInfoAtom(); int id = info.getHyperlinkID(); ExHyperlink linkRecord = exobj.get(id); if (linkRecord != null){ Hyperlink link = new Hyperlink(); link.title = linkRecord.getLinkTitle(); link.address = linkRecord.getLinkURL(); link.type = info.getAction(); if (++i < records.length && records[i] instanceof TxInteractiveInfoAtom){ TxInteractiveInfoAtom txinfo = (TxInteractiveInfoAtom)records[i]; link.startIndex = txinfo.getStartIndex(); link.endIndex = txinfo.getEndIndex(); } out.add(link); } } } } }