summaryrefslogtreecommitdiff
path: root/fxjs
diff options
context:
space:
mode:
Diffstat (limited to 'fxjs')
-rw-r--r--fxjs/xfa/cjx_draw.cpp2
-rw-r--r--fxjs/xfa/cjx_field.cpp6
-rw-r--r--fxjs/xfa/cjx_node.cpp13
3 files changed, 10 insertions, 11 deletions
diff --git a/fxjs/xfa/cjx_draw.cpp b/fxjs/xfa/cjx_draw.cpp
index 77d058f0d6..175450650c 100644
--- a/fxjs/xfa/cjx_draw.cpp
+++ b/fxjs/xfa/cjx_draw.cpp
@@ -120,7 +120,7 @@ void CJX_Draw::defaultValue(CFXJSE_Value* pValue,
return;
ASSERT(GetXFANode()->IsWidgetReady());
- if (GetXFANode()->GetUIType() != XFA_Element::Text)
+ if (GetXFANode()->GetFFWidgetType() != XFA_FFWidgetType::kText)
return;
WideString wsNewValue = pValue->ToWideString();
diff --git a/fxjs/xfa/cjx_field.cpp b/fxjs/xfa/cjx_field.cpp
index 9b4364bc14..078def3cf9 100644
--- a/fxjs/xfa/cjx_field.cpp
+++ b/fxjs/xfa/cjx_field.cpp
@@ -249,7 +249,8 @@ void CJX_Field::defaultValue(CFXJSE_Value* pValue,
if (pValue && !(pValue->IsNull() || pValue->IsUndefined()))
wsNewText = pValue->ToWideString();
- if (xfaNode->GetUIChild()->GetElementType() == XFA_Element::NumericEdit) {
+ if (xfaNode->GetUIChildNode()->GetElementType() ==
+ XFA_Element::NumericEdit) {
wsNewText = xfaNode->NumericLimit(wsNewText, xfaNode->GetLeadDigits(),
xfaNode->GetFracDigits());
}
@@ -272,7 +273,8 @@ void CJX_Field::defaultValue(CFXJSE_Value* pValue,
CXFA_Node* formValue = xfaNode->GetFormValueIfExists();
CXFA_Node* pNode = formValue ? formValue->GetFirstChild() : nullptr;
if (pNode && pNode->GetElementType() == XFA_Element::Decimal) {
- if (xfaNode->GetUIChild()->GetElementType() == XFA_Element::NumericEdit &&
+ if (xfaNode->GetUIChildNode()->GetElementType() ==
+ XFA_Element::NumericEdit &&
(pNode->JSObject()->GetInteger(XFA_Attribute::FracDigits) == -1)) {
pValue->SetString(content.UTF8Encode().AsStringView());
} else {
diff --git a/fxjs/xfa/cjx_node.cpp b/fxjs/xfa/cjx_node.cpp
index 1d6e022060..0508651932 100644
--- a/fxjs/xfa/cjx_node.cpp
+++ b/fxjs/xfa/cjx_node.cpp
@@ -505,21 +505,18 @@ int32_t CJX_Node::execSingleEventByName(const WideStringView& wsEventName,
case EventAppliesToo::kSignature: {
if (!GetXFANode()->IsWidgetReady())
return XFA_EVENTERROR_NotExist;
-
- CXFA_Node* pUINode = GetXFANode()->GetUIChild();
- if (pUINode->GetElementType() != XFA_Element::Signature)
+ if (GetXFANode()->GetUIChildNode()->GetElementType() !=
+ XFA_Element::Signature) {
return XFA_EVENTERROR_NotExist;
-
+ }
return pNotify->ExecEventByDeepFirst(
GetXFANode(), eventParaInfo->m_eventType, false, false);
}
case EventAppliesToo::kChoiceList: {
if (!GetXFANode()->IsWidgetReady())
return XFA_EVENTERROR_NotExist;
-
- CXFA_Node* pUINode = GetXFANode()->GetUIChild();
- if (pUINode->GetElementType() != XFA_Element::ChoiceList ||
- GetXFANode()->IsListBox()) {
+ if (GetXFANode()->GetUIChildNode()->GetElementType() !=
+ XFA_Element::ChoiceList) {
return XFA_EVENTERROR_NotExist;
}
return pNotify->ExecEventByDeepFirst(