You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@poi.apache.org by bu...@apache.org on 2024/10/15 11:48:08 UTC

[Bug 69396] New: Duplicated links are not imported properly via XSLFSlide.importContent

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: dev@poi.apache.org
          Reporter: tatiana.gerasimovich@gmail.com
  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: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org


[Bug 69396] Duplicated links are not imported properly via XSLFSlide.importContent

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=69396

--- Comment #1 from tatiana.gerasimovich@gmail.com ---
Created attachment 39909
  --> https://bz.apache.org/bugzilla/attachment.cgi?id=39909&action=edit
The result of import

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org


[Bug 69396] Duplicated links are not imported properly via XSLFSlide.importContent

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=69396

Dominik Stadler <do...@gmx.at> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 OS|                            |All

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org