MasterLayoutSlideCollection

MasterLayoutSlideCollection class

Represents a collections of all layout slides of defined master slide. Extends LayoutSlideCollection class with methods for adding/inserting/removing/cloning/reordering layout slides in context of the individual collections of master’s layout slides.

add

NameDescription
add(byte, String)Adds a new layout slide to the end of the collection.

Parameters:

NameTypeDescription
layoutTypebyteLayout type for a new layout. Supported layout types: Title, TitleOnly, Blank, TitleAndObject, VerticalText, VerticalTitleAndText, TwoObjects, SectionHeader, TwoTextAndTwoObjects, TitleObjectAndCaption, PictureAndCaption, Custom. Other layout types are not supported now: Text, TwoColumnText, Table, TextAndChart, ChartAndText, Diagram, Chart, TextAndClipArt, ClipArtAndText, TextAndObject, ObjectAndText, Object, TextAndMedia, MediaAndText, ObjectOverText, TextOverObject, TextAndTwoObjects, TwoObjectsAndText, TwoObjectsOverText, FourObjects, ClipArtAndVerticalText, VerticalTitleAndTextOverChart, ObjectAndTwoObject, TwoObjectsAndObject.
layoutNameStringName for a new layout. If passed name is already in use the ArgumentException will be thrown. If null parameter is passed then name genarated atomatically in regards to passed layout type (for example “Title Slide” or “1_Title Slide”, “2_..”, etc.). 1) Added layout for value SlideLayoutType.Custom of layoutType contains no placeholders and no shapes. 2) Analogue of this method is method IGlobalLayoutSlideCollection#add(IMasterSlide,byte,String) accessed with ( IPresentation#getLayoutSlides) property.

Result: LayoutSlide

Error

ErrorCondition
com.aspose.ms.System.ArgumentExceptionThrown if layout name value layoutName is already in use in this collection of the layouts.

addClone

NameDescription
addClone(LayoutSlide)Adds a copy of a specified layout slide to the end of the collection.

Parameters:

NameTypeDescription
sourceLayoutLayoutSlideSlide to clone. 1) New layout will be linked with parent master slide for this layout slides collection. So this is analogue of copy/paste with “Use Destination Theme” option in PowerPoint. 2) Analogue of this method is method IGlobalLayoutSlideCollection#addClone(ILayoutSlide,IMasterSlide) accessed with ( IPresentation#getLayoutSlides) property.

Result: LayoutSlide


copyTo

NameDescription
copyTo(Array, int)Copies all elements from the collection to the specified array.

Parameters:

NameTypeDescription
arrayArrayTarget array.
indexintStarting index in the target array.

getByType

NameDescription
getByType(byte)Returns the first layout slide of specified type.

Parameters:

NameTypeDescription
typebyteA type of layout slide to find.

Result: LayoutSlide


getParent_Immediate

NameDescription
getParent_Immediate()

getSyncRoot

NameDescription
getSyncRoot()Returns a synchronization root. Read-only Object.

Result: Object


get_Item

NameDescription
get_Item(int)Returns the layout slide by index. Read-only LayoutSlide.

Result: LayoutSlide


insert

NameDescription
insert(int, byte, String)Inserts a new layout slide to specified position of the collection.

Parameters:

NameTypeDescription
indexintIndex of new slide.
layoutTypebyteLayout type for a new layout. Supported layout types: Title, TitleOnly, Blank, TitleAndObject, VerticalText, VerticalTitleAndText, TwoObjects, SectionHeader, TwoTextAndTwoObjects, TitleObjectAndCaption, PictureAndCaption, Custom. Other layout types are not supported now: Text, TwoColumnText, Table, TextAndChart, ChartAndText, Diagram, Chart, TextAndClipArt, ClipArtAndText, TextAndObject, ObjectAndText, Object, TextAndMedia, MediaAndText, ObjectOverText, TextOverObject, TextAndTwoObjects, TwoObjectsAndText, TwoObjectsOverText, FourObjects, ClipArtAndVerticalText, VerticalTitleAndTextOverChart, ObjectAndTwoObject, TwoObjectsAndObject.
layoutNameStringName for a new layout. If passed name is already in use the ArgumentException will be thrown. If null parameter is passed then name genarated atomatically in regards to passed layout type (for example “Title Slide” or “1_Title Slide”, “2_..”, etc.). Inserted layout for value SlideLayoutType.Custom of layoutType contains no placeholders and no shapes.

Result: LayoutSlide

Error

ErrorCondition
com.aspose.ms.System.ArgumentExceptionThrown if layout name value layoutName is already in use in this collection of the layouts.

insertClone

NameDescription
insertClone(int, LayoutSlide)Inserts a copy of a specified layout slide to specified position of the collection.

Parameters:

NameTypeDescription
indexintIndex of new slide.
sourceLayoutLayoutSlideSlide to clone. New layout will be linked with parent master slide for this layout slides collection. So this is analogue of copy/paste with “Use Destination Theme” option in PowerPoint.

Result: LayoutSlide


isSynchronized

NameDescription
isSynchronized()Returns a value indicating whether access to the collection is synchronized (thread-safe). Read-only boolean.

Result: boolean


iterator

NameDescription
iterator()Returns an enumerator that iterates through the collection.

Result:


iteratorJava

NameDescription
iteratorJava()Returns a java iterator for the entire collection.

Result:


remove

NameDescription
remove(LayoutSlide)Removes a layout from the collection.

Parameters:

NameTypeDescription
valueLayoutSlideThe layout slide to remove from the collection. 1) To avoid throwing of the PptxEditException check layout’s HasDependingSlides property before. 2) You can use also ILayoutSlide#remove method to simplify code.

Error

ErrorCondition
PptxEditExceptionThrown if layout is used in presentation (its HasDependingSlides property is true).

removeAt

NameDescription
removeAt(int)Removes the element at the specified index of the collection.

Parameters:

NameTypeDescription
indexintThe zero-based index of the element to remove. 1) To avoid throwing of the PptxEditException check layout’s HasDependingSlides property before. 2) You can use also ILayoutSlide#remove method to simplify code.

Error

ErrorCondition
PptxEditExceptionThrown if layout is used in presentation (its HasDependingSlides property is true).

removeUnused

NameDescription
removeUnused()Removes unused layout slides (layout slides whose HasDependingSlides is false).

reorder

NameDescription
reorder(int, LayoutSlide)Moves layout slide from the collection to the specified position.

Parameters:

NameTypeDescription
indexintTarget index.
layoutSlideLayoutSlideSlide to move.

size

NameDescription
size()Returns the number of layout slides in a collection. Read-only int.

Result: int