Presentation

Presentation class

Represents a Microsoft PowerPoint presentation.

class Presentation : public Aspose::Slides::IPresentation,
                     public Aspose::Slides::IDOMObject

Methods

MethodDescription
void Dispose() overrideReleases all resources used by this Presentation object.
virtual bool Equals(ptr)Compares objects using C# Object.Equals semantics.
static std::enable_if<IsSmartPtr<T1>::value&&IsSmartPtr<T2>::value, bool>::type Equals(T1 const&, T2 const&)Compares reference type objects in C# style.
static std::enable_if<!IsSmartPtr<T1>::value&&!IsSmartPtr<T2>::value, bool>::type Equals(T1 const&, T2 const&)Compares value type objects in C# style.
static bool Equals(float const&, float const&)Emulates C#-style floating point comparison where two NaNs are considered equal even though according to IEC 60559:1989 NaN is not equal to any value, including NaN.
static bool Equals(double const&, double const&)Emulates C#-style floating point comparison where two NaNs are considered equal even though according to IEC 60559:1989 NaN is not equal to any value, including NaN.
virtual bool FastCast(const Details::FastRttiBase&, void **) constFor internal purposes only.
System::ArrayPtr<System::SharedPtr<ICustomXmlPart>> get_AllCustomXmlParts() overrideReturns all custom data parts in the presentaion. Read-only ICustomXmlPart[].
System::SharedPtr<IAudio> get_Audio(int32_t) overrideReturn embedded audio file in the presentation at the specified index. Read-only Aspose::Slides::IAudio
System::SharedPtr<IAudioCollection> get_Audios() overrideReturns the collection of all embedded audio files in the presentation. Read-only IAudioCollection.
System::SharedPtr<ICommentAuthor> get_CommentAuthor(int32_t) overrideReturns the comment author at the specified index. Read-only Aspose::Slides::ICommentAuthor
System::SharedPtr<ICommentAuthorCollection> get_CommentAuthors() overrideReturns the collection of comments autors. Read-only ICommentAuthorCollection.
System::DateTime get_CurrentDateTime() overrideReturns date and time which will substitute content of datetime fields. Time of this Presentation object creation by default. Read System::DateTime.
System::SharedPtr<ICustomData> get_CustomData() overrideReturns the presentation’s custom data. Read-only ICustomData.
System::SharedPtr<ITextStyle> get_DefaultTextStyle() overrideReturns default text style for shapes. Read-only ITextStyle.
System::SharedPtr<IDigitalSignature> get_DigitalSignature(int32_t) overrideReturns digital signature used to sign the presentation at the specified index.
System::SharedPtr<IDigitalSignatureCollection> get_DigitalSignatures() overrideReturns the collection of signatures used to sign the presentation. Read-only IDigitalSignatureCollection.
System::SharedPtr<IDocumentProperties> get_DocumentProperties() overrideReturns DocumentProperties object which contains standard and custom document properties. Read-only IDocumentProperties.
System::SharedPtr<System::Object> get_DocumentProperty(System::String) overrideReturns custom property defined by name.
int32_t get_FirstSlideNumber() overrideRepresents the first slide number in the presentation
System::SharedPtr<IFontsManager> get_FontsManager() overrideReturns fonts manager. Read-only IFontsManager.
System::SharedPtr<IPresentationHeaderFooterManager> get_HeaderFooterManager() overrideReturns actual HeaderFooter manager. Read-only IPresentationHeaderFooterManager.
System::SharedPtr<IHyperlinkQueries> get_HyperlinkQueries() overrideProvides easy access to all hyperlinks contained in all presentation slides (not in master, layout, notes slides). Read-only IHyperlinkQueries.
System::SharedPtr<IPPImage> get_Image(int32_t) overrideReturns image in the presentation at the specified index.
System::SharedPtr<IImageCollection> get_Images() overrideReturns the collection of all images in the presentation. Read-only IImageCollection.
System::SharedPtr<IGlobalLayoutSlideCollection> get_LayoutSlides() overrideReturns a list of all layout slides that are defined in the presentation. Read-only IGlobalLayoutSlideCollection.
System::SharedPtr<IMasterSlide> get_Master(int32_t) overrideReturns a master slide defined in the presentation at the specified index. Read-only Aspose::Slides::IMasterSlide
System::SharedPtr<IMasterHandoutSlideManager> get_MasterHandoutSlideManager() overrideReturns handout master manager. Read-only IMasterHandoutSlideManager.
System::SharedPtr<IMasterNotesSlideManager> get_MasterNotesSlideManager() overrideReturns notes master manager. Read-only IMasterNotesSlideManager.
System::SharedPtr<IMasterSlideCollection> get_Masters() overrideReturns a list of all master slides that are defined in the presentation. Read-only IMasterSlideCollection.
System::SharedPtr<Theme::IMasterTheme> get_MasterTheme() overrideReturns master theme. Read-only Theme::IMasterTheme.
System::SharedPtr<INotesSize> get_NotesSize() overrideReturns notes slide size object. Read-only INotesSize.
System::SharedPtr<IProtectionManager> get_ProtectionManager() overrideGets manager of the permissions for this presentation. Read-only IProtectionManager.
System::SharedPtr<ISection> get_Section(int32_t) overrideReturns a slide section defined in the presentation at the specified index. Read-only Aspose::Slides::ISection
System::SharedPtr<ISectionCollection> get_Sections() overrideReturns a list of all slides sections that are defined in the presentation. Read-only ISectionCollection.
System::SharedPtr<ISlide> get_Slide(int32_t) overrideReturns a slide defined in the presentation at the specified index. Read-only Aspose::Slides::ISlide.
System::SharedPtr<ISlideCollection> get_Slides() overrideReturns a list of all slides that are defined in the presentation. Read-only ISlideCollection.
System::SharedPtr<Aspose::Slides::SlideShowSettings> get_SlideShowSettings() constReturns the slide show settings for the presentation.
System::SharedPtr<ISlideSize> get_SlideSize() overrideReturns slide size object. Read-only ISlideSize.
Aspose::Slides::SourceFormat get_SourceFormat() overrideReturns information about from which format presentation was loaded. Read-only SourceFormat.
System::SharedPtr<Vba::IVbaProject> get_VbaProject() overrideGets VBA project with presentation macros. Read Vba::IVbaProject.
System::SharedPtr<IVideo> get_Video(int32_t) overrideReturn embedded video file in the presentation at the specified index. Read-only Aspose::Slides::IVideo
System::SharedPtr<IVideoCollection> get_Videos() overrideReturns the collection of all embedded video files in the presentation. Read-only IVideoCollection.
System::SharedPtr<IViewProperties> get_ViewProperties() overrideGets presentation wide view properties. Read-only IViewProperties.
Detail::SmartPtrCounter * GetCounter()Gets reference counter data structure associated with the object.
virtual int32_t GetHashCode() constAnalog of C# Object.GetHashCode() method. Enables hashing of custom objects.
System::ArrayPtr<System::SharedPtr<IImage>> GetImages(System::SharedPtr<Export::IRenderingOptions>) overrideReturns a Image objects for all slides of a presentation.
System::ArrayPtr<System::SharedPtr<IImage>> GetImages(System::SharedPtr<Export::IRenderingOptions>, System::ArrayPtr<int32_t>) overrideReturns a Thumbnail Image objects for specified slides of a presentation.
System::ArrayPtr<System::SharedPtr<IImage>> GetImages(System::SharedPtr<Export::IRenderingOptions>, float, float) overrideReturns a Thumbnail Image objects for all slides of a presentation with custom scaling.
System::ArrayPtr<System::SharedPtr<IImage>> GetImages(System::SharedPtr<Export::IRenderingOptions>, System::ArrayPtr<int32_t>, float, float) overrideReturns a Thumbnail Image objects for specified slides of a presentation with custom scaling.
System::ArrayPtr<System::SharedPtr<IImage>> GetImages(System::SharedPtr<Export::IRenderingOptions>, System::Drawing::Size) overrideReturns a Thumbnail Image objects for all slides of a presentation with specified size.
System::ArrayPtr<System::SharedPtr<IImage>> GetImages(System::SharedPtr<Export::IRenderingOptions>, System::ArrayPtr<int32_t>, System::Drawing::Size) overrideReturns a Thumbnail Image objects for specified slides of a presentation with specified size.
System::SharedPtr<IBaseSlide> GetSlideById(uint32_t) overrideReturns a Slide, MasterSlide or LayoutSlide by Id.
System::ArrayPtr<System::SharedPtr<System::Drawing::Bitmap>> GetThumbnails(System::SharedPtr<Export::IRenderingOptions>) overrideReturns a Thumbnail Bitmap objects for all slides of a presentation.
System::ArrayPtr<System::SharedPtr<System::Drawing::Bitmap>> GetThumbnails(System::SharedPtr<Export::IRenderingOptions>, System::ArrayPtr<int32_t>) overrideReturns a Thumbnail Bitmap objects for specified slides of a presentation.
System::ArrayPtr<System::SharedPtr<System::Drawing::Bitmap>> GetThumbnails(System::SharedPtr<Export::IRenderingOptions>, float, float) overrideReturns a Thumbnail Bitmap objects for all slides of a presentation with custom scaling.
System::ArrayPtr<System::SharedPtr<System::Drawing::Bitmap>> GetThumbnails(System::SharedPtr<Export::IRenderingOptions>, System::ArrayPtr<int32_t>, float, float) overrideReturns a Thumbnail Bitmap objects for specified slides of a presentation with custom scaling.
System::ArrayPtr<System::SharedPtr<System::Drawing::Bitmap>> GetThumbnails(System::SharedPtr<Export::IRenderingOptions>, System::Drawing::Size) overrideReturns a Thumbnail Bitmap objects for all slides of a presentation with specified size.
System::ArrayPtr<System::SharedPtr<System::Drawing::Bitmap>> GetThumbnails(System::SharedPtr<Export::IRenderingOptions>, System::ArrayPtr<int32_t>, System::Drawing::Size) overrideReturns a Thumbnail Bitmap objects for specified slides of a presentation with specified size.
virtual const TypeInfo& GetType() constGets actual type of object. Analog of C# System.Object.GetType() call.
void HighlightRegex(System::SharedPtr<System::Text::RegularExpressions::Regex>, System::Drawing::Color, System::SharedPtr<IFindResultCallback>) overrideHighlights all matches of the regular expression with the specified color.
void HighlightText(System::String, System::Drawing::Color) overrideHighlights all matches of the sample text with the specified color.
void HighlightText(System::String, System::Drawing::Color, System::SharedPtr<ITextSearchOptions>, System::SharedPtr<IFindResultCallback>) overrideHighlights all matches of the sample text with the specified color.
virtual bool Is(const TypeInfo&) constCheck if object represents an instance of type described by targetType. Analog of C# ‘is’ operator.
void JoinPortionsWithSameFormatting() overrideJoins runs with same formatting in all paragraphs in all acceptable shapes in all slides.
void Lock()Implements C# lock() statement locking. Call directly or use LockContext sentry object.
virtual ptr MemberwiseClone() constAnalog of C# Object.MemberwiseClone() method. Enables cloning custom types.
Object()Creates object. Initializes all internal data structures.
Object(Object const&)Copy constructor. Doesn’t copy anything, really, just initializes new object and enables copy constructing subclasses.
Object& operator=(Object const&)Assignment operator. Doesn’t copy anything, really, just initializes new object and enables copy constructing subclasses.
Presentation()This constructor creates new presentation from scratch. Created presentation has one empty slide.
Presentation(System::SharedPtr<Aspose::Slides::LoadOptions>)This constructor creates new presentation from scratch. Created presentation has one empty slide.
Presentation(System::SharedPtr<System::IO::Stream>)This constructor is the primary mechanism for reading an existing Presentation.
Presentation(System::SharedPtr<System::IO::Stream>, System::SharedPtr<Aspose::Slides::LoadOptions>)This constructor is the primary mechanism for reading an existing Presentation.
Presentation(System::String)This constructor gets a source file path from which the contents of the Presentation are read.
Presentation(System::String, System::SharedPtr<Aspose::Slides::LoadOptions>)This constructor gets a source file path from which the contents of the Presentation are read.
static bool ReferenceEquals(ptr const&, ptr const&)Compares objects by reference.
static std::enable_if<!IsSmartPtr<T>::value, bool>::type ReferenceEquals(T const&, T const&)Compares objects by reference.
static std::enable_if<!IsSmartPtr<T>::value, bool>::type ReferenceEquals(T const&, std::nullptr_t)Reference-compares value type object with nullptr.
bool ReferenceEquals(String const&, std::nullptr_t)Specialization of Object::ReferenceEquals for case of string and nullptr.
bool ReferenceEquals(String const&, String const&)Specialization of Object::ReferenceEquals for case of strings.
int RemovedSharedRefs(int)Decreases shared reference count by specified value.
void ReplaceRegex(System::SharedPtr<System::Text::RegularExpressions::Regex>, System::String, System::SharedPtr<IFindResultCallback>) overrideReplaces all matches of the regular expression with the specified string.
void ReplaceText(System::String, System::String, System::SharedPtr<ITextSearchOptions>, System::SharedPtr<IFindResultCallback>) overrideReplaces all occurrences of the specified text with another specified text.
void Save(System::String, Export::SaveFormat) overrideSaves all slides of a presentation to a file with the specified format.
void Save(System::SharedPtr<System::IO::Stream>, Export::SaveFormat) overrideSaves all slides of a presentation to a stream in the specified format.
void Save(System::String, Export::SaveFormat, System::SharedPtr<Export::ISaveOptions>) overrideSaves all slides of a presentation to a file with the specified format and with additional options.
void Save(System::SharedPtr<System::IO::Stream>, Export::SaveFormat, System::SharedPtr<Export::ISaveOptions>) overrideSaves all slides of a presentation to a stream in the specified format and with additional options.
void Save(System::SharedPtr<Export::Xaml::IXamlOptions>) overrideSaves all slides of a presentation to a set of files representing XAML markup.
void Save(System::String, System::ArrayPtr<int32_t>, Export::SaveFormat) overrideSaves specified slides of a presentation to a file with the specified format with page number keeping.
void Save(System::String, System::ArrayPtr<int32_t>, Export::SaveFormat, System::SharedPtr<Export::ISaveOptions>) overrideSaves specified slides of a presentation to a file with the specified format with page number keeping.
void Save(System::SharedPtr<System::IO::Stream>, System::ArrayPtr<int32_t>, Export::SaveFormat) overrideSaves specified slides of a presentation to a stream in the specified format with page number keeping.
void Save(System::SharedPtr<System::IO::Stream>, System::ArrayPtr<int32_t>, Export::SaveFormat, System::SharedPtr<Export::ISaveOptions>) overrideSaves specified slides of a presentation to a stream in the specified format with page number keeping.
void Save(System::String, Export::SaveFormat, System::SharedPtr<System::Web::HttpResponse>, bool) overrideSends the presentation to the client browser. This method is absent in ClientProfile versions of Aspose.Slide.
void Save(System::String, Export::SaveFormat, System::SharedPtr<Export::ISaveOptions>, System::SharedPtr<System::Web::HttpResponse>, bool) overrideSends the presentation to the client browser. This method is absent in ClientProfile versions of Aspose.Slide.
void set_CurrentDateTime(System::DateTime) overrideSets date and time which will substitute content of datetime fields. Time of this Presentation object creation by default. Write System::DateTime.
void set_DocumentProperty(System::String, System::SharedPtr<System::Object>) overrideSet custom property defined by name.
void set_FirstSlideNumber(int32_t) overrideRepresents the first slide number in the presentation
void set_VbaProject(System::SharedPtr<Vba::IVbaProject>) overrideSets VBA project with presentation macros. Write Vba::IVbaProject.
virtual void SetTemplateWeakPtr(uint32_t)Set n’th template argument a weak pointer (rather than shared). Allows switching pointers in containers to weak mode.
int SharedCount() constGets current value of shared reference counter.
Object * SharedRefAdded()Increments shared reference count. Shouldn’t be called directly; instead, use smart pointers or ThisProtector.
int SharedRefRemovedSafe()Decrements and returns shared reference count. Shouldn’t be called directly; instead, use smart pointers or ThisProtector.
virtual String ToString() constAnalog of C# Object.ToString() method. Enables converting custom objects to string.
static const TypeInfo& Type()Implements C# typeof(System.Object) construct.
void Unlock()Implements C# lock() statement unlocking. Call directly or use LockContext sentry object.
Detail::SmartPtrCounter * WeakRefAdded()Increments weak reference count. Shouldn’t be called directly; instead, use smart pointers or ThisProtector.
void WeakRefRemoved()Decrements weak reference count. Shouldn’t be called directly; instead, use smart pointers or ThisProtector.
virtual ~Object()Destroys object. Frees all internal data structures.

Remarks

The following example shows how to create PowerPoint Presentation.

// Instantiate a Presentation object that represents a presentation file
System::SharedPtr<Presentation> presentation = System::MakeObject<Presentation>();

// Get the first slide
auto slide = presentation->get_Slides()->idx_get(0);
// Add an autoshape of type line
slide->get_Shapes()->AddAutoShape(ShapeType::Line, 50.0f, 150.0f, 300.0f, 0.0f);
// Save the presentation file.
presentation->Save(u"NewPresentation_out.pptx", SaveFormat::Pptx);

The following example shows how to open and save Presentation.

// Load any supported file in Presentation e.g. ppt, pptx, odp etc.
System::SharedPtr<Presentation> presentation = System::MakeObject<Presentation>(u"Sample.odp");

// Save the presentation file.
presentation->Save(u"OutputPresenation.pptx", SaveFormat::Pptx);

See Also