DocumentProperties
Contents
[
Hide
]DocumentProperties class
Represents properties of a presentation.
class DocumentProperties : public Aspose::Slides::IDocumentProperties,
public Aspose::Slides::IGenericCloneable<System::SharedPtr<Aspose::Slides::IDocumentProperties>>
Methods
Method | Description |
---|---|
void ClearBuiltInProperties() override | Clears and sets default values for all builtIn properties. |
void ClearCustomProperties() override | Removes all custom properties. |
System::SharedPtr<System::Object> Clone() override | Clones current object |
System::SharedPtr<IDocumentProperties> CloneT() override | Clones current object |
bool ContainsCustomProperty(System::String) override | Check 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 **) const | For internal purposes only. |
System::String get_ApplicationTemplate() override | Returns the template of a application. Read System::String. |
System::String get_AppVersion() override | Returns the app version. Read-only System::String. |
System::String get_Author() override | Returns the author of a presentation. Read System::String. |
System::String get_Category() override | Returns the category of a presentation. Read System::String. |
System::String get_Comments() override | Returns the comments of a presentation. Read System::String. |
System::String get_Company() override | Returns the company property. Read System::String. |
System::String get_ContentStatus() override | Returns the content status of a presentation. Read System::String. |
System::String get_ContentType() override | Returns the content type of a presentation. Read System::String. |
int32_t get_CountOfCustomProperties() override | Returns the number of custom properties actually contained in a collection. Read-only int32_t. |
System::DateTime get_CreatedTime() override | Returns the date a presentation was created. Values are in UTC. Read System::DateTime. |
System::String get_HyperlinkBase() override | Returns the HyperlinkBase document property. Read System::String. |
System::String get_Keywords() override | Returns the keywords of a presentation. Read System::String. |
System::DateTime get_LastPrinted() override | Returns the date when a presentation was printed last time. Read System::DateTime. |
System::String get_LastSavedBy() override | Returns the name of a last person who modified a presentation. Read System::String. |
System::DateTime get_LastSavedTime() override | Returns 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. |
System::String get_Manager() override | Returns the manager property. Read System::String. |
System::String get_NameOfApplication() override | Returns the name of the application. Read System::String. |
System::String get_PresentationFormat() override | Returns the intended format of a presentation. Read System::String. |
int32_t get_RevisionNumber() override | Returns the presentation revision number. Read int32_t. |
bool get_SharedDoc() override | Determines whether the presentation is shared between multiple people. Read bool. |
System::String get_Subject() override | Returns the subject of a presentation. Read System::String. |
System::String get_Title() override | Returns the title of a presentation. Read System::String. |
System::TimeSpan get_TotalEditingTime() override | Total editing time of a presentation. Read System::TimeSpan. |
Detail::SmartPtrCounter * GetCounter() | Gets reference counter data structure associated with the object. |
System::String GetCustomPropertyName(int32_t) override | Return a custom property name at the specified index. |
void GetCustomPropertyValue(System::String, bool&) override | Gets a named boolean value from the custom properties. |
void GetCustomPropertyValue(System::String, int32_t&) override | Gets a named integer value from the custom properties. |
void GetCustomPropertyValue(System::String, System::DateTime&) override | Gets a named DateTime value from the custom properties. |
void GetCustomPropertyValue(System::String, System::String&) override | Gets a named string value from the custom properties. |
void GetCustomPropertyValue(System::String, float&) override | Gets a named float value from the custom properties. |
void GetCustomPropertyValue(System::String, double&) override | Gets a named double value from the custom properties. |
virtual int32_t GetHashCode() const | Analog of C# Object.GetHashCode() method. Enables hashing of custom objects. |
virtual const TypeInfo& GetType() const | Gets actual type of object. Analog of C# System.Object.GetType() call. |
System::SharedPtr<System::Object> idx_get(System::String) override | Returns the custom property associated with a specified name. Read System::Object. |
void idx_set(System::String, System::SharedPtr<System::Object>) override | Sets the custom property associated with a specified name. Write System::Object. |
virtual bool Is(const TypeInfo&) const | Check 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() const | Analog 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) override | Remove a custom property associated with a specified name. |
int RemovedSharedRefs(int) | Decreases shared reference count by specified value. |
void set_ApplicationTemplate(System::String) override | Sets the template of a application. Write System::String. |
void set_Author(System::String) override | Sets the author of a presentation. Write System::String. |
void set_Category(System::String) override | Sets the category of a presentation. Write System::String. |
void set_Comments(System::String) override | Sets the comments of a presentation. Write System::String. |
void set_Company(System::String) override | Sets the company property. Write System::String. |
void set_ContentStatus(System::String) override | Sets the content status of a presentation. Write System::String. |
void set_ContentType(System::String) override | Sets the content type of a presentation. Write System::String. |
void set_CreatedTime(System::DateTime) override | Returns the date a presentation was created. Values are in UTC. Write System::DateTime. |
void set_HyperlinkBase(System::String) override | Sets the HyperlinkBase document property. Write System::String. |
void set_Keywords(System::String) override | Sets the keywords of a presentation. Write System::String. |
void set_LastPrinted(System::DateTime) override | Returns the date when a presentation was printed last time. Write System::DateTime. |
void set_LastSavedBy(System::String) override | Sets the name of a last person who modified a presentation. Write System::String. |
void set_LastSavedTime(System::DateTime) override | Returns 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_Manager(System::String) override | Sets the manager property. Write System::String. |
void set_NameOfApplication(System::String) override | Sets the name of the application. Write System::String. |
void set_PresentationFormat(System::String) override | Sets the intended format of a presentation. Write System::String. |
void set_RevisionNumber(int32_t) override | Sets the presentation revision number. Write int32_t. |
void set_SharedDoc(bool) override | Determines whether the presentation is shared between multiple people. Write bool. |
void set_Subject(System::String) override | Sets the subject of a presentation. Write System::String. |
void set_Title(System::String) override | Sets the title of a presentation. Write System::String. |
void set_TotalEditingTime(System::TimeSpan) override | Total editing time of a presentation. Write System::TimeSpan. |
void SetCustomPropertyValue(System::String, bool) override | Sets a named boolean custom property. |
void SetCustomPropertyValue(System::String, int32_t) override | Sets a named integer custom property. |
void SetCustomPropertyValue(System::String, System::DateTime) override | Sets a named DateTime custom property. |
void SetCustomPropertyValue(System::String, System::String) override | Sets a named string custom property. |
void SetCustomPropertyValue(System::String, float) override | Sets a named float custom property. |
void SetCustomPropertyValue(System::String, double) override | Sets 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() const | Gets 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() const | Analog 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
- Class IDocumentProperties
- Class IGenericCloneable
- Namespace Aspose::Slides
- Library Aspose.Slides