public interface ISlideCollection extends IGenericCollection<ISlide>
Modifier and Type | Method and Description |
---|---|
ISlide |
addClone(ISlide sourceSlide)
Adds a copy of a specified slide to the end of the collection.
|
ISlide |
addClone(ISlide sourceSlide,
ILayoutSlide destLayout)
Adds a copy of a specified slide to the end of the collection.
|
ISlide |
addClone(ISlide sourceSlide,
IMasterSlide destMaster,
boolean allowCloneMissingLayout)
Adds a copy of a specified source slide to the end of the collection.
|
ISlide |
addClone(ISlide sourceSlide,
ISection section)
Adds a copy of a specified slide to the end of the specified section.
|
ISlide |
addEmptySlide(ILayoutSlide layout)
Adds a new empty slide to the end of the collection.
|
ISlide[] |
addFromHtml(java.io.InputStream htmlStream)
Creates slides from HTML text and adds them to the end of the collection.
|
ISlide[] |
addFromHtml(java.io.InputStream htmlStream,
IExternalResourceResolver resolver,
java.lang.String uri)
Creates slides from HTML text and adds them to the end of the collection.
|
ISlide[] |
addFromHtml(java.lang.String htmlText)
Creates slides from HTML text and adds them to the end of the collection.
|
ISlide[] |
addFromHtml(java.lang.String htmlText,
IExternalResourceResolver resolver,
java.lang.String uri)
Creates slides from HTML text and adds them to the end of the collection.
|
ISlide |
get_Item(int index)
Gets the element at the specified index.
|
int |
indexOf(ISlide slide)
Returns an index of the specified slide in the collection.
|
ISlide |
insertClone(int index,
ISlide sourceSlide)
Inserts a copy of a specified slide to specified position of the collection.
|
ISlide |
insertClone(int index,
ISlide sourceSlide,
ILayoutSlide destLayout)
Inserts a copy of a specified slide to specified position of the collection.
|
ISlide |
insertClone(int index,
ISlide sourceSlide,
IMasterSlide destMaster,
boolean allowCloneMissingLayout)
Inserts a copy of a specified source slide to specified position of the collection.
|
ISlide |
insertEmptySlide(int index,
ILayoutSlide layout)
Inserts a copy of a specified slide to specified position of the collection.
|
ISlide[] |
insertFromHtml(int index,
java.io.InputStream htmlStream)
Creates slides from HTML text and inserts them to the collection at the specified position.
|
ISlide[] |
insertFromHtml(int index,
java.io.InputStream htmlStream,
IExternalResourceResolver resolver,
java.lang.String uri)
Creates slides from HTML text and inserts them to the collection at the specified position.
|
ISlide[] |
insertFromHtml(int index,
java.lang.String htmlText)
Creates slides from HTML text and inserts them to the collection at the specified position.
|
ISlide[] |
insertFromHtml(int index,
java.lang.String htmlText,
IExternalResourceResolver resolver,
java.lang.String uri)
Creates slides from HTML text and inserts them to the collection at the specified position.
|
void |
remove(ISlide value)
Removes the first occurrence of a specific object from the collection.
|
void |
removeAt(int index)
Removes the element at the specified index of the collection.
|
void |
reorder(int index,
ISlide... slides)
Moves slides from the collection to the specified position.
|
void |
reorder(int index,
ISlide slide)
Moves slide from the collection to the specified position.
|
ISlide[] |
toArray()
Creates and returns an array with all slides in it.
|
ISlide[] |
toArray(int startIndex,
int count)
Creates and returns an array with all slides from the specified range in it.
|
iterator
ISlide addClone(ISlide sourceSlide)
Adds a copy of a specified slide to the end of the collection.
sourceSlide
- Slide to clone.
addClone(ISlide,ILayoutSlide)
or
addClone(ISlide,IMasterSlide,boolean)
for cloning slides,
IGlobalLayoutSlideCollection.addClone(ILayoutSlide)
or
IGlobalLayoutSlideCollection.addClone(ILayoutSlide,IMasterSlide)
for cloning layouts and
IMasterSlideCollection.addClone(IMasterSlide)
for cloning masters.
ISlide addClone(ISlide sourceSlide, ISection section)
Adds a copy of a specified slide to the end of the specified section.
IPresentation presentation = new Presentation(); try { presentation.getSlides().get_Item(0).getShapes().addAutoShape(ShapeType.Rectangle, 200, 50, 300, 100); presentation.getSections().addSection("Section 1", presentation.getSlides().get_Item(0)); ISection section2 = presentation.getSections().appendEmptySection("Section 2"); presentation.getSlides().addClone(presentation.getSlides().get_Item(0), section2); // Now the second section contains a copy of the first slide. } finally { if (presentation != null) presentation.dispose(); }
sourceSlide
- Slide to clone.section
- Section for a new slide.com.aspose.ms.System.ArgumentNullException
- When sourceSlide or section parameter is null.PptxEditException
- When section parameter contains wrong or invalid value.ISlide insertClone(int index, ISlide sourceSlide)
Inserts a copy of a specified slide to specified position of the collection.
index
- Index of new slide.sourceSlide
- Slide to clone.
insertClone(int,ISlide,ILayoutSlide)
or
insertClone(int,ISlide,IMasterSlide,boolean)
for cloning slides and
IMasterSlideCollection.addClone(IMasterSlide)
for cloning masters.
ISlide addEmptySlide(ILayoutSlide layout)
Adds a new empty slide to the end of the collection.
layout
- Layout for a slide.ISlide insertEmptySlide(int index, ILayoutSlide layout)
Inserts a copy of a specified slide to specified position of the collection.
index
- Index of a new slide.layout
- Layout for a slide.ISlide addClone(ISlide sourceSlide, ILayoutSlide destLayout)
Adds a copy of a specified slide to the end of the collection.
sourceSlide
- Slide to clone.destLayout
- Layout slide for a new slide.ISlide insertClone(int index, ISlide sourceSlide, ILayoutSlide destLayout)
Inserts a copy of a specified slide to specified position of the collection.
index
- Index of new slide.sourceSlide
- Slide to clone.destLayout
- Layout slide for a new slide.ISlide addClone(ISlide sourceSlide, IMasterSlide destMaster, boolean allowCloneMissingLayout)
Adds a copy of a specified source slide to the end of the collection. Appropriate layout will be selected automatically from the specified master (appropriate layout is the layout with the same Type or Name as of layout of the source slide). If there is no appropriate layout then layout of the source slide will be cloned (if allowCloneMissingLayout is true) or PptxEditException will be thrown (if allowCloneMissingLayout is false).
sourceSlide
- Slide to clone.destMaster
- Master slide for a new slide.allowCloneMissingLayout
- If there is no appropriate layout in specified master then layout of the
source slide will be cloned (if allowCloneMissingLayout is true) or
PptxEditException will be thrown (if allowCloneMissingLayout is false).PptxEditException
- Thrown if there is no appropriate layout in specified master and
allowCloneMissingLayout is false.ISlide insertClone(int index, ISlide sourceSlide, IMasterSlide destMaster, boolean allowCloneMissingLayout)
Inserts a copy of a specified source slide to specified position of the collection. Appropriate layout will be selected automatically from the specified master (appropriate layout is the layout with the same Type or Name as of layout of the source slide). If there is no appropriate layout then layout of the source slide will be cloned (if allowCloneMissingLayout is true) or PptxEditException will be thrown (if allowCloneMissingLayout is false).
index
- Index of new slide.sourceSlide
- Slide to clone.destMaster
- Master slide for a new slide.allowCloneMissingLayout
- If there is no appropriate layout in specified master then layout of the
source slide will be cloned (if allowCloneMissingLayout is true) or
PptxEditException will be thrown (if allowCloneMissingLayout is false).PptxEditException
- Thrown if there is no appropriate layout in specified master and
allowCloneMissingLayout is false.void remove(ISlide value)
Removes the first occurrence of a specific object from the collection.
value
- The slide to remove from the collection.void removeAt(int index)
Removes the element at the specified index of the collection.
index
- The zero-based index of the element to remove.com.aspose.ms.System.ArgumentOutOfRangeException
- When index parameter contains wrong section number.ISlide[] toArray()
Creates and returns an array with all slides in it.
ISlide
ISlide[] toArray(int startIndex, int count)
Creates and returns an array with all slides from the specified range in it.
startIndex
- An index of a first slide to add.count
- A number of slides to add.ISlide
void reorder(int index, ISlide slide)
Moves slide from the collection to the specified position.
index
- Target index.slide
- Slide to move.void reorder(int index, ISlide... slides)
Moves slides from the collection to the specified position. Slides will be placed starting from index in order they appear in list.
index
- Target index.slides
- Slides to move.int indexOf(ISlide slide)
Returns an index of the specified slide in the collection.
slide
- Slide to find.ISlide[] addFromHtml(java.lang.String htmlText, IExternalResourceResolver resolver, java.lang.String uri)
Creates slides from HTML text and adds them to the end of the collection.
htmlText
- Html to add.resolver
- A callback object used to fetch external objects. If this parameter is null all external objects will be ignored.uri
- An URI of the specified HTML. Used to resolve relative links.ISlide[] addFromHtml(java.lang.String htmlText)
Creates slides from HTML text and adds them to the end of the collection.
htmlText
- Html to add.ISlide[] addFromHtml(java.io.InputStream htmlStream, IExternalResourceResolver resolver, java.lang.String uri)
Creates slides from HTML text and adds them to the end of the collection.
htmlStream
- A Stream object which will be used as a source of a HTML file.resolver
- A callback object used to fetch external objects. If this parameter is null all external objects will be ignored.uri
- An URI of the specified HTML. Used to resolve relative links.ISlide[] addFromHtml(java.io.InputStream htmlStream)
Creates slides from HTML text and adds them to the end of the collection.
htmlStream
- A Stream object which will be used as a source of a HTML file.ISlide[] insertFromHtml(int index, java.lang.String htmlText, IExternalResourceResolver resolver, java.lang.String uri)
Creates slides from HTML text and inserts them to the collection at the specified position.
index
- Position to insert.htmlText
- Html to add.resolver
- A callback object used to fetch external objects. If this parameter is null all external objects will be ignored.uri
- An URI of the specified HTML. Used to resolve relative links.ISlide[] insertFromHtml(int index, java.lang.String htmlText)
Creates slides from HTML text and inserts them to the collection at the specified position.
index
- Position to insert.htmlText
- Html to add.ISlide[] insertFromHtml(int index, java.io.InputStream htmlStream, IExternalResourceResolver resolver, java.lang.String uri)
Creates slides from HTML text and inserts them to the collection at the specified position.
index
- Position to insert.htmlStream
- A Stream object which will be used as a source of a HTML file.resolver
- A callback object used to fetch external objects. If this parameter is null all external objects will be ignored.uri
- An URI of the specified HTML. Used to resolve relative links.ISlide[] insertFromHtml(int index, java.io.InputStream htmlStream)
Creates slides from HTML text and inserts them to the collection at the specified position.
index
- Position to insert.htmlStream
- A Stream object which will be used as a source of a HTML file.