Class OdfSlide


  • public class OdfSlide
    extends Object
    OdfSlide represents the presentation slide feature of the ODF document. OdfSlide provides methods to get the slide index,get the content of the current slide, etc.
    • Method Detail

      • getInstance

        public static OdfSlide getInstance​(DrawPageElement pageElement)
        Get a presentation slide instance by an instance of DrawPageElement.
        Parameters:
        pageElement - an instance of DrawPageElement
        Returns:
        an instance of OdfSlide that can represent pageElement
      • getOdfElement

        public DrawPageElement getOdfElement()
        Return an instance of DrawPageElement which represents presentation slide feature.
        Returns:
        an instance of DrawPageElement
      • getSlideIndex

        public int getSlideIndex()
        Get the current slide index in the owner document.
        Returns:
        the slide index in the owner document

        -1, if the odf element which can represent this slide is not in the document DOM tree

      • getSlideName

        public String getSlideName()
        Get the current slide name.

        If the "draw:name" attribute is not present there, create an unique name for this slide

        Returns:
        the name of the current slide
      • setSlideName

        public void setSlideName​(String name)
        Set the current slide name.

        It must be unique slide name in the current presentation. If not, an IllegalArgumentException will be thrown. If the given name is null, an IllegalArgumentException will also be thrown.

        Parameters:
        name - the new name of the current slide
        Throws:
        IllegalArgumentException - if the given name is null or it is not unique in the current presentation.
      • getNotesPage

        public OdfPresentationNotes getNotesPage()
        Get the Notes page of this slide
        Returns:
        the instance of OdfPresentationNotes which represent the notes page of the current slide