summaryrefslogtreecommitdiff
path: root/xfa/fxfa/parser/cxfa_document.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'xfa/fxfa/parser/cxfa_document.cpp')
-rw-r--r--xfa/fxfa/parser/cxfa_document.cpp7
1 files changed, 2 insertions, 5 deletions
diff --git a/xfa/fxfa/parser/cxfa_document.cpp b/xfa/fxfa/parser/cxfa_document.cpp
index 3e8046677a..3b086faf69 100644
--- a/xfa/fxfa/parser/cxfa_document.cpp
+++ b/xfa/fxfa/parser/cxfa_document.cpp
@@ -510,9 +510,8 @@ void CreateDataBinding(CXFA_Node* pFormNode,
wsHref = image->GetHref();
}
CFX_XMLElement* pXMLDataElement =
- static_cast<CFX_XMLElement*>(pDataNode->GetXMLMappingNode());
+ ToXMLElement(pDataNode->GetXMLMappingNode());
ASSERT(pXMLDataElement);
-
pDataNode->JSObject()->SetAttributeValue(
wsValue, pFormNode->GetFormatDataValue(wsValue), false, false);
pDataNode->JSObject()->SetCData(XFA_Attribute::ContentType,
@@ -656,9 +655,7 @@ void CreateDataBinding(CXFA_Node* pFormNode,
CXFA_Image* image = defValue ? defValue->GetImageIfExists() : nullptr;
if (image) {
CFX_XMLElement* pXMLDataElement =
- static_cast<CFX_XMLElement*>(pDataNode->GetXMLMappingNode());
- ASSERT(pXMLDataElement);
-
+ ToXMLElement(pDataNode->GetXMLMappingNode());
WideString wsContentType =
pXMLDataElement->GetAttribute(L"xfa:contentType");
if (!wsContentType.IsEmpty()) {