diff options
Diffstat (limited to 'xfa/fxfa/parser/cxfa_image.cpp')
-rw-r--r-- | xfa/fxfa/parser/cxfa_image.cpp | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/xfa/fxfa/parser/cxfa_image.cpp b/xfa/fxfa/parser/cxfa_image.cpp index 928738109e..88ca977bb2 100644 --- a/xfa/fxfa/parser/cxfa_image.cpp +++ b/xfa/fxfa/parser/cxfa_image.cpp @@ -39,3 +39,37 @@ CXFA_Image::CXFA_Image(CXFA_Document* doc, XFA_PacketType packet) kName) {} CXFA_Image::~CXFA_Image() {} + +XFA_AttributeEnum CXFA_Image::GetAspect() { + return JSObject()->GetEnum(XFA_Attribute::Aspect); +} + +WideString CXFA_Image::GetContentType() { + return JSObject()->TryCData(XFA_Attribute::ContentType, true).value_or(L""); +} + +WideString CXFA_Image::GetHref() { + return JSObject()->TryCData(XFA_Attribute::Href, true).value_or(L""); +} + +XFA_AttributeEnum CXFA_Image::GetTransferEncoding() { + return static_cast<XFA_AttributeEnum>( + JSObject()->GetEnum(XFA_Attribute::TransferEncoding)); +} + +WideString CXFA_Image::GetContent() { + return JSObject()->TryContent(false, true).value_or(L""); +} + +void CXFA_Image::SetContentType(const WideString& wsContentType) { + JSObject()->SetCData(XFA_Attribute::ContentType, wsContentType, false, false); +} + +void CXFA_Image::SetHref(const WideString& wsHref) { + JSObject()->SetCData(XFA_Attribute::Href, wsHref, false, false); +} + +void CXFA_Image::SetTransferEncoding(XFA_AttributeEnum iTransferEncoding) { + JSObject()->SetEnum(XFA_Attribute::TransferEncoding, iTransferEncoding, + false); +} |