/** * @deprecated */ public static String getHyperlinkStyleId() { return getHyperlinkResolver().getHyperlinkStyleId(); }
/** * @param relId * @param url * @return * @throws JAXBException */ public Hyperlink generateHyperlink(String relId, String url) throws JAXBException { String hpl = "<w:hyperlink r:id=\"" + relId + "\" xmlns:w=\"http://schemas.openxmlformats.org/wordprocessingml/2006/main\" " + "xmlns:r=\"http://schemas.openxmlformats.org/officeDocument/2006/relationships\" >" + "<w:r>" + "<w:rPr>" + "<w:rStyle w:val=\"" + getHyperlinkStyleId() + "\" />" + "</w:rPr>" + "<w:t>" + url + "</w:t>" + "</w:r>" + "</w:hyperlink>"; return (Hyperlink)XmlUtils.unmarshalString(hpl); }
/** * Enable the hyperlinkStyle in the docx. * * @param wordMLPackage * @param hyperlinkStyleId */ public void activateHyperlinkStyle(WordprocessingMLPackage wordMLPackage) { if (hyperlinkStyleId !=null) { wordMLPackage.getMainDocumentPart().getPropertyResolver().activateStyle(getHyperlinkStyleId()); } }
addRunToDocFrag(sourcePart, docfrag, text, rPr); return; } else if (BindingHandler.getHyperlinkResolver().getHyperlinkStyleId() == null){ log.warn("No Hyperlink style set, not linking"); addRunToDocFrag(sourcePart, docfrag, text, rPr);
xHTMLImporter.setHyperlinkStyle(BindingHandler.getHyperlinkResolver().getHyperlinkStyleId());
/** * @deprecated */ public static String getHyperlinkStyleId() { return getHyperlinkResolver().getHyperlinkStyleId(); }
/** * @param relId * @param url * @return * @throws JAXBException */ public Hyperlink generateHyperlink(String relId, String url) throws JAXBException { String hpl = "<w:hyperlink r:id=\"" + relId + "\" xmlns:w=\"http://schemas.openxmlformats.org/wordprocessingml/2006/main\" " + "xmlns:r=\"http://schemas.openxmlformats.org/officeDocument/2006/relationships\" >" + "<w:r>" + "<w:rPr>" + "<w:rStyle w:val=\"" + getHyperlinkStyleId() + "\" />" + "</w:rPr>" + "<w:t>" + url + "</w:t>" + "</w:r>" + "</w:hyperlink>"; return (Hyperlink)XmlUtils.unmarshalString(hpl); }
/** * Enable the hyperlinkStyle in the docx. * * @param wordMLPackage * @param hyperlinkStyleId */ public void activateHyperlinkStyle(WordprocessingMLPackage wordMLPackage) { if (hyperlinkStyleId !=null) { wordMLPackage.getMainDocumentPart().getPropertyResolver().activateStyle(getHyperlinkStyleId()); } }
addRunToDocFrag(sourcePart, docfrag, text, rPr); return; } else if (BindingHandler.getHyperlinkResolver().getHyperlinkStyleId() == null){ log.warn("No Hyperlink style set, not linking"); addRunToDocFrag(sourcePart, docfrag, text, rPr);
xHTMLImporter.setHyperlinkStyle(BindingHandler.getHyperlinkResolver().getHyperlinkStyleId());