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

   #919 
   
   **Description**
   Currently `XSLFTextShape.clearText()` removes all paragraphs, leaving the 
`txBody` empty.
   
   according to the OOXML specification, a text body must contain at least one 
paragraph. 
   This inconsistency causes PPT to report the file as corrupted when opening a 
PPTX file generated after calling `clearText()`.
   
   **Changes**
   Modified `clearText()` to ensure at least one empty paragraph is maintained 
using `addNewTextParagraph()`.
   
   **Why update existing tests?**
   Since a mandatory empty paragraph is now inserted at Index 0, subsequent 
content is appended at Index 1.
   I have updated the assertions in the exisiting tests to reflect this 
required structural change for XML compliance.
   
   **Additional Notes**
   I am resubmitting this Pull Request because my previous submission was 
incomplete. This PR provides the correct fix and includes all necessary test 
adjustments. I apologize for the previous confusion.


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