use of org.apache.poi.hslf.record.InteractiveInfoAtom in project poi by apache.
the class HSLFHyperlink method linkToEmail.
@Override
public void linkToEmail(String emailAddress) {
InteractiveInfoAtom iia = info.getInteractiveInfoAtom();
iia.setAction(InteractiveInfoAtom.ACTION_HYPERLINK);
iia.setJump(InteractiveInfoAtom.JUMP_NONE);
iia.setHyperlinkType(InteractiveInfoAtom.LINK_Url);
exHyper.setLinkURL("mailto:" + emailAddress);
exHyper.setLinkTitle(emailAddress);
exHyper.setLinkOptions(0x10);
}
use of org.apache.poi.hslf.record.InteractiveInfoAtom in project poi by apache.
the class HSLFHyperlink method linkToNextSlide.
@Override
public void linkToNextSlide() {
InteractiveInfoAtom iia = info.getInteractiveInfoAtom();
iia.setAction(InteractiveInfoAtom.ACTION_JUMP);
iia.setJump(InteractiveInfoAtom.JUMP_NEXTSLIDE);
iia.setHyperlinkType(InteractiveInfoAtom.LINK_NextSlide);
linkToDocument(1, -1, "NEXT", 0x10);
}
use of org.apache.poi.hslf.record.InteractiveInfoAtom in project poi by apache.
the class HSLFHyperlink method find.
private static void find(List<? extends Record> records, ExObjList exobj, List<HSLFHyperlink> out) {
ListIterator<? extends Record> iter = records.listIterator();
while (iter.hasNext()) {
Record r = iter.next();
// see if we have InteractiveInfo in the textrun's records
if (!(r instanceof InteractiveInfo)) {
continue;
}
InteractiveInfo hldr = (InteractiveInfo) r;
InteractiveInfoAtom info = hldr.getInteractiveInfoAtom();
if (info == null) {
continue;
}
int id = info.getHyperlinkID();
ExHyperlink exHyper = exobj.get(id);
if (exHyper == null) {
continue;
}
HSLFHyperlink link = new HSLFHyperlink(exHyper, hldr);
out.add(link);
if (iter.hasNext()) {
r = iter.next();
if (!(r instanceof TxInteractiveInfoAtom)) {
iter.previous();
continue;
}
link.setTextRunInfo((TxInteractiveInfoAtom) r);
}
}
}
use of org.apache.poi.hslf.record.InteractiveInfoAtom in project poi by apache.
the class HSLFHyperlink method linkToUrl.
@Override
public void linkToUrl(String url) {
InteractiveInfoAtom iia = info.getInteractiveInfoAtom();
iia.setAction(InteractiveInfoAtom.ACTION_HYPERLINK);
iia.setJump(InteractiveInfoAtom.JUMP_NONE);
iia.setHyperlinkType(InteractiveInfoAtom.LINK_Url);
exHyper.setLinkURL(url);
exHyper.setLinkTitle(url);
exHyper.setLinkOptions(0x10);
}
use of org.apache.poi.hslf.record.InteractiveInfoAtom in project poi by apache.
the class HSLFHyperlink method linkToSlide.
@Override
public void linkToSlide(Slide<HSLFShape, HSLFTextParagraph> slide) {
assert (slide instanceof HSLFSlide);
HSLFSlide sl = (HSLFSlide) slide;
int slideNum = slide.getSlideNumber();
String alias = "Slide " + slideNum;
InteractiveInfoAtom iia = info.getInteractiveInfoAtom();
iia.setAction(InteractiveInfoAtom.ACTION_HYPERLINK);
iia.setJump(InteractiveInfoAtom.JUMP_NONE);
iia.setHyperlinkType(InteractiveInfoAtom.LINK_SlideNumber);
linkToDocument(sl._getSheetNumber(), slideNum, alias, 0x30);
}
Aggregations