naruto-lgtm opened a new pull request, #1524:
URL: https://github.com/apache/poi/pull/1524

   HSLFSlideShow.removeSlide only takes the slide out of the slide list and its 
notes out of the notes list, while the Slide and Notes containers stay in 
HSLFSlideShowImpl's record list and persist directory, and write() serializes 
every root record. A deck saved after removeSlide still carries the removed 
slide's shapes, text, comments and speaker notes: PowerPoint and the usermodel 
no longer show the slide, but QuickButCruddyTextExtractor or any byte-level 
reader recovers it (CWE-212). Removing the first slide of 42474-1.ppt and 
saving keeps its "Notes-1" notes, and 9 decks in test-data still contain the 
removed slide's text or notes after removeSlide(0) and write().
   
   removeSlide now hands the persist ids of the slide and its notes to a 
package-private HSLFSlideShowImpl.removePersistObjects, next to 
appendRootLevelRecord since that class owns the record list and the persist 
directories. It drops the ids from every directory and the records they pointed 
to, older versions from incremental saves included, matching by offset as 
normalizeRecords does; XMLSlideShow.removeSlide already drops a removed slide's 
notes, charts and pictures. Pictures and embedded OLE data sit in 
document-level stores shared between slides and are left alone here, and the 
one sample that still shows slide text afterwards keeps it in older Document 
records, edit history that normalizeRecords() already removes. The remaining 
slides and notes read back identically on the 57 multi-slide test-data decks 
that round-trip on trunk, encrypted decks round-trip, the scratchpad suite 
passes, and TestAddingSlides.removedSlideIsNotWrittenOut fails before the 
change.
   


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