public final class HSLFSlideShow extends POIDocument implements SlideShow<HSLFShape,HSLFTextParagraph>, Closeable, GenericRecord
| Modifier and Type | Field and Description |
|---|---|
static String |
POWERPOINT_DOCUMENT
Powerpoint document entry/stream name
|
static String |
PP95_DOCUMENT |
static String |
PP97_DOCUMENT |
| 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(InputStream inputStream)
Constructs a Powerpoint document from an input stream.
|
HSLFSlideShow(POIFSFileSystem poifs)
Constructs a Powerpoint document from an POIFSFileSystem.
|
| Modifier and Type | Method and Description |
|---|---|
int |
addControl(String name,
String progId)
Add a control in this presentation
|
int |
addEmbed(POIFSFileSystem poiData)
Add an embedded object to this presentation
|
HSLFFontInfo |
addFont(FontInfo fontInfo)
Add a font in this presentation
|
HSLFFontInfo |
addFont(InputStream fontData)
Add a font in this presentation and also embed its font data
|
int |
addMovie(String path,
int type)
Add a movie in this presentation
|
HSLFPictureData |
addPicture(byte[] data,
PictureData.PictureType format) |
HSLFPictureData |
addPicture(File pict,
PictureData.PictureType format)
Adds a picture to the presentation.
|
HSLFPictureData |
addPicture(InputStream is,
PictureData.PictureType format)
Adds a picture to the presentation.
|
protected void |
clearDirectory() |
void |
close() |
void |
createInformationProperties() |
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
|
Record |
getCoreRecordForRefID(int refID)
For a given refID (the internal, 0 based numbering scheme), return the
core record
|
Record |
getCoreRecordForSAS(SlideListWithText.SlideAtomsSet sas)
For a given SlideAtomsSet, return the core record, based on the refID
from the SlidePersistAtom
|
DirectoryNode |
getDirectory() |
Document |
getDocumentRecord()
Helper method for usermodel and model: Get the document record
|
DocumentSummaryInformation |
getDocumentSummaryInformation() |
HSLFObjectData[] |
getEmbeddedObjects()
Returns the data of all the embedded OLE object in the SlideShow
|
protected String |
getEncryptedPropertyStreamName() |
EncryptionInfo |
getEncryptionInfo() |
HSLFFontInfo |
getFont(int idx)
Get a font by index
|
List<HSLFFontInfo> |
getFonts() |
List<? extends GenericRecord> |
getGenericChildren() |
Map<String,Supplier<?>> |
getGenericProperties() |
static int |
getMaxRecordLength() |
HPSFPropertiesExtractor |
getMetadataTextExtractor() |
Record[] |
getMostRecentCoreRecords()
Returns an array of the most recent version of all the interesting
records
|
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
|
Dimension |
getPageSize() |
Object |
getPersistDocument() |
List<HSLFPictureData> |
getPictureData() |
protected PropertySet |
getPropertySet(String setName) |
protected PropertySet |
getPropertySet(String setName,
EncryptionInfo encryptionInfo) |
HeadersFooters |
getSlideHeadersFooters()
Return Header / Footer settings for slides
|
List<HSLFSlideMaster> |
getSlideMasters()
Returns an array of all the normal Slide Masters found in the slideshow
|
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
|
SummaryInformation |
getSummaryInformation() |
List<HSLFTitleMaster> |
getTitleMasters()
Returns an array of all the normal Title Masters found in the slideshow
|
protected boolean |
initDirectory() |
void |
readProperties() |
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.
|
protected void |
replaceDirectory(DirectoryNode newDirectory) |
static void |
setMaxRecordLength(int length) |
void |
setPageSize(Dimension pgsize) |
protected void |
validateInPlaceWritePossible() |
void |
write() |
void |
write(File newFile) |
void |
write(OutputStream out) |
protected void |
writeProperties() |
void |
writeProperties(POIFSFileSystem outFS) |
protected void |
writeProperties(POIFSFileSystem outFS,
List<String> writtenEntries) |
readPropertiesclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetGenericRecordTypepublic static final String POWERPOINT_DOCUMENT
public static final String PP97_DOCUMENT
public static final String PP95_DOCUMENT
public HSLFSlideShow(HSLFSlideShowImpl hslfSlideShow)
hslfSlideShow - the HSLFSlideShow to base onpublic HSLFSlideShow()
public HSLFSlideShow(InputStream inputStream) throws IOException
IOException - If reading data from the stream failsIllegalStateException - a number of runtime exceptions can be thrown, especially if there are problems with the
input formatpublic HSLFSlideShow(POIFSFileSystem poifs) throws IOException
IOException - If reading data from the file-system failsIllegalStateException - a number of runtime exceptions can be thrown, especially if there are problems with the
input formatpublic HSLFSlideShow(DirectoryNode root) throws IOException
IOException - If reading data from the DirectoryNode failsIllegalStateException - a number of runtime exceptions can be thrown, especially if there are problems with the
input formatpublic static void setMaxRecordLength(int length)
length - the max record length allowed for HSLFSlideShowpublic static int getMaxRecordLength()
public Record getCoreRecordForSAS(SlideListWithText.SlideAtomsSet sas)
public Record getCoreRecordForRefID(int refID)
refID - the refIDpublic void write(OutputStream out) throws IOException
write in interface SlideShow<HSLFShape,HSLFTextParagraph>write in class POIDocumentIOExceptionpublic Record[] getMostRecentCoreRecords()
public List<HSLFSlide> getSlides()
getSlides in interface SlideShow<HSLFShape,HSLFTextParagraph>public List<HSLFNotes> getNotes()
public List<HSLFSlideMaster> getSlideMasters()
getSlideMasters in interface SlideShow<HSLFShape,HSLFTextParagraph>public List<HSLFTitleMaster> getTitleMasters()
public List<HSLFPictureData> getPictureData()
getPictureData in interface SlideShow<HSLFShape,HSLFTextParagraph>public HSLFObjectData[] getEmbeddedObjects()
public HSLFSoundData[] getSoundData()
public Dimension getPageSize()
getPageSize in interface SlideShow<HSLFShape,HSLFTextParagraph>public void setPageSize(Dimension pgsize)
setPageSize in interface SlideShow<HSLFShape,HSLFTextParagraph>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 IOException
addPicture in interface SlideShow<HSLFShape,HSLFTextParagraph>IOExceptionpublic HSLFPictureData addPicture(InputStream is, PictureData.PictureType format) throws IOException
addPicture in interface SlideShow<HSLFShape,HSLFTextParagraph>is - The stream to read the image fromformat - The format of the picture.IOExceptionpublic HSLFPictureData addPicture(File pict, PictureData.PictureType format) throws IOException
addPicture in interface SlideShow<HSLFShape,HSLFTextParagraph>pict - the file containing the image to addformat - The format of the picture.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 addFont(InputStream fontData) throws IOException
addFont in interface SlideShow<HSLFShape,HSLFTextParagraph>fontData - the EOT font data as streamIOExceptionpublic HSLFFontInfo getFont(int idx)
idx - 0-based index of the fontPPFont or null if not
foundpublic int getNumberOfFonts()
public List<HSLFFontInfo> getFonts()
getFonts in interface SlideShow<HSLFShape,HSLFTextParagraph>public HeadersFooters getSlideHeadersFooters()
public HeadersFooters getNotesHeadersFooters()
public int addMovie(String path, int type)
path - the path or url to the moviepublic int addControl(String name, 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)
public HPSFPropertiesExtractor getMetadataTextExtractor()
getMetadataTextExtractor in interface SlideShow<HSLFShape,HSLFTextParagraph>public MasterSheet<HSLFShape,HSLFTextParagraph> createMasterSheet()
createMasterSheet in interface SlideShow<HSLFShape,HSLFTextParagraph>@Internal public HSLFSlideShowImpl getSlideShowImpl()
public void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableclose in class POIDocumentIOExceptionpublic Object getPersistDocument()
getPersistDocument in interface SlideShow<HSLFShape,HSLFTextParagraph>public Map<String,Supplier<?>> getGenericProperties()
getGenericProperties in interface GenericRecordpublic List<? extends GenericRecord> getGenericChildren()
getGenericChildren in interface GenericRecordpublic void write()
throws IOException
write in class POIDocumentIOExceptionpublic void write(File newFile) throws IOException
write in class POIDocumentIOExceptionpublic DocumentSummaryInformation getDocumentSummaryInformation()
getDocumentSummaryInformation in class POIDocumentpublic SummaryInformation getSummaryInformation()
getSummaryInformation in class POIDocumentpublic void createInformationProperties()
createInformationProperties in class POIDocumentpublic void readProperties()
readProperties in class POIDocumentprotected PropertySet getPropertySet(String setName) throws IOException
getPropertySet in class POIDocumentIOExceptionprotected PropertySet getPropertySet(String setName, EncryptionInfo encryptionInfo) throws IOException
getPropertySet in class POIDocumentIOExceptionprotected void writeProperties()
throws IOException
writeProperties in class POIDocumentIOExceptionpublic void writeProperties(POIFSFileSystem outFS) throws IOException
writeProperties in class POIDocumentIOExceptionprotected void writeProperties(POIFSFileSystem outFS, List<String> writtenEntries) throws IOException
writeProperties in class POIDocumentIOExceptionprotected void validateInPlaceWritePossible()
throws IllegalStateException
validateInPlaceWritePossible in class POIDocumentIllegalStateExceptionpublic DirectoryNode getDirectory()
getDirectory in class POIDocumentprotected void clearDirectory()
clearDirectory in class POIDocumentprotected boolean initDirectory()
initDirectory in class POIDocumentprotected void replaceDirectory(DirectoryNode newDirectory) throws IOException
replaceDirectory in class POIDocumentIOExceptionprotected String getEncryptedPropertyStreamName()
getEncryptedPropertyStreamName in class POIDocumentpublic EncryptionInfo getEncryptionInfo()
getEncryptionInfo in class POIDocument