summaryrefslogtreecommitdiff
path: root/xfa/fxfa/parser/cxfa_choicelist.cpp
diff options
context:
space:
mode:
authorDan Sinclair <dsinclair@chromium.org>2018-01-24 20:05:29 +0000
committerChromium commit bot <commit-bot@chromium.org>2018-01-24 20:05:29 +0000
commitb657e87fa1e25997c8277fa49ed33ff245391f31 (patch)
treec95f75693ea9a03e82ac0b696ca992ef5bd714ac /xfa/fxfa/parser/cxfa_choicelist.cpp
parent4327b48d249ad61020e353c794a08b2969949eba (diff)
downloadpdfium-b657e87fa1e25997c8277fa49ed33ff245391f31.tar.xz
Cleanup CreateUIChild node creation
This CL cleans up some of the code around creating the XML nodes related to the UI widgets. Change-Id: Ib91364439ab039f46e44690e92cc0cb93a8da203 Reviewed-on: https://pdfium-review.googlesource.com/23770 Reviewed-by: Henrique Nakashima <hnakashima@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'xfa/fxfa/parser/cxfa_choicelist.cpp')
-rw-r--r--xfa/fxfa/parser/cxfa_choicelist.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/xfa/fxfa/parser/cxfa_choicelist.cpp b/xfa/fxfa/parser/cxfa_choicelist.cpp
index 33f868316f..4bd8387917 100644
--- a/xfa/fxfa/parser/cxfa_choicelist.cpp
+++ b/xfa/fxfa/parser/cxfa_choicelist.cpp
@@ -42,3 +42,10 @@ CXFA_ChoiceList::CXFA_ChoiceList(CXFA_Document* doc, XFA_PacketType packet)
pdfium::MakeUnique<CJX_ChoiceList>(this)) {}
CXFA_ChoiceList::~CXFA_ChoiceList() {}
+
+XFA_Element CXFA_ChoiceList::GetValueNodeType() const {
+ return JSObject()->GetEnum(XFA_Attribute::Open) ==
+ XFA_AttributeEnum::MultiSelect
+ ? XFA_Element::ExData
+ : XFA_Element::Text;
+}