Represents a custom (arbitrary content) part, that is not defined by the ISO/IEC 29500 standard.
This class represents an OOXML part that is a target of an "unknown relationship". All relationships not defined within ISO/IEC 29500 are considered "unknown relationships". Unknown relationships are permitted within an Office Open XML document provided that they conform to relationship markup guidelines.
Microsoft Word preserves custom parts during open/save cycles. Some additional info can be found here http://blogs.msdn.com/dmahugh/archive/2006/11/25/arbitrary-content-in-an-opc-package.aspx
Aspose.Words also roundtrips custom parts and in addition, allows to programmatically access such parts via the CustomPart and CustomPartCollection objects.
Do not confuse custom parts with Custom XML Data. Use CustomXmlPart if you need to access Custom XML Data.
Shows how to access a document's arbitrary custom parts collection.
#include <Aspose.Words.Cpp/Markup/CustomPart.h>
Public Member Functions | |
CustomPart () | |
SharedPtr< CustomPart > | Clone () |
Makes a "deep enough" copy of the object. Does not duplicate the bytes of the Data value. More... | |
String | get_ContentType () const |
Specifies the content type of this custom part. More... | |
ArrayPtr< uint8_t > | get_Data () const |
Contains the data of this custom part. More... | |
bool | get_IsExternal () const |
False if this custom part is stored inside the OOXML package. True if this custom part is an external target. More... | |
String | get_Name () const |
Gets or sets this part's absolute name within the OOXML package or the target URL. More... | |
String | get_RelationshipType () const |
Gets or sets the relationship type from the parent part to this custom part. More... | |
virtual const TypeInfo & | GetType () const override |
virtual bool | Is (const TypeInfo &target) const override |
void | set_ContentType (const String &value) |
Setter for get_ContentType. More... | |
void | set_Data (const ArrayPtr< uint8_t > &value) |
Setter for get_Data. More... | |
void | set_IsExternal (bool value) |
Setter for get_IsExternal. More... | |
void | set_Name (const String &value) |
Setter for get_Name. More... | |
void | set_RelationshipType (const String &value) |
Setter for get_RelationshipType. More... | |
Static Public Member Functions | |
static const TypeInfo & | Type () |
Aspose::Words::Markup::CustomPart::CustomPart | ( | ) |
System::SharedPtr<Aspose::Words::Markup::CustomPart> Aspose::Words::Markup::CustomPart::Clone | ( | ) |
Makes a "deep enough" copy of the object. Does not duplicate the bytes of the Data value.
Shows how to access a document's arbitrary custom parts collection.
System::String Aspose::Words::Markup::CustomPart::get_ContentType | ( | ) | const |
Specifies the content type of this custom part.
This property is applicable only when IsExternal is false
.
The default value is an empty string. A valid value must be a non-empty string.
Shows how to access a document's arbitrary custom parts collection.
System::ArrayPtr<uint8_t> Aspose::Words::Markup::CustomPart::get_Data | ( | ) | const |
Contains the data of this custom part.
This property is applicable only when IsExternal is false
.
The default value is an empty byte array. The value cannot be null
.
Shows how to access a document's arbitrary custom parts collection.
bool Aspose::Words::Markup::CustomPart::get_IsExternal | ( | ) | const |
False
if this custom part is stored inside the OOXML package. True
if this custom part is an external target.
The default value is false
.
Shows how to access a document's arbitrary custom parts collection.
System::String Aspose::Words::Markup::CustomPart::get_Name | ( | ) | const |
Gets or sets this part's absolute name within the OOXML package or the target URL.
If the relationship target is internal, then this property is the absolute part name within the package. If the relationship target is external, then this property is the target URL.
The default value is an empty string. A valid value must be a non-empty string.
Shows how to access a document's arbitrary custom parts collection.
System::String Aspose::Words::Markup::CustomPart::get_RelationshipType | ( | ) | const |
Gets or sets the relationship type from the parent part to this custom part.
The relationship type for a custom part must be "unknown" e.g. a custom relationship type, not one of the relationship types defined within ISO/IEC 29500.
The default value is an empty string. A valid value must be a non-empty string.
Shows how to access a document's arbitrary custom parts collection.
|
overridevirtual |
Reimplemented from System::Object.
|
overridevirtual |
Reimplemented from System::Object.
void Aspose::Words::Markup::CustomPart::set_ContentType | ( | const System::String & | value | ) |
void Aspose::Words::Markup::CustomPart::set_Data | ( | const System::ArrayPtr< uint8_t > & | value | ) |
Setter for Aspose::Words::Markup::CustomPart::get_Data.
void Aspose::Words::Markup::CustomPart::set_IsExternal | ( | bool | value | ) |
void Aspose::Words::Markup::CustomPart::set_Name | ( | const System::String & | value | ) |
Setter for Aspose::Words::Markup::CustomPart::get_Name.
void Aspose::Words::Markup::CustomPart::set_RelationshipType | ( | const System::String & | value | ) |
|
static |