summaryrefslogtreecommitdiff
path: root/fxjs
diff options
context:
space:
mode:
Diffstat (limited to 'fxjs')
-rw-r--r--fxjs/xfa/cjx_draw.cpp3
-rw-r--r--fxjs/xfa/cjx_field.cpp6
-rw-r--r--fxjs/xfa/cjx_node.cpp7
3 files changed, 6 insertions, 10 deletions
diff --git a/fxjs/xfa/cjx_draw.cpp b/fxjs/xfa/cjx_draw.cpp
index be9e430ae2..9d1e76c6f1 100644
--- a/fxjs/xfa/cjx_draw.cpp
+++ b/fxjs/xfa/cjx_draw.cpp
@@ -121,8 +121,7 @@ void CJX_Draw::defaultValue(CFXJSE_Value* pValue,
return;
ASSERT(GetXFANode()->IsWidgetReady());
- XFA_Element uiType = GetXFANode()->GetWidgetAcc()->GetUIType();
- if (uiType != XFA_Element::Text)
+ if (GetXFANode()->GetUIType() != XFA_Element::Text)
return;
WideString wsNewValue = pValue->ToWideString();
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 {
diff --git a/fxjs/xfa/cjx_node.cpp b/fxjs/xfa/cjx_node.cpp
index 3666a600b1..6458a33367 100644
--- a/fxjs/xfa/cjx_node.cpp
+++ b/fxjs/xfa/cjx_node.cpp
@@ -506,7 +506,7 @@ int32_t CJX_Node::execSingleEventByName(const WideStringView& wsEventName,
if (!GetXFANode()->IsWidgetReady())
return XFA_EVENTERROR_NotExist;
- CXFA_Node* pUINode = GetXFANode()->GetWidgetAcc()->GetUIChild();
+ CXFA_Node* pUINode = GetXFANode()->GetUIChild();
if (pUINode->GetElementType() != XFA_Element::Signature)
return XFA_EVENTERROR_NotExist;
@@ -517,10 +517,9 @@ int32_t CJX_Node::execSingleEventByName(const WideStringView& wsEventName,
if (!GetXFANode()->IsWidgetReady())
return XFA_EVENTERROR_NotExist;
- CXFA_WidgetAcc* pWidgetAcc = GetXFANode()->GetWidgetAcc();
- CXFA_Node* pUINode = pWidgetAcc->GetUIChild();
+ CXFA_Node* pUINode = GetXFANode()->GetUIChild();
if (pUINode->GetElementType() != XFA_Element::ChoiceList ||
- pWidgetAcc->IsListBox()) {
+ GetXFANode()->GetWidgetAcc()->IsListBox()) {
return XFA_EVENTERROR_NotExist;
}
return pNotify->ExecEventByDeepFirst(