insertClone

Contents
[ ]

insertClone(int index, Slide sourceSlide) function

Inserts a copy of a specified slide to specified position of the collection.

Parameters

NameTypeDescription
indexintIndex of new slide.
sourceSlideSlideSlide to clone. When cloning a slide between different presentations slide’s master can be cloned too. 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. If you need more control over cloning process use #insertClone(int,ISlide,ILayoutSlide) or #insertClone(int,ISlide,IMasterSlide,boolean) for cloning slides and IMasterSlideCollection#addClone(IMasterSlide) for cloning masters.

Result

Slide


insertClone(int index, Slide sourceSlide, LayoutSlide destLayout) function

Inserts a copy of a specified slide to specified position of the collection.

Parameters

NameTypeDescription
indexintIndex of new slide.
sourceSlideSlideSlide to clone.
destLayoutLayoutSlideLayout slide for a new slide.

Result

Slide


insertClone(int index, Slide sourceSlide, MasterSlide destMaster, boolean allowCloneMissingLayout) function

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).

Parameters

NameTypeDescription
indexintIndex of new slide.
sourceSlideSlideSlide to clone.
destMasterMasterSlideMaster slide for a new slide.
allowCloneMissingLayoutbooleanIf 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).

Result

Slide

Error

ErrorCondition
PptxEditExceptionThrown if there is no appropriate layout in specified master and allowCloneMissingLayout is false.