dbunner2 opened a new pull request, #1187: URL: https://github.com/apache/poi/pull/1187
Creating a shape directly on an XSLFGroupShape produces a misleading "shape id * has been already used" warning for every shape already on the slide, even though those IDs are valid. This happens because the XSLFDrawing constructor always scans the entire slide and re-registers every shape ID, regardless of whether it's creating the top-level drawing for the slide or a drawing for a nested group. That extra scan isn't necessary for group drawings. By the time a group drawing is created (through createGroup() or getShapes()), the top-level drawing has already recursively scanned the entire slide, including all nested groups. Scanning again just re-registers the same IDs and causes the false warnings. This change limits the scan to the top-level drawing only. It also adds a regression test that captures the logged output and verifies no warnings are produced for the reported scenario. Reverting the fix causes the test to fail with the original warnings. I also ran the full org.apache.poi.xslf.* test suite (231 tests) with no regressions. Fixes #924. -- 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]
