use of org.openxmlformats.schemas.drawingml.x2006.main.CTHyperlink in project poi by apache.
the class XSLFTextRun method getHyperlink.
@Override
public XSLFHyperlink getHyperlink() {
CTTextCharacterProperties rPr = getRPr(false);
if (rPr == null) {
return null;
}
CTHyperlink hl = rPr.getHlinkClick();
if (hl == null) {
return null;
}
return new XSLFHyperlink(hl, _p.getParentShape().getSheet());
}
use of org.openxmlformats.schemas.drawingml.x2006.main.CTHyperlink in project tika by apache.
the class XSSFBExcelExtractorDecorator method extractHyperLinksFromShape.
private void extractHyperLinksFromShape(CTShape ctShape, XHTMLContentHandler xhtml) throws SAXException {
if (ctShape == null)
return;
CTShapeNonVisual nvSpPR = ctShape.getNvSpPr();
if (nvSpPR == null)
return;
CTNonVisualDrawingProps cNvPr = nvSpPR.getCNvPr();
if (cNvPr == null)
return;
CTHyperlink ctHyperlink = cNvPr.getHlinkClick();
if (ctHyperlink == null)
return;
String url = drawingHyperlinks.get(ctHyperlink.getId());
if (url != null) {
xhtml.startElement("a", "href", url);
xhtml.characters(url);
xhtml.endElement("a");
}
CTHyperlink ctHoverHyperlink = cNvPr.getHlinkHover();
if (ctHoverHyperlink == null)
return;
url = drawingHyperlinks.get(ctHoverHyperlink.getId());
if (url != null) {
xhtml.startElement("a", "href", url);
xhtml.characters(url);
xhtml.endElement("a");
}
}
use of org.openxmlformats.schemas.drawingml.x2006.main.CTHyperlink in project tika by apache.
the class XSSFExcelExtractorDecorator method extractHyperLinksFromShape.
private void extractHyperLinksFromShape(CTShape ctShape, XHTMLContentHandler xhtml) throws SAXException {
if (ctShape == null)
return;
CTShapeNonVisual nvSpPR = ctShape.getNvSpPr();
if (nvSpPR == null)
return;
CTNonVisualDrawingProps cNvPr = nvSpPR.getCNvPr();
if (cNvPr == null)
return;
CTHyperlink ctHyperlink = cNvPr.getHlinkClick();
if (ctHyperlink == null)
return;
String url = drawingHyperlinks.get(ctHyperlink.getId());
if (url != null) {
xhtml.startElement("a", "href", url);
xhtml.characters(url);
xhtml.endElement("a");
}
CTHyperlink ctHoverHyperlink = cNvPr.getHlinkHover();
if (ctHoverHyperlink == null)
return;
url = drawingHyperlinks.get(ctHoverHyperlink.getId());
if (url != null) {
xhtml.startElement("a", "href", url);
xhtml.characters(url);
xhtml.endElement("a");
}
}
Aggregations