DocumentProperties

DocumentProperties class

Represents properties of a presentation.

class DocumentProperties : public Aspose::Slides::IDocumentProperties,
                           public Aspose::Slides::IGenericCloneable<System::SharedPtr<Aspose::Slides::IDocumentProperties>>

Methods

MethodDescription
void ClearBuiltInProperties() overrideClears and sets default values for all builtIn properties.
void ClearCustomProperties() overrideRemoves all custom properties.
System::SharedPtr<System::Object> Clone() overrideClones current object
System::SharedPtr<IDocumentProperties> CloneT() overrideClones current object
bool ContainsCustomProperty(System::String) overrideCheck presents of a custom property with a specified name.
DocumentProperties()Initializes new instance of class DocumentProperties.
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::String get_ApplicationTemplate() overrideReturns the template of a application. Read System::String.
System::String get_AppVersion() overrideReturns the app version. Read-only System::String.
System::String get_Author() overrideReturns the author of a presentation. Read System::String.
System::String get_Category() overrideReturns the category of a presentation. Read System::String.
System::String get_Comments() overrideReturns the comments of a presentation. Read System::String.
System::String get_Company() overrideReturns the company property. Read System::String.
System::String get_ContentStatus() overrideReturns the content status of a presentation. Read System::String.
System::String get_ContentType() overrideReturns the content type of a presentation. Read System::String.
int32_t get_CountOfCustomProperties() overrideReturns the number of custom properties actually contained in a collection. Read-only int32_t.
System::DateTime get_CreatedTime() overrideReturns the date a presentation was created. Values are in UTC. Read System::DateTime.
System::ArrayPtr<System::SharedPtr<IHeadingPair>> get_HeadingPairs() overrideIndicates the grouping of document parts and the number of parts in each group. Read-only T:IHeadingPair[].
int32_t get_HiddenSlides() overrideReturns the number of hidden slides in a presentation document. Read-only int32_t.
System::String get_HyperlinkBase() overrideReturns the HyperlinkBase document property. Read System::String.
bool get_HyperlinksChanged() overrideSpecifies that one or more hyperlinks in this part were updated exclusively in this part by a producer. The next producer to open this document shall update the hyperlink relationships with the new hyperlinks specified in this part. Read bool.
System::String get_Keywords() overrideReturns the keywords of a presentation. Read System::String.
System::DateTime get_LastPrinted() overrideReturns the date when a presentation was printed last time. Read System::DateTime.
System::String get_LastSavedBy() overrideReturns the name of a last person who modified a presentation. Read System::String.
System::DateTime get_LastSavedTime() overrideReturns the date a presentation was last modified. Values are in UTC. Read-only in case of Presentation::get_DocumentProperties (because it will be updated internally while IPresentation object saving process). Can be changed via DocumentProperties instance returning by method IPresentationInfo::ReadDocumentProperties Please see the example in IPresentationInfo::UpdateDocumentProperties method summary.
bool get_LinksUpToDate() overrideIndicates whether hyperlinks in a document are up-to-date. Set this element to true to indicate that hyperlinks are updated. Set this element to false to indicate that hyperlinks are outdated. Read bool.
System::String get_Manager() overrideReturns the manager property. Read System::String.
int32_t get_MultimediaClips() overrideReturns the total number of sound or video clips that are present in the document. Read-only int32_t.
System::String get_NameOfApplication() overrideReturns the name of the application. Read System::String.
int32_t get_Notes() overrideReturns the number of slides in a presentation containing notes. Read-only int32_t.
int32_t get_Paragraphs() overrideReturns the total number of paragraphs found in a document if applicable. Read-only int32_t.
System::String get_PresentationFormat() overrideReturns the intended format of a presentation. Read System::String.
int32_t get_RevisionNumber() overrideReturns the presentation revision number. Read int32_t.
bool get_ScaleCrop() overrideIndicates the display mode of the document thumbnail. Set this element to true to enable scaling of the document thumbnail to the display. Set this element to false to enable cropping of the document thumbnail to show only sections that fits the display. Read bool.
bool get_SharedDoc() overrideDetermines whether the presentation is shared between multiple people. Read bool.
int32_t get_Slides() overrideReturns the total number of slides in a presentation document. Read-only int32_t.
System::String get_Subject() overrideReturns the subject of a presentation. Read System::String.
System::String get_Title() overrideReturns the title of a presentation. Read System::String.
System::ArrayPtr<System::String> get_TitlesOfParts() overrideSpecifies the title of each document part. These parts are not document parts but conceptual representations of document sections. Read-only System::ArrayPtrSystem::String.
System::TimeSpan get_TotalEditingTime() overrideTotal editing time of a presentation. Read System::TimeSpan.
int32_t get_Words() overrideReturns the total number of words contained in a document. Read-only int32_t.
Detail::SmartPtrCounter * GetCounter()Gets reference counter data structure associated with the object.
System::String GetCustomPropertyName(int32_t) overrideReturn a custom property name at the specified index.
void GetCustomPropertyValue(System::String, bool&) overrideGets a named boolean value from the custom properties.
void GetCustomPropertyValue(System::String, int32_t&) overrideGets a named integer value from the custom properties.
void GetCustomPropertyValue(System::String, System::DateTime&) overrideGets a named DateTime value from the custom properties.
void GetCustomPropertyValue(System::String, System::String&) overrideGets a named string value from the custom properties.
void GetCustomPropertyValue(System::String, float&) overrideGets a named float value from the custom properties.
void GetCustomPropertyValue(System::String, double&) overrideGets a named double value from the custom properties.
virtual int32_t GetHashCode() constAnalog of C# Object.GetHashCode() method. Enables hashing of custom objects.
virtual const TypeInfo& GetType() constGets actual type of object. Analog of C# System.Object.GetType() call.
System::SharedPtr<System::Object> idx_get(System::String) overrideReturns the custom property associated with a specified name. Read System::Object.
void idx_set(System::String, System::SharedPtr<System::Object>) overrideSets the custom property associated with a specified name. Write System::Object.
virtual bool Is(const TypeInfo&) constCheck if object represents an instance of type described by targetType. Analog of C# ‘is’ operator.
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.
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.
bool RemoveCustomProperty(System::String) overrideRemove a custom property associated with a specified name.
int RemovedSharedRefs(int)Decreases shared reference count by specified value.
void set_ApplicationTemplate(System::String) overrideSets the template of a application. Write System::String.
void set_Author(System::String) overrideSets the author of a presentation. Write System::String.
void set_Category(System::String) overrideSets the category of a presentation. Write System::String.
void set_Comments(System::String) overrideSets the comments of a presentation. Write System::String.
void set_Company(System::String) overrideSets the company property. Write System::String.
void set_ContentStatus(System::String) overrideSets the content status of a presentation. Write System::String.
void set_ContentType(System::String) overrideSets the content type of a presentation. Write System::String.
void set_CreatedTime(System::DateTime) overrideReturns the date a presentation was created. Values are in UTC. Write System::DateTime.
void set_HyperlinkBase(System::String) overrideSets the HyperlinkBase document property. Write System::String.
void set_HyperlinksChanged(bool) overrideSpecifies that one or more hyperlinks in this part were updated exclusively in this part by a producer. The next producer to open this document shall update the hyperlink relationships with the new hyperlinks specified in this part. Write bool.
void set_Keywords(System::String) overrideSets the keywords of a presentation. Write System::String.
void set_LastPrinted(System::DateTime) overrideReturns the date when a presentation was printed last time. Write System::DateTime.
void set_LastSavedBy(System::String) overrideSets the name of a last person who modified a presentation. Write System::String.
void set_LastSavedTime(System::DateTime) overrideReturns the date a presentation was last modified. Values are in UTC. Read-only in case of Presentation::get_DocumentProperties (because it will be updated internally while IPresentation object saving process). Can be changed via DocumentProperties instance returning by method IPresentationInfo::ReadDocumentProperties Please see the example in IPresentationInfo::UpdateDocumentProperties method summary.
void set_LinksUpToDate(bool) overrideIndicates whether hyperlinks in a document are up-to-date. Set this element to true to indicate that hyperlinks are updated. Set this element to false to indicate that hyperlinks are outdated. Write bool.
void set_Manager(System::String) overrideSets the manager property. Write System::String.
void set_NameOfApplication(System::String) overrideSets the name of the application. Write System::String.
void set_PresentationFormat(System::String) overrideSets the intended format of a presentation. Write System::String.
void set_RevisionNumber(int32_t) overrideSets the presentation revision number. Write int32_t.
void set_ScaleCrop(bool) overrideIndicates the display mode of the document thumbnail. Set this element to true to enable scaling of the document thumbnail to the display. Set this element to false to enable cropping of the document thumbnail to show only sections that fits the display. Write bool.
void set_SharedDoc(bool) overrideDetermines whether the presentation is shared between multiple people. Write bool.
void set_Subject(System::String) overrideSets the subject of a presentation. Write System::String.
void set_Title(System::String) overrideSets the title of a presentation. Write System::String.
void set_TotalEditingTime(System::TimeSpan) overrideTotal editing time of a presentation. Write System::TimeSpan.
void SetCustomPropertyValue(System::String, bool) overrideSets a named boolean custom property.
void SetCustomPropertyValue(System::String, int32_t) overrideSets a named integer custom property.
void SetCustomPropertyValue(System::String, System::DateTime) overrideSets a named DateTime custom property.
void SetCustomPropertyValue(System::String, System::String) overrideSets a named string custom property.
void SetCustomPropertyValue(System::String, float) overrideSets a named float custom property.
void SetCustomPropertyValue(System::String, double) overrideSets a named double custom property.
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 access built-in Properties of PowerPoint Presentation.

