processContent(((P.Hyperlink)((JAXBElement)item).getValue()).getContent());
setAnchor(pHyperlink.getAnchor()); setDocLocation(pHyperlink.getDocLocation()); setRId(pHyperlink.getId()); setTgtFrame(pHyperlink.getTgtFrame()); setTooltip(pHyperlink.getTooltip()); if (conversionContext.getCurrentPart() == null) { log.warn("set currentPart (via conversionContext)");
private JAXBElement<Hyperlink> generateTocEntryHyperlink(){ // Create object for hyperlink (wrapped in JAXBElement) Hyperlink phyperlink2 = wmlObjectFactory.createPHyperlink(); JAXBElement<Hyperlink> phyperlinkWrapped2 = wmlObjectFactory.createPHyperlink(phyperlink2); phyperlink2.setAnchor(anchorValue); phyperlink2.getContent().addAll(generateTocEntryContent()); return phyperlinkWrapped2; }
processContent(((P.Hyperlink)((JAXBElement)item).getValue()).getContent());
R r = (R)hyperlink.getContent().get(0); r.setRPr(rPr);
setAnchor(pHyperlink.getAnchor()); setDocLocation(pHyperlink.getDocLocation()); setRId(pHyperlink.getId()); setTgtFrame(pHyperlink.getTgtFrame()); setTooltip(pHyperlink.getTooltip()); if (conversionContext.getCurrentPart() == null) { log.warn("set currentPart (via conversionContext)");
@Override public List<Object> apply(Object o) { if (o instanceof P.Hyperlink) { P.Hyperlink hyperlink = (P.Hyperlink) o; try { Relationships contents = mainDocumentPart.getRelationshipsPart().getContents(); List<Relationship> relationships = contents.getRelationship(); for (Relationship relationship : relationships) { if (relationship.getId().equals(hyperlink.getId())) { relationship.setTarget(docxFormatter.handleStringWithAliases(URLDecoder.decode(relationship.getTarget(), "UTF-8"))); } } } catch (Exception e) { throw new RuntimeException("An error occurred while processing URL with aliases",e); } } return null; } }
@Override public List<Object> apply(Object o) { if (o instanceof P.Hyperlink) { P.Hyperlink hyperlink = (P.Hyperlink) o; try { Relationships contents = mainDocumentPart.getRelationshipsPart().getContents(); List<Relationship> relationships = contents.getRelationship(); for (Relationship relationship : relationships) { if (relationship.getId().equals(hyperlink.getId())) { relationship.setTarget(docxFormatter.handleStringWithAliases(URLDecoder.decode(relationship.getTarget(), "UTF-8"))); } } } catch (Exception e) { throw new RuntimeException("An error occurred while processing URL with aliases",e); } } return null; } }
@Deprecated public List<Object> getParagraphContent() { return getContent(); }
/** * Create an instance of {@link P.Hyperlink } * */ public P.Hyperlink createPHyperlink() { return new P.Hyperlink(); }
private JAXBElement<Hyperlink> generateTocEntryHyperlink(){ // Create object for hyperlink (wrapped in JAXBElement) Hyperlink phyperlink2 = wmlObjectFactory.createPHyperlink(); JAXBElement<Hyperlink> phyperlinkWrapped2 = wmlObjectFactory.createPHyperlink(phyperlink2); phyperlink2.setAnchor(anchorValue); phyperlink2.getContent().addAll(generateTocEntryContent()); return phyperlinkWrapped2; }
hyperlink.setAnchor(anchor); linkUrlText = String.format("#%s", anchor); } else { Relationship rel = docx.getHyperlinkRelationship(linkUrl); hyperlink.setId(rel.getId()); hyperlink.setTooltip(linkTooltipText); hyperlink.getContent().add(r); hyperlink.getContent().add(r2); hyperlink.getContent().add(r3); hyperlink.getContent().add(r3);
@Override public R getLastR() { final List<Object> content = myHyperlink.getContent(); if (content == null || content.size() == 0) return null; final Object o = content.get(content.size() - 1); return o instanceof R ? (R) o : null; } }
@Override public void addR(final R r) { myHyperlink.getContent().add(r); }
@Deprecated public List<Object> getParagraphContent() { return getContent(); }
/** * Create an instance of {@link P.Hyperlink } * */ public P.Hyperlink createPHyperlink() { return new P.Hyperlink(); }