ForEach

Inheritance: java.lang.Object

public class ForEach

Represents a group of methods intended to iterate over different Presentation model objects. These methods can be useful if you need to iterate and change some Presentation’ elements formatting or content, e.g. change each portion formatting.


Presentation pres = new Presentation("pres.pptx");
 try {
     ForEach.portion(pres, new ForEach.ForEachPortionCallback() {

Constructors

ConstructorDescription
ForEach()

Methods

MethodDescription
slide(Presentation pres, ForEach.ForEachSlideCallback forEachSlide)Iterate each #slide(Presentation,ForEachSlideCallback).slide(Presentation,ForEachSlideCallback) in the Presentation.
masterSlide(Presentation pres, ForEach.ForEachMasterSlideCallback forEachMasterSlide)Iterate each #masterSlide(Presentation,ForEachMasterSlideCallback).masterSlide(Presentation,ForEachMasterSlideCallback) in the Presentation.
layoutSlide(Presentation pres, ForEach.ForEachLayoutSlideCallback forEachLayoutSlide)Iterate each #layoutSlide(Presentation,ForEachLayoutSlideCallback).layoutSlide(Presentation,ForEachLayoutSlideCallback) in the Presentation.
shape(Presentation pres, ForEach.ForEachShapeCallback forEachShape)Iterate each Shape in the Presentation.
shape(Presentation pres, boolean includeNotes, ForEach.ForEachShapeCallback forEachShape)Iterate each Shape in the Presentation.
shape(BaseSlide baseSlide, ForEach.ForEachShapeCallback forEachShape)Iterate each Shape in the BaseSlide.
paragraph(Presentation pres, ForEach.ForEachParagraphCallback forEachParagraph)Iterate each Paragraph in the Presentation.
paragraph(Presentation pres, boolean includeNotes, ForEach.ForEachParagraphCallback forEachParagraph)Iterate each Paragraph in the Presentation.
portion(Presentation pres, ForEach.ForEachPortionCallback forEachPortion)Iterate each Portion in the Presentation.
portion(Presentation pres, boolean includeNotes, ForEach.ForEachPortionCallback forEachPortion)Iterate each Portion in the Presentation.

ForEach()

public ForEach()

slide(Presentation pres, ForEach.ForEachSlideCallback forEachSlide)

public static void slide(Presentation pres, ForEach.ForEachSlideCallback forEachSlide)

Iterate each #slide(Presentation,ForEachSlideCallback).slide(Presentation,ForEachSlideCallback) in the Presentation.


Presentation pres = new Presentation("pres.pptx");
 try {
     ForEach.slide(pres, new ForEach.ForEachSlideCallback() {

Parameters:

ParameterTypeDescription
presPresentationPresentation to iterate slides
forEachSlideForEachSlideCallbackCallback that will be invoked for each slide

masterSlide(Presentation pres, ForEach.ForEachMasterSlideCallback forEachMasterSlide)

public static void masterSlide(Presentation pres, ForEach.ForEachMasterSlideCallback forEachMasterSlide)

Iterate each #masterSlide(Presentation,ForEachMasterSlideCallback).masterSlide(Presentation,ForEachMasterSlideCallback) in the Presentation.


Presentation pres = new Presentation("pres.pptx");
 try {
     ForEach.masterSlide(pres, new ForEach.ForEachMasterSlideCallback() {

Parameters:

ParameterTypeDescription
presPresentationPresentation to iterate master slides
forEachMasterSlideForEachMasterSlideCallbackCallback that will be invoked for each master slide

layoutSlide(Presentation pres, ForEach.ForEachLayoutSlideCallback forEachLayoutSlide)

public static void layoutSlide(Presentation pres, ForEach.ForEachLayoutSlideCallback forEachLayoutSlide)

Iterate each #layoutSlide(Presentation,ForEachLayoutSlideCallback).layoutSlide(Presentation,ForEachLayoutSlideCallback) in the Presentation.


Presentation pres = new Presentation("pres.pptx");
 try {
     ForEach.layoutSlide(pres, new ForEach.ForEachLayoutSlideCallback() {

Parameters:

ParameterTypeDescription
presPresentationPresentation to iterate layout slides
forEachLayoutSlideForEachLayoutSlideCallbackCallback that will be invoked for each layout slide

shape(Presentation pres, ForEach.ForEachShapeCallback forEachShape)

public static void shape(Presentation pres, ForEach.ForEachShapeCallback forEachShape)

Iterate each Shape in the Presentation.


Presentation pres = new Presentation("pres.pptx");
 try {
     ForEach.shape(pres, new ForEach.ForEachShapeCallback() {

Parameters:

ParameterTypeDescription
presPresentationPresentation to iterate layout shapes
forEachShapeForEachShapeCallbackCallback that will be invoked for each shape

Shapes will be iterated in all type of slides - #slide(Presentation,ForEachSlideCallback).slide(Presentation,ForEachSlideCallback), #masterSlide(Presentation,ForEachMasterSlideCallback).masterSlide(Presentation,ForEachMasterSlideCallback) and #layoutSlide(Presentation,ForEachLayoutSlideCallback).layoutSlide(Presentation,ForEachLayoutSlideCallback) |

shape(Presentation pres, boolean includeNotes, ForEach.ForEachShapeCallback forEachShape)

public static void shape(Presentation pres, boolean includeNotes, ForEach.ForEachShapeCallback forEachShape)

Iterate each Shape in the Presentation.


Presentation pres = new Presentation("pres.pptx");
 try {
     ForEach.shape(pres, true, new ForEach.ForEachShapeCallback() {

Parameters:

ParameterTypeDescription
presPresentationPresentation to iterate layout shapes
includeNotesbooleanFlag that indicates whether NotesSlides should be included in processing.
forEachShapeForEachShapeCallbackCallback that will be invoked for each shape

Shapes will be iterated in all type of slides - #slide(Presentation,ForEachSlideCallback).slide(Presentation,ForEachSlideCallback), #masterSlide(Presentation,ForEachMasterSlideCallback).masterSlide(Presentation,ForEachMasterSlideCallback), #layoutSlide(Presentation,ForEachLayoutSlideCallback).layoutSlide(Presentation,ForEachLayoutSlideCallback) and NotesSlide if needed. |

shape(BaseSlide baseSlide, ForEach.ForEachShapeCallback forEachShape)

public static void shape(BaseSlide baseSlide, ForEach.ForEachShapeCallback forEachShape)

Iterate each Shape in the BaseSlide.


Presentation pres = new Presentation("pres.pptx");
 try {
     ForEach.slide(pres, new ForEach.ForEachSlideCallback() {

Parameters:

ParameterTypeDescription
baseSlideBaseSlideSlide to iterate layout shapes
forEachShapeForEachShapeCallbackCallback that will be invoked for each shape

BaseSlide is the base type for #slide(Presentation,ForEachSlideCallback).slide(Presentation,ForEachSlideCallback), #masterSlide(Presentation,ForEachMasterSlideCallback).masterSlide(Presentation,ForEachMasterSlideCallback) and #layoutSlide(Presentation,ForEachLayoutSlideCallback).layoutSlide(Presentation,ForEachLayoutSlideCallback) |

paragraph(Presentation pres, ForEach.ForEachParagraphCallback forEachParagraph)

public static void paragraph(Presentation pres, ForEach.ForEachParagraphCallback forEachParagraph)

Iterate each Paragraph in the Presentation.


Presentation pres = new Presentation("pres.pptx");
 try {
     ForEach.paragraph(pres, new ForEach.ForEachParagraphCallback() {

Parameters:

ParameterTypeDescription
presPresentationPresentation to iterate paragraphs
forEachParagraphForEachParagraphCallbackCallback that will be invoked for each paragraph

Shapes will be iterated in all type of slides - #slide(Presentation,ForEachSlideCallback).slide(Presentation,ForEachSlideCallback), #masterSlide(Presentation,ForEachMasterSlideCallback).masterSlide(Presentation,ForEachMasterSlideCallback) and #layoutSlide(Presentation,ForEachLayoutSlideCallback).layoutSlide(Presentation,ForEachLayoutSlideCallback) |

paragraph(Presentation pres, boolean includeNotes, ForEach.ForEachParagraphCallback forEachParagraph)

public static void paragraph(Presentation pres, boolean includeNotes, ForEach.ForEachParagraphCallback forEachParagraph)

Iterate each Paragraph in the Presentation.


Presentation pres = new Presentation("pres.pptx");
 try {
     ForEach.paragraph(pres, true, new ForEach.ForEachParagraphCallback() {

Parameters:

ParameterTypeDescription
presPresentationPresentation to iterate paragraphs
includeNotesbooleanFlag that indicates whether NotesSlides should be included in processing.
forEachParagraphForEachParagraphCallbackCallback that will be invoked for each paragraph

Shapes will be iterated in all type of slides - #slide(Presentation,ForEachSlideCallback).slide(Presentation,ForEachSlideCallback), #masterSlide(Presentation,ForEachMasterSlideCallback).masterSlide(Presentation,ForEachMasterSlideCallback), #layoutSlide(Presentation,ForEachLayoutSlideCallback).layoutSlide(Presentation,ForEachLayoutSlideCallback) and NotesSlide |

portion(Presentation pres, ForEach.ForEachPortionCallback forEachPortion)

public static void portion(Presentation pres, ForEach.ForEachPortionCallback forEachPortion)

Iterate each Portion in the Presentation.


Presentation pres = new Presentation("pres.pptx");
 try {
     ForEach.portion(pres, new ForEach.ForEachPortionCallback() {

Parameters:

ParameterTypeDescription
presPresentationPresentation to iterate portions
forEachPortionForEachPortionCallbackCallback that will be invoked for each portion

Portions will be iterated in all type of slides - #slide(Presentation,ForEachSlideCallback).slide(Presentation,ForEachSlideCallback), #masterSlide(Presentation,ForEachMasterSlideCallback).masterSlide(Presentation,ForEachMasterSlideCallback) and #layoutSlide(Presentation,ForEachLayoutSlideCallback).layoutSlide(Presentation,ForEachLayoutSlideCallback) |

portion(Presentation pres, boolean includeNotes, ForEach.ForEachPortionCallback forEachPortion)

public static void portion(Presentation pres, boolean includeNotes, ForEach.ForEachPortionCallback forEachPortion)

Iterate each Portion in the Presentation.


Presentation pres = new Presentation("pres.pptx");
 try {
     ForEach.portion(pres, true, new ForEach.ForEachPortionCallback() {

Parameters:

ParameterTypeDescription
presPresentationPresentation to iterate portions
includeNotesbooleanFlag that indicates whether NotesSlides should be included in processing.
forEachPortionForEachPortionCallbackCallback that will be invoked for each portion

Portions will be iterated in all type of slides - #slide(Presentation,ForEachSlideCallback).slide(Presentation,ForEachSlideCallback), #masterSlide(Presentation,ForEachMasterSlideCallback).masterSlide(Presentation,ForEachMasterSlideCallback), #layoutSlide(Presentation,ForEachLayoutSlideCallback).layoutSlide(Presentation,ForEachLayoutSlideCallback) and NotesSlide |