// Instantiate the Presentation class that represents the presentation
auto pres = System::MakeObject<Presentation>(dataDir + u"AccessBuiltin Properties.pptx");

// Create a reference to IDocumentProperties object associated with Presentation
System::SharedPtr<IDocumentProperties> documentProperties = pres->get_DocumentProperties();
// Display the builtin properties
System::Console::WriteLine(System::String(u"Category : ") + documentProperties->get_Category());
System::Console::WriteLine(System::String(u"Current Status : ") + documentProperties->get_ContentStatus());
System::Console::WriteLine(System::String(u"Creation Date : ") + documentProperties->get_CreatedTime());
System::Console::WriteLine(System::String(u"Author : ") + documentProperties->get_Author());
System::Console::WriteLine(System::String(u"Description : ") + documentProperties->get_Comments());

The following example shows how to modify built-in Properties of PowerPoint Presentation.

// Instantiate the Presentation class that represents the Presentation
auto presentation = System::MakeObject<Presentation>(dataDir + u"ModifyBuiltinProperties.pptx");

// Create a reference to IDocumentProperties object associated with Presentation
System::SharedPtr<IDocumentProperties> documentProperties = presentation->get_DocumentProperties();
// Set the builtin properties
documentProperties->set_Author(u"Aspose.Slides for .NET");
documentProperties->set_Title(u"Modifying Presentation Properties");
documentProperties->set_Subject(u"Aspose Subject");
// Save your presentation to a file
presentation->Save(u"DocumentProperties_out.pptx", SaveFormat::Pptx);

See Also