diff options
author | Dan Sinclair <dsinclair@chromium.org> | 2017-05-23 10:21:54 -0400 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2017-05-23 15:38:39 +0000 |
commit | c4ecd7b2e10e37a3b29eb380472fbee4936522ac (patch) | |
tree | 2823d3558eeae73e91731fd6e9f3d7b346a33393 /xfa/fxfa/parser/cxfa_node.cpp | |
parent | 1b02d01804039a9f0584c081294ceb07e52b9bdc (diff) | |
download | pdfium-c4ecd7b2e10e37a3b29eb380472fbee4936522ac.tar.xz |
Cleanup default values and methods in CXFA_Widgetdata
Change-Id: Ie591de17aba54d6d0f96b1133be7d899bab577cf
Reviewed-on: https://pdfium-review.googlesource.com/5660
Reviewed-by: Nicolás Peña <npm@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'xfa/fxfa/parser/cxfa_node.cpp')
-rw-r--r-- | xfa/fxfa/parser/cxfa_node.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/xfa/fxfa/parser/cxfa_node.cpp b/xfa/fxfa/parser/cxfa_node.cpp index 3c254ef6fc..e7ec4cf890 100644 --- a/xfa/fxfa/parser/cxfa_node.cpp +++ b/xfa/fxfa/parser/cxfa_node.cpp @@ -1867,7 +1867,7 @@ void CXFA_Node::Script_Som_Message(CFXJSE_Value* pValue, return; } bool bNew = false; - CXFA_Validate validate = pWidgetData->GetValidate(); + CXFA_Validate validate = pWidgetData->GetValidate(false); if (!validate) { validate = pWidgetData->GetValidate(true); bNew = true; @@ -2349,7 +2349,7 @@ void CXFA_Node::Script_Field_SelectedIndex(CFXJSE_Value* pValue, } pWidgetData->SetItemState(iIndex, true, true, true, true); } else { - pValue->SetInteger(pWidgetData->GetSelectedItem()); + pValue->SetInteger(pWidgetData->GetSelectedItem(0)); } } @@ -2358,7 +2358,7 @@ void CXFA_Node::Script_Field_ClearItems(CFXJSE_Arguments* pArguments) { if (!pWidgetData) { return; } - pWidgetData->DeleteItem(-1, true); + pWidgetData->DeleteItem(-1, true, false); } void CXFA_Node::Script_Field_ExecEvent(CFXJSE_Arguments* pArguments) { @@ -2546,7 +2546,7 @@ void CXFA_Node::Script_Field_AddItem(CFXJSE_Arguments* pArguments) { CFX_ByteString bsValue = pArguments->GetUTF8String(1); wsValue = CFX_WideString::FromUTF8(bsValue.AsStringC()); } - pWidgetData->InsertItem(wsLabel, wsValue, -1, true); + pWidgetData->InsertItem(wsLabel, wsValue, true); } void CXFA_Node::Script_Field_ExecValidate(CFXJSE_Arguments* pArguments) { |