TruTruMaster opened a new pull request, #1601: URL: https://github.com/apache/poi/pull/1601
`importContent` copies the XML of the source shapes, so the `hlinkClick` of a shape or picture kept the relation id of the source slide. In the copy it pointed to whatever relation of the target slide had that id. With a new target deck: | source shape link | after `importContent` (trunk) | |---|---| | URL `https://poi.apache.org/` | URL `/ppt/media/image1.png` (the picture of the slide) | | link to another slide | the URL of another shape | | e-mail link on a picture | `null` | Text run links were already imported by `XSLFTextRun.copy` via `XSLFHyperlink.copy`. Now `XSLFSimpleShape.copy` does the same for the shape's own link, which covers auto shapes, pictures and connectors. `XSLFHyperlink.copy` also clears the copied id first. The `linkTo...` methods remove the relation named by the current id before adding the new one, and after a copy that id belongs to the source sheet, so on the target sheet it could name an unrelated relation, such as a picture. **Test:** `TestXSLFHyperlink.testImportContentKeepsShapeHyperlinks` copies a URL link, a link to a slide, a "next slide" jump and an e-mail link on a picture into another deck, and checks that the picture data survives. It fails on trunk (`expected: <https://poi.apache.org/> but was: </ppt/media/image1.png>`). All 279 `org.apache.poi.xslf` tests pass. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
