Hi,
before apache poi 3.14-Beta1 i used to connect a picture with a hyperlink over the XSSFDrawing.addRelation() method.
Example:
XSSFDrawing drawing = row.getSheet().createDrawingPatriarch();
PackageRelationship rel = drawing.getPackagePart().addRelationship(
new URI(myWebsiteTarget), TargetMode.EXTERNAL, "http://schemas.openxmlformats.org/officeDocument/2006/relationships/hyperlink";);
*drawing.addRelation(rel.getId(), new POIXMLDocumentPart());*
CTPictureNonVisual nvPicPr = picture.getCTPicture().getNvPicPr();
CTHyperlink hLinkClick = nvPicPr.getCNvPr().addNewHlinkClick();
hLinkClick.setId(rel.getId());

however, since 3.14-Beta1, it is required to submit a POIXMLRelation zu the addRelation()-method.
How is it supposed to aquire this? Does anyone else overcome this change?
I couldn't find something related in the patchnotes either.

kind regards, Daniel

Reply via email to