diff options
author | Dan Sinclair <dsinclair@chromium.org> | 2018-01-11 14:26:51 +0000 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2018-01-11 14:26:51 +0000 |
commit | 188b2e0333d161ffbac7c896f443b886b113b26a (patch) | |
tree | deceede8e90401a0df24d3ef79edbce4e6d3bad4 /xfa/fxfa/cxfa_widgetacc.cpp | |
parent | 7981d15a799e3bdfaf6bd3e04fc08a6a43d143ec (diff) | |
download | pdfium-188b2e0333d161ffbac7c896f443b886b113b26a.tar.xz |
Rename GetDefaultValue to GetDefaultValueIfExists
This CL makes it explicit that GetDefaultValue can return nullptr.
Change-Id: I871704e291358bc85a554e4f6410953f7223c61d
Reviewed-on: https://pdfium-review.googlesource.com/22683
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'xfa/fxfa/cxfa_widgetacc.cpp')
-rw-r--r-- | xfa/fxfa/cxfa_widgetacc.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/xfa/fxfa/cxfa_widgetacc.cpp b/xfa/fxfa/cxfa_widgetacc.cpp index 2714711205..5c2c168343 100644 --- a/xfa/fxfa/cxfa_widgetacc.cpp +++ b/xfa/fxfa/cxfa_widgetacc.cpp @@ -375,7 +375,7 @@ void CXFA_WidgetAcc::ResetData() { XFA_Element eUIType = GetUIType(); switch (eUIType) { case XFA_Element::ImageEdit: { - CXFA_Value* imageValue = m_pNode->GetDefaultValue(); + CXFA_Value* imageValue = m_pNode->GetDefaultValueIfExists(); CXFA_Image* image = imageValue ? imageValue->GetImage() : nullptr; WideString wsContentType, wsHref; if (image) { @@ -396,7 +396,7 @@ void CXFA_WidgetAcc::ResetData() { bool done = false; if (wsValue.IsEmpty()) { - CXFA_Value* defValue = pAcc->GetNode()->GetDefaultValue(); + CXFA_Value* defValue = pAcc->GetNode()->GetDefaultValueIfExists(); if (defValue) { wsValue = defValue->GetChildValueContent(); SetValue(XFA_VALUEPICTURE_Raw, wsValue); @@ -426,7 +426,7 @@ void CXFA_WidgetAcc::ResetData() { case XFA_Element::ChoiceList: ClearAllSelections(); default: { - CXFA_Value* defValue = m_pNode->GetDefaultValue(); + CXFA_Value* defValue = m_pNode->GetDefaultValueIfExists(); if (defValue) wsValue = defValue->GetChildValueContent(); |