/** * Return the index of the position you wish to treat as a hyperlink. * The characters from there to the first whitespace following will be treated as * the URL * * @param text * @return */ public int getIndexOfURL(String text) { /* For OpenAPI, treat a string starting with: * * #/components * * as a hyperlink to a bookmark. */ if (text.startsWith(COMPONENT_REF)) return 0; return super.getIndexOfURL(text); }
protected void processString(JaxbXmlPart sourcePart, DocumentFragment docfrag, String text, RPr rPr) throws Docx4JException { int pos = BindingHandler.getHyperlinkResolver().getIndexOfURL(text); if (pos==-1 ) { addRunToDocFrag(sourcePart, docfrag, text, rPr);
private void processString(JaxbXmlPart sourcePart, List<Object> contents, String text, SdtPr sdtPr, RPr rPr) throws JAXBException { int pos = BindingHandler.getHyperlinkResolver().getIndexOfURL(text); if (pos==-1 || BindingHandler.getHyperlinkStyleId() == null) { addRunToDocFrag(sourcePart, contents, text, rPr);
/** * Return the index of the position you wish to treat as a hyperlink. * The characters from there to the first whitespace following will be treated as * the URL * * @param text * @return */ public int getIndexOfURL(String text) { /* For OpenAPI, treat a string starting with: * * #/components * * as a hyperlink to a bookmark. */ if (text.startsWith(COMPONENT_REF)) return 0; return super.getIndexOfURL(text); }
protected void processString(JaxbXmlPart sourcePart, DocumentFragment docfrag, String text, RPr rPr) throws Docx4JException { int pos = BindingHandler.getHyperlinkResolver().getIndexOfURL(text); if (pos==-1 ) { addRunToDocFrag(sourcePart, docfrag, text, rPr);
private void processString(JaxbXmlPart sourcePart, List<Object> contents, String text, SdtPr sdtPr, RPr rPr) throws JAXBException { int pos = BindingHandler.getHyperlinkResolver().getIndexOfURL(text); if (pos==-1 || BindingHandler.getHyperlinkStyleId() == null) { addRunToDocFrag(sourcePart, contents, text, rPr);