Class XMLSlideShow

    • Constructor Detail

      • XMLSlideShow

        public XMLSlideShow()
      • XMLSlideShow

        public XMLSlideShow​(OPCPackage pkg)
      • XMLSlideShow

        public XMLSlideShow​(java.io.InputStream is)
                     throws java.io.IOException
        Throws:
        java.io.IOException
    • Method Detail

      • onDocumentRead

        protected void onDocumentRead()
                               throws java.io.IOException
        Description copied from class: POIXMLDocumentPart
        Fired when a package part is read
        Overrides:
        onDocumentRead in class POIXMLDocumentPart
        Throws:
        java.io.IOException - a subclass may throw an IOException when a document is read
      • commit

        protected void commit()
                       throws java.io.IOException
        Description copied from class: POIXMLDocumentPart
        Save the content in the underlying package part. Default implementation is empty meaning that the package part is left unmodified.

        Sub-classes should override and add logic to marshal the "model" into Ooxml4J.

        For example, the code saving a generic XML entry may look as follows:

         protected void commit() throws IOException {
           PackagePart part = getPackagePart();
           OutputStream out = part.getOutputStream();
           XmlObject bean = getXmlBean(); //the "model" which holds changes in memory
           bean.save(out, DEFAULT_XML_OPTIONS);
           out.close();
         }
         
        Overrides:
        commit in class POIXMLDocumentPart
        Throws:
        java.io.IOException - a subclass may throw an IOException if the changes can't be committed
      • createSlide

        public XSLFSlide createSlide​(XSLFSlideLayout layout)
        Create a slide and initialize it from the specified layout.
        Parameters:
        layout - The layout to use for the new slide.
        Returns:
        created slide
      • createChart

        public XSLFChart createChart​(XSLFSlide slide)
        Create a blank chart on the given slide.
      • getNotesSlide

        public XSLFNotes getNotesSlide​(XSLFSlide slide)
        Return notes slide for the specified slide or create new if it does not exist yet.
      • createNotesMaster

        public void createNotesMaster()
        Create a notes master.
      • getNotesMaster

        public XSLFNotesMaster getNotesMaster()
        Return the Notes Master, if there is one. (May not be present if no notes exist)
      • getCharts

        public java.util.List<XSLFChart> getCharts()
        Return all the charts in the slideshow
      • getCommentAuthors

        public XSLFCommentAuthors getCommentAuthors()
        Returns the list of comment authors, if there is one. Will only be present if at least one slide has comments on it.
      • setSlideOrder

        public void setSlideOrder​(XSLFSlide slide,
                                  int newIndex)
        Parameters:
        newIndex - 0-based index of the slide
      • removeSlide

        public XSLFSlide removeSlide​(int index)
      • getCTPresentation

        @Internal
        public org.openxmlformats.schemas.presentationml.x2006.main.CTPresentation getCTPresentation()
      • findPictureData

        public XSLFPictureData findPictureData​(byte[] pictureData)
        check if a picture with this picture data already exists in this presentation
        Specified by:
        findPictureData in interface SlideShow<XSLFShape,​XSLFTextParagraph>
        Parameters:
        pictureData - The picture data to find in the SlideShow
        Returns:
        null if picture data is not found in this slideshow
        Since:
        3.15 beta 2
      • findLayout

        public XSLFSlideLayout findLayout​(java.lang.String name)
        Scan the master slides for the first slide layout with the given name.
        Parameters:
        name - The layout name (case-insensitive). Cannot be null.
        Returns:
        the first layout found or null on failure