diff options
Diffstat (limited to 'fxjs/xfa/cjx_field.cpp')
-rw-r--r-- | fxjs/xfa/cjx_field.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/fxjs/xfa/cjx_field.cpp b/fxjs/xfa/cjx_field.cpp index 03927cd02e..2af988f1fe 100644 --- a/fxjs/xfa/cjx_field.cpp +++ b/fxjs/xfa/cjx_field.cpp @@ -256,8 +256,7 @@ void CJX_Field::defaultValue(CFXJSE_Value* pValue, if (pValue && !(pValue->IsNull() || pValue->IsUndefined())) wsNewText = pValue->ToWideString(); - CXFA_Node* pUIChild = pWidgetAcc->GetUIChild(); - if (pUIChild->GetElementType() == XFA_Element::NumericEdit) { + if (xfaNode->GetUIChild()->GetElementType() == XFA_Element::NumericEdit) { wsNewText = pWidgetAcc->NumericLimit( wsNewText, pWidgetAcc->GetLeadDigits(), pWidgetAcc->GetFracDigits()); } @@ -277,11 +276,10 @@ void CJX_Field::defaultValue(CFXJSE_Value* pValue, return; } - CXFA_Node* pUIChild = pWidgetAcc->GetUIChild(); CXFA_Node* formValue = xfaNode->GetFormValueIfExists(); CXFA_Node* pNode = formValue ? formValue->GetFirstChild() : nullptr; if (pNode && pNode->GetElementType() == XFA_Element::Decimal) { - if (pUIChild->GetElementType() == XFA_Element::NumericEdit && + if (xfaNode->GetUIChild()->GetElementType() == XFA_Element::NumericEdit && (pNode->JSObject()->GetInteger(XFA_Attribute::FracDigits) == -1)) { pValue->SetString(content.UTF8Encode().AsStringView()); } else { |