summaryrefslogtreecommitdiff
path: root/xfa/fxfa/parser/xfa_document_datamerger_imp.cpp
diff options
context:
space:
mode:
authorDan Sinclair <dsinclair@chromium.org>2018-01-16 15:49:16 +0000
committerChromium commit bot <commit-bot@chromium.org>2018-01-16 15:49:16 +0000
commit316dd2fcd64d0cda1e1b2cdc39ca541a57766b35 (patch)
treeaf3745a818839a7cebc92927f9e115c429bbbe0b /xfa/fxfa/parser/xfa_document_datamerger_imp.cpp
parentd021ad2f6306ae9d7b2ab5acf225c3bd8e957f8f (diff)
downloadpdfium-316dd2fcd64d0cda1e1b2cdc39ca541a57766b35.tar.xz
Rename CXFA_Value methods for clarity
This CL marks the methods in CXFA_Value to make it clear which can return nullptr and updates callsites as needed. Change-Id: If1f794bcbbddaa57a1efdd67195df58a77b4373a Reviewed-on: https://pdfium-review.googlesource.com/22773 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 3332d90b66..65746c5caf 100644
--- a/xfa/fxfa/parser/xfa_document_datamerger_imp.cpp
+++ b/xfa/fxfa/parser/xfa_document_datamerger_imp.cpp
@@ -140,7 +140,7 @@ void CreateDataBinding(CXFA_Node* pFormNode,
WideString wsValue;
switch (eUIType) {
case XFA_Element::ImageEdit: {
- CXFA_Image* image = defValue ? defValue->GetImage() : nullptr;
+ CXFA_Image* image = defValue ? defValue->GetImageIfExists() : nullptr;
WideString wsContentType;
WideString wsHref;
if (image) {
@@ -293,7 +293,7 @@ void CreateDataBinding(CXFA_Node* pFormNode,
case XFA_Element::ImageEdit: {
FormValueNode_SetChildContent(defValue, wsNormalizeValue,
XFA_Element::Image);
- CXFA_Image* image = defValue ? defValue->GetImage() : nullptr;
+ CXFA_Image* image = defValue ? defValue->GetImageIfExists() : nullptr;
if (image) {
CFX_XMLElement* pXMLDataElement =
static_cast<CFX_XMLElement*>(pDataNode->GetXMLMappingNode());
@@ -329,7 +329,8 @@ void CreateDataBinding(CXFA_Node* pFormNode,
wsNormalizeValue += wsItem;
}
- CXFA_ExData* exData = defValue ? defValue->GetExData() : nullptr;
+ CXFA_ExData* exData =
+ defValue ? defValue->GetExDataIfExists() : nullptr;
ASSERT(exData);
exData->SetContentType(single ? L"text/plain" : L"text/xml");