naruto-lgtm commented on PR #1579: URL: https://github.com/apache/poi/pull/1579#issuecomment-7059270719
You were right about the root cause, that's what made the rest of it awkward. `generateRelationIfNeeded` now keeps the relationship it creates, so a link that already has one doesn't get a fresh one on every `write()`, and `setAddress` can treat loaded and new links the same. With that in place the invalidation moved out of serialisation: `setAddress` adds the relationship for the new address on the sheet the link belongs to and removes the old one there and then, under a new id so anything already copied from the sheet keeps resolving, and `XSSFSheet.removeHyperlink` does the same for a removed link. Both go through `removeReferenceRelationship` so the reference relationships stay in sync, and both only touch the relationship the hyperlink itself held, which is still kept if another hyperlink in the workbook refers to it. The sweep by relationship type and the call in `write()` are gone. Replies on the individual points inline. `:poi-ooxml:test` passes for the xssf and ooxml packages apart from three column width assertions that also fail on this machine without the change (font metrics). -- 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]
