summaryrefslogtreecommitdiff
path: root/xfa/fxfa/parser/xfa_document_datamerger_imp.cpp
diff options
context:
space:
mode:
authorDan Sinclair <dsinclair@chromium.org>2017-11-20 21:19:13 +0000
committerChromium commit bot <commit-bot@chromium.org>2017-11-20 21:19:13 +0000
commit2501ae2474c1f097a06634d647de2eb3fb730864 (patch)
tree3ac7d386a3e73f3c848c203c3f0e61af9d284c1f /xfa/fxfa/parser/xfa_document_datamerger_imp.cpp
parent89453e92d5d0b7aaf9e0c3890a90a21adc94a0ce (diff)
downloadpdfium-2501ae2474c1f097a06634d647de2eb3fb730864.tar.xz
Remove CXFA_DataData operator bool override
This CL removes CXFA_DataData::operator bool in favour of an explicit HasValidNode method. This makes the call sites a lot clearer. Change-Id: I6fae14fdeec4674ca7916e21b9e5703070fc3069 Reviewed-on: https://pdfium-review.googlesource.com/18830 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Diffstat (limited to 'xfa/fxfa/parser/xfa_document_datamerger_imp.cpp')
-rw-r--r--xfa/fxfa/parser/xfa_document_datamerger_imp.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/xfa/fxfa/parser/xfa_document_datamerger_imp.cpp b/xfa/fxfa/parser/xfa_document_datamerger_imp.cpp
index ac7fb2ec85..9e33b72936 100644
--- a/xfa/fxfa/parser/xfa_document_datamerger_imp.cpp
+++ b/xfa/fxfa/parser/xfa_document_datamerger_imp.cpp
@@ -141,7 +141,7 @@ void CreateDataBinding(CXFA_Node* pFormNode,
CXFA_ImageData imageData = defValueData.GetImageData();
WideString wsContentType;
WideString wsHref;
- if (imageData) {
+ if (imageData.HasValidNode()) {
imageData.GetContent(wsValue);
imageData.GetContentType(wsContentType);
imageData.GetHref(wsHref);
@@ -297,7 +297,7 @@ void CreateDataBinding(CXFA_Node* pFormNode,
FormValueNode_SetChildContent(defValueData.GetNode(), wsNormalizeValue,
XFA_Element::Image);
CXFA_ImageData imageData = defValueData.GetImageData();
- if (imageData) {
+ if (imageData.HasValidNode()) {
CFX_XMLElement* pXMLDataElement =
static_cast<CFX_XMLElement*>(pDataNode->GetXMLMappingNode());
ASSERT(pXMLDataElement);
@@ -333,7 +333,8 @@ void CreateDataBinding(CXFA_Node* pFormNode,
wsNormalizeValue += wsItem;
}
CXFA_ExDataData exData = defValueData.GetExData();
- ASSERT(exData);
+ ASSERT(exData.HasValidNode());
+
exData.SetContentType(single ? L"text/plain" : L"text/xml");
}
FormValueNode_SetChildContent(defValueData.GetNode(), wsNormalizeValue,