summaryrefslogtreecommitdiff
path: root/fxjs/xfa
diff options
context:
space:
mode:
Diffstat (limited to 'fxjs/xfa')
-rw-r--r--fxjs/xfa/cjx_field.cpp7
-rw-r--r--fxjs/xfa/cjx_object.cpp14
2 files changed, 11 insertions, 10 deletions
diff --git a/fxjs/xfa/cjx_field.cpp b/fxjs/xfa/cjx_field.cpp
index b652aeedab..e62fa3a33a 100644
--- a/fxjs/xfa/cjx_field.cpp
+++ b/fxjs/xfa/cjx_field.cpp
@@ -235,7 +235,8 @@ CJS_Return CJX_Field::execValidate(
void CJX_Field::defaultValue(CFXJSE_Value* pValue,
bool bSetting,
XFA_Attribute eAttribute) {
- CXFA_WidgetAcc* pWidgetAcc = GetXFANode()->GetWidgetAcc();
+ CXFA_Node* xfaNode = GetXFANode();
+ CXFA_WidgetAcc* pWidgetAcc = xfaNode->GetWidgetAcc();
if (!pWidgetAcc)
return;
@@ -255,7 +256,7 @@ void CJX_Field::defaultValue(CFXJSE_Value* pValue,
wsNewText, pWidgetAcc->GetLeadDigits(), pWidgetAcc->GetFracDigits());
}
- CXFA_WidgetAcc* pContainerWidgetAcc = GetXFANode()->GetContainerWidgetAcc();
+ CXFA_WidgetAcc* pContainerWidgetAcc = xfaNode->GetContainerWidgetAcc();
WideString wsFormatText(wsNewText);
if (pContainerWidgetAcc)
wsFormatText = pContainerWidgetAcc->GetFormatDataValue(wsNewText);
@@ -272,7 +273,7 @@ void CJX_Field::defaultValue(CFXJSE_Value* pValue,
CXFA_Node* pUIChild = pWidgetAcc->GetUIChild();
CXFA_Node* pNode =
- pWidgetAcc->GetFormValue()->GetNodeItem(XFA_NODEITEM_FirstChild);
+ xfaNode->GetFormValue()->GetNodeItem(XFA_NODEITEM_FirstChild);
if (pNode && pNode->GetElementType() == XFA_Element::Decimal) {
if (pUIChild->GetElementType() == XFA_Element::NumericEdit &&
(pNode->JSObject()->GetInteger(XFA_Attribute::FracDigits) == -1)) {
diff --git a/fxjs/xfa/cjx_object.cpp b/fxjs/xfa/cjx_object.cpp
index 1512a32545..de747f4419 100644
--- a/fxjs/xfa/cjx_object.cpp
+++ b/fxjs/xfa/cjx_object.cpp
@@ -1307,7 +1307,7 @@ void CJX_Object::Script_Som_FontColor(CFXJSE_Value* pValue,
if (!widget_data_)
return;
- CXFA_Font* font = widget_data_->GetFont(true);
+ CXFA_Font* font = widget_data_->GetNode()->GetFont(true);
if (!font)
return;
@@ -1335,7 +1335,7 @@ void CJX_Object::Script_Som_FillColor(CFXJSE_Value* pValue,
if (!widget_data_)
return;
- CXFA_Border* border = widget_data_->GetBorder(true);
+ CXFA_Border* border = widget_data_->GetNode()->GetBorder(true);
CXFA_Fill* borderfill = border->GetFill(true);
if (!borderfill)
return;
@@ -1366,7 +1366,7 @@ void CJX_Object::Script_Som_BorderColor(CFXJSE_Value* pValue,
if (!widget_data_)
return;
- CXFA_Border* border = widget_data_->GetBorder(true);
+ CXFA_Border* border = widget_data_->GetNode()->GetBorder(true);
int32_t iSize = border->CountEdges();
if (bSetting) {
int32_t r = 0;
@@ -1396,7 +1396,7 @@ void CJX_Object::Script_Som_BorderWidth(CFXJSE_Value* pValue,
if (!widget_data_)
return;
- CXFA_Border* border = widget_data_->GetBorder(true);
+ CXFA_Border* border = widget_data_->GetNode()->GetBorder(true);
if (bSetting) {
CXFA_Measurement thickness = border->GetEdge(0)->GetMSThickness();
pValue->SetString(thickness.ToString().UTF8Encode().AsStringView());
@@ -1417,9 +1417,9 @@ void CJX_Object::Script_Som_Message(CFXJSE_Value* pValue,
return;
bool bNew = false;
- CXFA_Validate* validate = widget_data_->GetValidate(false);
+ CXFA_Validate* validate = widget_data_->GetNode()->GetValidate(false);
if (!validate) {
- validate = widget_data_->GetValidate(true);
+ validate = widget_data_->GetNode()->GetValidate(true);
bNew = true;
}
@@ -1603,7 +1603,7 @@ void CJX_Object::Script_Som_Mandatory(CFXJSE_Value* pValue,
if (!widget_data_)
return;
- CXFA_Validate* validate = widget_data_->GetValidate(true);
+ CXFA_Validate* validate = widget_data_->GetNode()->GetValidate(true);
if (!validate)
return;