com.aspose.slides
Class GlobalLayoutSlideCollection

java.lang.Object
  extended by com.aspose.slides.LayoutSlideCollection
      extended by com.aspose.slides.GlobalLayoutSlideCollection
All Implemented Interfaces:
com.aspose.ms.System.Collections.Generic.IGenericEnumerable<ILayoutSlide>, com.aspose.ms.System.Collections.IEnumerable<ILayoutSlide>, IGenericCollection<ILayoutSlide>, IGlobalLayoutSlideCollection, ILayoutSlideCollection, java.lang.Iterable<ILayoutSlide>

public final class GlobalLayoutSlideCollection
extends LayoutSlideCollection
implements IGlobalLayoutSlideCollection

Represents a collection of all layout slides in presentation. Extends LayoutSlideCollection class with methods for adding/cloning layout slides in context of uniting of the individual collections of master's layout slides.


Method Summary
 ILayoutSlide add(IMasterSlide master, byte layoutType, java.lang.String layoutName)
           Adds a new layout slide to the presentation.
 ILayoutSlide addClone(ILayoutSlide sourceLayout)
           Adds a copy of a specified layout slide to the presentation.
 ILayoutSlide addClone(ILayoutSlide sourceLayout, IMasterSlide destMaster)
           Adds a copy of a specified layout slide to the presentation.
 
Methods inherited from class com.aspose.slides.LayoutSlideCollection
copyTo, get_Item, getByType, getParent_Immediate, getSyncRoot, isSynchronized, iterator, remove, removeUnused, size
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.aspose.slides.ILayoutSlideCollection
get_Item, getByType, remove, removeUnused
 
Methods inherited from interface com.aspose.slides.IGenericCollection
copyTo, getSyncRoot, isSynchronized, size
 
Methods inherited from interface com.aspose.ms.System.Collections.Generic.IGenericEnumerable
iterator
 

Method Detail

addClone

public ILayoutSlide addClone(ILayoutSlide sourceLayout)

Adds a copy of a specified layout slide to the presentation.

Specified by:
addClone in interface IGlobalLayoutSlideCollection
Parameters:
sourceLayout - Slide to clone.


When cloning a layout between different presentations layout's master can be cloned too to keep source formatting. Internal registry is used to track automatically cloned masters to prevent creation of multiple clones of the same master slide. Manual cloning of master slides will be neither prevented nor registered.

Returns:
Added slide.

addClone

public ILayoutSlide addClone(ILayoutSlide sourceLayout,
                             IMasterSlide destMaster)

Adds a copy of a specified layout slide to the presentation.

Specified by:
addClone in interface IGlobalLayoutSlideCollection
Parameters:
sourceLayout - Slide to clone.
destMaster - Master slide for a new layout.


1) New layout will be linked with defined master in destination presentation. So this is analogue of copy/paste with "Use Destination Theme" option in PowerPoint. 2) Analogue of this method is method IMasterLayoutSlideCollection.AddClone(ILayoutSlide) accessed with IMasterSlide.LayoutSlides property.

Returns:
Added slide.

add

public ILayoutSlide add(IMasterSlide master,
                        byte layoutType,
                        java.lang.String layoutName)

Adds a new layout slide to the presentation.

Specified by:
add in interface IGlobalLayoutSlideCollection
Parameters:
master - Master slide for a new layout.
layoutType - Layout 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.
layoutName - Name 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 IMasterLayoutSlideCollection.Add(SlideLayoutType, string) accessed with IMasterSlide.LayoutSlides property.

Returns:
Added slide.
Throws:
NotImplementedException - Thrown if unsupported value of parameter layoutType is passed. Layout types that 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.
com.aspose.ms.System.ArgumentNullException - Thrown if master is null.
com.aspose.ms.System.ArgumentException - Thrown if master belongs to the other presentation.
com.aspose.ms.System.ArgumentException - Thrown if layout name value layoutName is already in use in collection of the layouts of master.


Copyright © Copyright 2004-2016 Aspose Pty Ltd. All Rights Reserved.