summaryrefslogtreecommitdiff
path: root/fxjs/xfa
diff options
context:
space:
mode:
Diffstat (limited to 'fxjs/xfa')
-rw-r--r--fxjs/xfa/cjx_exclgroup.cpp5
-rw-r--r--fxjs/xfa/cjx_field.cpp37
2 files changed, 21 insertions, 21 deletions
diff --git a/fxjs/xfa/cjx_exclgroup.cpp b/fxjs/xfa/cjx_exclgroup.cpp
index 6d9f5407de..afee17ab86 100644
--- a/fxjs/xfa/cjx_exclgroup.cpp
+++ b/fxjs/xfa/cjx_exclgroup.cpp
@@ -93,12 +93,11 @@ CJS_Return CJX_ExclGroup::selectedMember(
if (!node->IsWidgetReady())
return CJS_Return(runtime->NewNull());
- CXFA_WidgetAcc* pWidgetAcc = node->GetWidgetAcc();
CXFA_Node* pReturnNode = nullptr;
if (params.empty()) {
- pReturnNode = pWidgetAcc->GetSelectedMember();
+ pReturnNode = node->GetWidgetAcc()->GetSelectedMember();
} else {
- pReturnNode = pWidgetAcc->SetSelectedMember(
+ pReturnNode = node->GetWidgetAcc()->SetSelectedMember(
runtime->ToWideString(params[0]).AsStringView(), true);
}
if (!pReturnNode)
diff --git a/fxjs/xfa/cjx_field.cpp b/fxjs/xfa/cjx_field.cpp
index 34b944f66d..e27f153646 100644
--- a/fxjs/xfa/cjx_field.cpp
+++ b/fxjs/xfa/cjx_field.cpp
@@ -191,14 +191,13 @@ CJS_Return CJX_Field::setItemState(
if (!node->IsWidgetReady())
return CJS_Return(true);
- CXFA_WidgetAcc* pWidgetAcc = node->GetWidgetAcc();
int32_t iIndex = runtime->ToInt32(params[0]);
if (runtime->ToInt32(params[1]) != 0) {
- pWidgetAcc->SetItemState(iIndex, true, true, true, true);
+ node->GetWidgetAcc()->SetItemState(iIndex, true, true, true, true);
return CJS_Return(true);
}
- if (pWidgetAcc->GetItemState(iIndex))
- pWidgetAcc->SetItemState(iIndex, false, true, true, true);
+ if (node->GetWidgetAcc()->GetItemState(iIndex))
+ node->GetWidgetAcc()->SetItemState(iIndex, false, true, true, true);
return CJS_Return(true);
}
@@ -246,7 +245,6 @@ void CJX_Field::defaultValue(CFXJSE_Value* pValue,
if (!xfaNode->IsWidgetReady())
return;
- CXFA_WidgetAcc* pWidgetAcc = xfaNode->GetWidgetAcc();
if (bSetting) {
if (pValue) {
xfaNode->SetPreNull(xfaNode->IsNull());
@@ -258,8 +256,9 @@ void CJX_Field::defaultValue(CFXJSE_Value* pValue,
wsNewText = pValue->ToWideString();
if (xfaNode->GetUIChild()->GetElementType() == XFA_Element::NumericEdit) {
- wsNewText = pWidgetAcc->NumericLimit(
- wsNewText, pWidgetAcc->GetLeadDigits(), pWidgetAcc->GetFracDigits());
+ wsNewText = xfaNode->GetWidgetAcc()->NumericLimit(
+ wsNewText, xfaNode->GetWidgetAcc()->GetLeadDigits(),
+ xfaNode->GetWidgetAcc()->GetFracDigits());
}
CXFA_Node* pContainerNode = xfaNode->GetContainerNode();
@@ -308,13 +307,15 @@ void CJX_Field::editValue(CFXJSE_Value* pValue,
if (!node->IsWidgetReady())
return;
- CXFA_WidgetAcc* pWidgetAcc = node->GetWidgetAcc();
if (bSetting) {
- pWidgetAcc->SetValue(XFA_VALUEPICTURE_Edit, pValue->ToWideString());
+ node->GetWidgetAcc()->SetValue(XFA_VALUEPICTURE_Edit,
+ pValue->ToWideString());
return;
}
- pValue->SetString(
- pWidgetAcc->GetValue(XFA_VALUEPICTURE_Edit).UTF8Encode().AsStringView());
+ pValue->SetString(node->GetWidgetAcc()
+ ->GetValue(XFA_VALUEPICTURE_Edit)
+ .UTF8Encode()
+ .AsStringView());
}
void CJX_Field::formatMessage(CFXJSE_Value* pValue,
@@ -330,12 +331,13 @@ void CJX_Field::formattedValue(CFXJSE_Value* pValue,
if (!node->IsWidgetReady())
return;
- CXFA_WidgetAcc* pWidgetAcc = node->GetWidgetAcc();
if (bSetting) {
- pWidgetAcc->SetValue(XFA_VALUEPICTURE_Display, pValue->ToWideString());
+ node->GetWidgetAcc()->SetValue(XFA_VALUEPICTURE_Display,
+ pValue->ToWideString());
return;
}
- pValue->SetString(pWidgetAcc->GetValue(XFA_VALUEPICTURE_Display)
+ pValue->SetString(node->GetWidgetAcc()
+ ->GetValue(XFA_VALUEPICTURE_Display)
.UTF8Encode()
.AsStringView());
}
@@ -357,19 +359,18 @@ void CJX_Field::selectedIndex(CFXJSE_Value* pValue,
if (!node->IsWidgetReady())
return;
- CXFA_WidgetAcc* pWidgetAcc = node->GetWidgetAcc();
if (!bSetting) {
- pValue->SetInteger(pWidgetAcc->GetSelectedItem(0));
+ pValue->SetInteger(node->GetWidgetAcc()->GetSelectedItem(0));
return;
}
int32_t iIndex = pValue->ToInteger();
if (iIndex == -1) {
- pWidgetAcc->ClearAllSelections();
+ node->GetWidgetAcc()->ClearAllSelections();
return;
}
- pWidgetAcc->SetItemState(iIndex, true, true, true, true);
+ node->GetWidgetAcc()->SetItemState(iIndex, true, true, true, true);
}
void CJX_Field::access(CFXJSE_Value* pValue,