Bug 65711 - XSLFSheet.importBlip overrides relation IDs
Summary: XSLFSheet.importBlip overrides relation IDs
Status: RESOLVED FIXED
Alias: None
Product: POI
Classification: Unclassified
Component: XSLF (show other bugs)
Version: 5.0.x-dev
Hardware: PC All
: P2 normal (vote)
Target Milestone: ---
Assignee: POI Developers List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-11-29 11:38 UTC by Max
Modified: 2021-12-22 15:38 UTC (History)
1 user (show)



Attachments
Fix overriding relation IDs in the "importBlip" method of the "XSLFSheet" class (940 bytes, patch)
2021-11-29 11:38 UTC, Max
Details | Diff
Fix overriding relation IDs in the "importBlip" method of the "XSLFSheet" class (2.85 KB, patch)
2021-11-29 13:34 UTC, Max
Details | Diff
Fix overriding relation IDs in the "importBlip" method of the "XSLFSheet" class (2.81 KB, patch)
2021-11-29 13:40 UTC, Max
Details | Diff
Fix overriding relation IDs in the "importBlip" method of the "XSLFSheet" class (60.59 KB, patch)
2021-11-29 14:39 UTC, Max
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Max 2021-11-29 11:38:19 UTC
Created attachment 38106 [details]
Fix overriding relation IDs in the "importBlip" method of the "XSLFSheet" class

The "importBlip" method of the "XSLFSheet" class creates relations with the same IDs as the original blips causing possible collisions.
Comment 1 PJ Fanning 2021-11-29 11:40:34 UTC
thanks - but can you provide a unit test?
Comment 2 Max 2021-11-29 13:34:00 UTC
Created attachment 38107 [details]
Fix overriding relation IDs in the "importBlip" method of the "XSLFSheet" class

Hi. Sure, updated the patch.
Comment 3 Max 2021-11-29 13:40:16 UTC
Created attachment 38108 [details]
Fix overriding relation IDs in the "importBlip" method of the "XSLFSheet" class
Comment 4 PJ Fanning 2021-11-29 13:45:01 UTC
Comment on attachment 38107 [details]
Fix overriding relation IDs in the "importBlip" method of the "XSLFSheet" class

importBlip is not a public method? Do you have a test case that reproduces your issue that only uses public methods? It's possible that you are not using the APIs like they were intended to be used.
Comment 5 Max 2021-11-29 14:39:10 UTC
Created attachment 38109 [details]
Fix overriding relation IDs in the "importBlip" method of the "XSLFSheet" class

Updated the patch with a test with a real presentation.
Comment 6 PJ Fanning 2021-11-29 15:18:22 UTC
Comment on attachment 38109 [details]
Fix overriding relation IDs in the "importBlip" method of the "XSLFSheet" class

this change seems to make this test fail -

TestXSLFBugs > bug62587() FAILED
    org.opentest4j.AssertionFailedError at TestXSLFBugs.java:291

there could be more issues
Comment 7 PJ Fanning 2021-11-29 15:36:17 UTC
Comment on attachment 38108 [details]
Fix overriding relation IDs in the "importBlip" method of the "XSLFSheet" class

made a preliminary commit - r1895405 - will follow up and add extra tests if this doesn't cause more problems
Comment 8 PJ Fanning 2021-11-29 16:09:41 UTC
added test using r1895407
Comment 9 PJ Fanning 2021-11-29 16:09:48 UTC
added test using r1895407