Represents a custom or built-in document property.
Shows how to work with built-in document properties.
#include <Aspose.Words.Cpp/Properties/DocumentProperty.h>
Public Member Functions | |
bool | get_IsLinkToContent () |
Shows whether this property is linked to content or not. More... | |
String | get_LinkSource () const |
Gets the source of a linked custom document property. More... | |
String | get_Name () const |
Returns the name of the property. More... | |
PropertyType | get_Type () const |
Gets the data type of the property. More... | |
SharedPtr< Object > | get_Value () |
Gets or sets the value of the property. More... | |
virtual const TypeInfo & | GetType () const override |
virtual bool | Is (const TypeInfo &target) const override |
void | set_Value (const SharedPtr< Object > &value) |
Setter for get_Value. More... | |
bool | ToBool () |
Returns the property value as bool. More... | |
ArrayPtr< uint8_t > | ToByteArray () |
Returns the property value as byte array. More... | |
DateTime | ToDateTime () |
Returns the property value as DateTime in UTC. More... | |
double | ToDouble () |
Returns the property value as double. More... | |
int32_t | ToInt () |
Returns the property value as integer. More... | |
String | ToString () const override |
Returns the property value as a string formatted according to the current locale. More... | |
Static Public Member Functions | |
static const TypeInfo & | Type () |
bool Aspose::Words::Properties::DocumentProperty::get_IsLinkToContent | ( | ) |
Shows whether this property is linked to content or not.
Shows how to link a custom document property to a bookmark.
System::String Aspose::Words::Properties::DocumentProperty::get_LinkSource | ( | ) | const |
Gets the source of a linked custom document property.
Shows how to link a custom document property to a bookmark.
System::String Aspose::Words::Properties::DocumentProperty::get_Name | ( | ) | const |
Returns the name of the property.
Cannot be null and cannot be an empty string.
Shows how to work with built-in document properties.
Aspose::Words::Properties::PropertyType Aspose::Words::Properties::DocumentProperty::get_Type | ( | ) | const |
Gets the data type of the property.
Shows how to work with built-in document properties.
Shows how to work with a document's custom properties.
System::SharedPtr<System::Object> Aspose::Words::Properties::DocumentProperty::get_Value | ( | ) |
Gets or sets the value of the property.
Cannot be null.
Shows how to work with built-in document properties.
|
overridevirtual |
Reimplemented from System::Object.
|
overridevirtual |
Reimplemented from System::Object.
void Aspose::Words::Properties::DocumentProperty::set_Value | ( | const System::SharedPtr< System::Object > & | value | ) |
bool Aspose::Words::Properties::DocumentProperty::ToBool | ( | ) |
Returns the property value as bool.
Throws an exception if the property type is not Boolean.
Shows various type conversion methods of custom document properties.
System::ArrayPtr<uint8_t> Aspose::Words::Properties::DocumentProperty::ToByteArray | ( | ) |
Returns the property value as byte array.
Throws an exception if the property type is not ByteArray.
Shows how to add a thumbnail to a document that we save as an Epub.
System::DateTime Aspose::Words::Properties::DocumentProperty::ToDateTime | ( | ) |
Returns the property value as DateTime in UTC.
Throws an exception if the property type is not DateTime.
Microsoft Word stores only the date part (no time) for custom date properties.
Shows how to create a custom document property which contains a date and time.
Shows various type conversion methods of custom document properties.
double Aspose::Words::Properties::DocumentProperty::ToDouble | ( | ) |
Returns the property value as double.
Shows various type conversion methods of custom document properties.
int32_t Aspose::Words::Properties::DocumentProperty::ToInt | ( | ) |
Returns the property value as integer.
Shows various type conversion methods of custom document properties.
|
overridevirtual |
Returns the property value as a string formatted according to the current locale.
Converts a boolean property into "Y" or "N". Converts a date property into a short date string. For all other types converts a property using Object.ToString().
Shows how to work with custom document properties.
Shows various type conversion methods of custom document properties.
Reimplemented from System::Object.
|
static |