public final class HSLFSlideShow extends java.lang.Object implements SlideShow<HSLFShape,HSLFTextParagraph>, java.io.Closeable
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
POWERPOINT_DOCUMENT
Powerpoint document entry/stream name
|
| Constructor and Description |
|---|
HSLFSlideShow()
Constructs a new, empty, Powerpoint document.
|
HSLFSlideShow(DirectoryNode root)
Constructs a Powerpoint document from an DirectoryNode.
|
HSLFSlideShow(HSLFSlideShowImpl hslfSlideShow)
Constructs a Powerpoint document from the underlying
HSLFSlideShow object.
|
HSLFSlideShow(java.io.InputStream inputStream)
Constructs a Powerpoint document from an input stream.
|
HSLFSlideShow(NPOIFSFileSystem npoifs)
Constructs a Powerpoint document from an POIFSFileSystem.
|
| Modifier and Type | Method and Description |
|---|---|
int |
addControl(java.lang.String name,
java.lang.String progId)
Add a control in this presentation
|
int |
addEmbed(POIFSFileSystem poiData)
Add a embedded object to this presentation
|
HSLFFontInfo |
addFont(FontInfo fontInfo)
Add a font in this presentation
|
int |
addMovie(java.lang.String path,
int type)
Add a movie in this presentation
|
protected int |
addPersistentObject(PositionDependentRecord slideRecord) |
HSLFPictureData |
addPicture(byte[] data,
PictureData.PictureType format)
Adds a picture to the presentation.
|
HSLFPictureData |
addPicture(java.io.File pict,
PictureData.PictureType format)
Adds a picture to the presentation.
|
HSLFPictureData |
addPicture(java.io.InputStream is,
PictureData.PictureType format)
Adds a picture to the presentation.
|
protected int |
addToObjListAtom(RecordContainer exObj) |
void |
close() |
MasterSheet<HSLFShape,HSLFTextParagraph> |
createMasterSheet() |
HSLFSlide |
createSlide()
Create a blank
Slide. |
HSLFPictureData |
findPictureData(byte[] pictureData)
check if a picture with this picture data already exists in this presentation
|
Document |
getDocumentRecord()
Helper method for usermodel and model: Get the document record
|
HSLFObjectData[] |
getEmbeddedObjects()
Returns the data of all the embedded OLE object in the SlideShow
|
HSLFFontInfo |
getFont(int idx)
Get a font by index
|
protected FontCollection |
getFontCollection()
Helper method for usermodel: Get the font collection
|
protected static org.apache.poi.hslf.usermodel.HSLFSlideShow.LoadSavePhase |
getLoadSavePhase() |
Record[] |
getMostRecentCoreRecords()
Returns an array of the most recent version of all the interesting
records
|
java.util.List<HSLFNotes> |
getNotes()
Returns an array of all the normal Notes found in the slideshow
|
HeadersFooters |
getNotesHeadersFooters()
Return Header / Footer settings for notes
|
int |
getNumberOfFonts()
get the number of fonts in the presentation
|
protected static java.util.Map<java.lang.String,ClassID> |
getOleMap() |
java.awt.Dimension |
getPageSize()
Returns the current page size
|
java.util.List<HSLFPictureData> |
getPictureData()
Returns all Pictures of this slideshow.
|
Resources |
getResources() |
HeadersFooters |
getSlideHeadersFooters()
Return Header / Footer settings for slides
|
java.util.List<HSLFSlideMaster> |
getSlideMasters()
Returns an array of all the normal Slide Masters found in the slideshow
|
java.util.List<HSLFSlide> |
getSlides()
Returns an array of all the normal Slides found in the slideshow
|
HSLFSlideShowImpl |
getSlideShowImpl() |
HSLFSoundData[] |
getSoundData()
Returns the data of all the embedded sounds in the SlideShow
|
java.util.List<HSLFTitleMaster> |
getTitleMasters()
Returns an array of all the normal Title Masters found in the slideshow
|
HSLFSlide |
removeSlide(int index)
Removes the slide at the given index (0-based).
|
void |
reorderSlide(int oldSlideNumber,
int newSlideNumber)
Re-orders a slide, to a new position.
|
void |
setPageSize(java.awt.Dimension pgsize)
Change the current page size
|
void |
write(java.io.OutputStream out)
Writes out the slideshow file the is represented by an instance of this
class
|
public static final java.lang.String POWERPOINT_DOCUMENT
public HSLFSlideShow(HSLFSlideShowImpl hslfSlideShow)
hslfSlideShow - the HSLFSlideShow to base onpublic HSLFSlideShow()
public HSLFSlideShow(java.io.InputStream inputStream)
throws java.io.IOException
java.io.IOExceptionpublic HSLFSlideShow(NPOIFSFileSystem npoifs) throws java.io.IOException
java.io.IOExceptionpublic HSLFSlideShow(DirectoryNode root) throws java.io.IOException
java.io.IOExceptionprotected static org.apache.poi.hslf.usermodel.HSLFSlideShow.LoadSavePhase getLoadSavePhase()
public void write(java.io.OutputStream out)
throws java.io.IOException
SlideShowwrite in interface SlideShow<HSLFShape,HSLFTextParagraph>out - The OutputStream to write to.java.io.IOException - If there is an unexpected IOException from the passed in
OutputStreampublic Record[] getMostRecentCoreRecords()
public java.util.List<HSLFSlide> getSlides()
getSlides in interface SlideShow<HSLFShape,HSLFTextParagraph>public java.util.List<HSLFNotes> getNotes()
public java.util.List<HSLFSlideMaster> getSlideMasters()
getSlideMasters in interface SlideShow<HSLFShape,HSLFTextParagraph>public java.util.List<HSLFTitleMaster> getTitleMasters()
public java.util.List<HSLFPictureData> getPictureData()
SlideShowList is unmodifiable.getPictureData in interface SlideShow<HSLFShape,HSLFTextParagraph>List of PictureData.public HSLFObjectData[] getEmbeddedObjects()
public HSLFSoundData[] getSoundData()
public java.awt.Dimension getPageSize()
SlideShowgetPageSize in interface SlideShow<HSLFShape,HSLFTextParagraph>public void setPageSize(java.awt.Dimension pgsize)
SlideShowsetPageSize in interface SlideShow<HSLFShape,HSLFTextParagraph>pgsize - page size (in points)protected FontCollection getFontCollection()
public Document getDocumentRecord()
public void reorderSlide(int oldSlideNumber,
int newSlideNumber)
oldSlideNumber - The old slide number (1 based)newSlideNumber - The new slide number (1 based)public HSLFSlide removeSlide(int index)
Shifts any subsequent slides to the left (subtracts one from their slide numbers).
index - the index of the slide to remove (0-based)public HSLFSlide createSlide()
Slide.createSlide in interface SlideShow<HSLFShape,HSLFTextParagraph>Slidepublic HSLFPictureData addPicture(byte[] data, PictureData.PictureType format) throws java.io.IOException
SlideShowaddPicture in interface SlideShow<HSLFShape,HSLFTextParagraph>data - The bytes of the pictureformat - The format of the picture.java.io.IOExceptionpublic HSLFPictureData addPicture(java.io.InputStream is, PictureData.PictureType format) throws java.io.IOException
addPicture in interface SlideShow<HSLFShape,HSLFTextParagraph>is - The stream to read the image fromformat - The format of the picture.java.io.IOExceptionpublic HSLFPictureData addPicture(java.io.File pict, PictureData.PictureType format) throws java.io.IOException
addPicture in interface SlideShow<HSLFShape,HSLFTextParagraph>pict - the file containing the image to addformat - The format of the picture.java.io.IOExceptionpublic HSLFPictureData findPictureData(byte[] pictureData)
findPictureData in interface SlideShow<HSLFShape,HSLFTextParagraph>pictureData - The picture data to find in the SlideShownull if picture data is not found in this slideshowpublic HSLFFontInfo addFont(FontInfo fontInfo)
fontInfo - the font to addpublic HSLFFontInfo getFont(int idx)
idx - 0-based index of the fontPPFont or null if not
foundpublic int getNumberOfFonts()
public HeadersFooters getSlideHeadersFooters()
public HeadersFooters getNotesHeadersFooters()
public int addMovie(java.lang.String path,
int type)
path - the path or url to the moviepublic int addControl(java.lang.String name,
java.lang.String progId)
name - name of the control, e.g. "Shockwave Flash Object"progId - OLE Programmatic Identifier, e.g.
"ShockwaveFlash.ShockwaveFlash.9"public int addEmbed(POIFSFileSystem poiData)
protected int addToObjListAtom(RecordContainer exObj)
protected static java.util.Map<java.lang.String,ClassID> getOleMap()
protected int addPersistentObject(PositionDependentRecord slideRecord)
public MasterSheet<HSLFShape,HSLFTextParagraph> createMasterSheet() throws java.io.IOException
createMasterSheet in interface SlideShow<HSLFShape,HSLFTextParagraph>java.io.IOExceptionpublic Resources getResources()
getResources in interface SlideShow<HSLFShape,HSLFTextParagraph>@Internal public HSLFSlideShowImpl getSlideShowImpl()
public void close()
throws java.io.IOException
close in interface java.io.Closeableclose in interface java.lang.AutoCloseablejava.io.IOExceptionCopyright 2018 The Apache Software Foundation or its licensors, as applicable.