https://bz.apache.org/bugzilla/show_bug.cgi?id=69396
Bug ID: 69396
Summary: Duplicated links are not imported properly via
XSLFSlide.importContent
Product: POI
Version: 5.2.3-FINAL
Hardware: PC
Status: NEW
Severity: major
Priority: P2
Component: HSLF
Assignee: [email protected]
Reporter: [email protected]
Target Milestone: ---
Created attachment 39908
--> https://bz.apache.org/bugzilla/attachment.cgi?id=39908&action=edit
This two files should be merged between each other
If there are several amount of the same links on one slide, the first link will
be missing in _rels
Based on the Apache POI implementation, duplicated links from initial slide
will be replaced with duplicates on the target slide, but the initial id will
be deleted during further iteration
The issue is connected with the method below
org.apache.poi.xslf.usermodel.XSLFHyperlink
private void linkToExternal(String url) {
PackagePart thisPP = _sheet.getPackagePart();
if (_link.isSetId() && !_link.getId().isEmpty()) {
thisPP.removeRelationship(_link.getId());
}
PackageRelationship rel = thisPP.addExternalRelationship(url,
XSLFRelation.HYPERLINK.getRelation());
_link.setId(rel.getId());
if (_link.isSetAction()) {
_link.unsetAction();
}
}
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]