pjfanning opened a new pull request, #1615:
URL: https://github.com/apache/poi/pull/1615

   Follow-up to #1599, for the point noted in its review.
   
   `XSLFSheet.removePictureRelation` only released the relation of the main 
image of a removed picture. A picture with an SVG image (`setSvgImage`, or a 
copy made by `importContent` once #1599 is in) left the SVG relation and its 
part behind on the slide, so the SVG was still written to the file.
   
   The relations that the extensions of the blip refer to (`asvg:svgBlip`, 
`a14:imgLayer`) are now released as well when the picture is removed, but only 
if
   
   - nothing else in the sheet xml refers to the same relation id (pictures 
that share one SVG relation keep it until the last one is removed),
   - it is an image relation to an `XSLFPictureData`, and
   - the picture belongs to this sheet.
   
   This does not depend on #1599 and applies to trunk as it is.
   
   **Tests:** `TestXSLFPictureShape.testRemoveShapeWithSvgImage` and 
`testRemoveShapeWithSharedSvgImage` (three pictures sharing one SVG image, one 
of them in a group). Run locally together with the rest of 
`TestXSLFPictureShape`, `TestXSLFSlide` and `TestXMLSlideShow`; the full build 
is left to CI.
   
   🤖 Generated with [Claude Code](https://claude.com/claude-code)


-- 
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]

Reply via email to