Bug 64815 - The comment information does not take effect after modification
Summary: The comment information does not take effect after modification
Status: NEW
Alias: None
Product: POI
Classification: Unclassified
Component: XSLF (show other bugs)
Version: 4.1.2-FINAL
Hardware: PC
: P2 normal (vote)
Target Milestone: ---
Assignee: POI Developers List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-10-15 05:56 UTC by yangguang53888
Modified: 2020-10-15 05:56 UTC (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description yangguang53888 2020-10-15 05:56:52 UTC
The pptx format file cannot take effect when the comments are modified.

The following is sample code:

public static void main(String[] args) throws Exception {

    String filePath = "D:\\test.pptx";
    XMLSlideShow slideShow = new XMLSlideShow(new FileInputStream(filePath));
    List<XSLFSlide> slides = slideShow.getSlides();
    slides.forEach(slide -> {
        slide.getComments().forEach(e -> {
            System.out.println(e.getText());
            e.setText("Test modification");
        });
    });
    FileOutputStream out = new FileOutputStream(filePath);
    slideShow.write(out);
    slideShow.close();
}