SlideCollection
Overview
SlideCollection is a class in Aspose.Slides FOSS for C++.
Manages the collection of slides in a presentation.
This class declares 38 methods for SlideCollection objects in C++ programs.
Available methods include: SlideCollection, add_clone, add_empty_slide, add_empty_slide_in_memory, add_empty_slide_internal, as_i_collection, as_i_enumerable, begin, clone_master_chain_for_slide, clone_slide_internal, const_iterator, end, and 16 additional methods.
Public members are accessible to any C++ application after installing the Aspose.Slides FOSS for C++ package.
Accessor methods: SlideCollection, const_iterator, iterator.
Accessor Methods
| Name | Type | Access | Description |
|---|---|---|---|
SlideCollection | SlideCollection | Read | Gets the slide collection. |
iterator | iterator | Read | Gets the iterator. |
const_iterator | const_iterator | Read | Gets the const iterator. |
Methods
| Signature | Description |
|---|---|
SlideCollection() → SlideCollection | Constructs a new slide collection for a presentation |
iterator() → iterator | Returns an iterator to the beginning of the slide collection |
iterator() → iterator | |
const_iterator() → const_iterator | Property gives a const iterator to the slide collection |
const_iterator() → const_iterator | |
SlideCollection() | |
as_i_collection() → ISlideCollection | Returns this collection as a generic collection interface. |
as_i_enumerable() → ISlideCollection | Returns this collection as a generic enumerable interface. |
size() → std::size_t | Returns the number of slides. |
add_clone(source_slide: Slide) → Slide | Adds a clone of the given slide to the end of the collection. |
add_clone(source_slide: Slide, dest_layout: ILayoutSlide) → Slide | Adds a clone of the given slide to the specified layout. |
add_clone(source_slide: Slide, dest_master: IMasterSlide, allow_clone_missing_layout: bool) → Slide | Adds a clone of the given slide to the specified master slide. |
insert_clone(index: std::size_t, source_slide: Slide) → Slide | Inserts a clone of the given slide at the specified index. |
insert_clone(index: std::size_t, source_slide: Slide, dest_layout: ILayoutSlide) → Slide | Inserts a clone at the specified index with the given layout. |
insert_clone(index: std::size_t, source_slide: Slide, dest_master: IMasterSlide, allow_clone_missing_layout: bool) → Slide | Inserts a clone at the specified index with the given master slide. |
to_array() → std::vector<Slide*> | Returns all slides as a vector of non-owning pointers. |
to_array(start_index: std::size_t, count: std::size_t) → std::vector<Slide*> | Returns slides in the specified range as non-owning pointers. |
add_empty_slide(layout: ILayoutSlide) → Slide | Adds an empty slide with the given layout to the end. On a deck opened from a file this creates the slide part, its relationship and its entry, so the slide is in the package that is saved next — not only in this collection. |
insert_empty_slide(index: std::size_t, layout: ILayoutSlide) → Slide | Inserts an empty slide with the given layout at the specified index. See add_empty_slide(). |
remove(slide: Slide) | Removes the given slide from the collection. |
remove_at(index: std::size_t) | Removes the slide at the given index. |
index_of(slide: Slide) → std::ptrdiff_t | Returns the zero-based index of a slide, or -1 if not found. |
begin() → iterator | Calls begin on this SlideCollection instance. |
end() → iterator | Calls end on this SlideCollection instance. |
begin() → const_iterator | |
end() → const_iterator | |
init_internal(presentation: Presentation, package: Internal::opc::OpcPackage, presentation_part_name: std::string_view, slide_references: std::vector<SlideReference>, layout_resolver: LayoutResolver) | Internal initialization for OPC-based loading. Replaces the default slide list with slides resolved from the package. |
add_empty_slide_internal(layout: ILayoutSlide, index: std::ptrdiff_t) → Slide | Internal implementation for adding/inserting an empty slide at OPC level. |
remove_slide_from_package(slide: Slide) | Take a slide out of the package: its , its relationship, its part, that part’s relationships and its content-type override. A no-op for a presentation that has no package behind it yet. |
resolve_presentation_target(target: std::string_view) → std::string | Resolve a relationship target from presentation.xml to a part name. |
add_empty_slide_in_memory(layout: ILayoutSlide, index: std::ptrdiff_t) → Slide | Add a slide to this collection and nowhere else. The path for a presentation that has no package behind it yet; its slides are serialised from the object model at save time. |
clone_slide_internal(source_slide: Slide, index: std::ptrdiff_t, allow_clone_missing_layout: bool) → Slide | Internal implementation for cloning a slide at OPC level. |
get_next_slide_file_number() → int | Find the next available slide file number in the package. |
find_matching_layout(source_slide: Slide, dest_master: IMasterSlide, allow_clone: bool) → std::optional<std::string> | Find a matching layout in the destination master for the source slide. |
find_layout_by_type(source_layout: ILayoutSlide) → std::optional<std::string> | Find a layout in the destination presentation matching the source layout type. |
find_layout_from_layout_slides(source_layout: ILayoutSlide) → std::optional<std::string> | Find matching layout by name using layout_slides. |
get_first_layout_part_name() → std::optional<std::string> | Get the first available layout part name in the destination presentation. |
clone_master_chain_for_slide(source_slide: Slide, source_layout: ILayoutSlide) → std::optional<std::string> | Clone the master slide chain for a slide being cloned from another presentation. |