summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--xfa/fxfa/cxfa_ffdocview.cpp2
-rw-r--r--xfa/fxfa/cxfa_fffield.cpp2
-rw-r--r--xfa/fxfa/cxfa_ffwidgethandler.cpp4
-rw-r--r--xfa/fxfa/parser/cxfa_calculate.cpp2
-rw-r--r--xfa/fxfa/parser/cxfa_calculate.h2
-rw-r--r--xfa/fxfa/parser/cxfa_node.cpp2
6 files changed, 7 insertions, 7 deletions
diff --git a/xfa/fxfa/cxfa_ffdocview.cpp b/xfa/fxfa/cxfa_ffdocview.cpp
index 31996315df..6dd282af99 100644
--- a/xfa/fxfa/cxfa_ffdocview.cpp
+++ b/xfa/fxfa/cxfa_ffdocview.cpp
@@ -431,7 +431,7 @@ static int32_t XFA_ProcessEvent(CXFA_FFDocView* pDocView,
if (node->IsUserInteractive())
return XFA_EVENTERROR_Disabled;
- return node->ExecuteScript(pDocView, calc->GetScript(), pParam);
+ return node->ExecuteScript(pDocView, calc->GetScriptIfExists(), pParam);
}
default:
break;
diff --git a/xfa/fxfa/cxfa_fffield.cpp b/xfa/fxfa/cxfa_fffield.cpp
index b07d80f108..5f26d4c8b6 100644
--- a/xfa/fxfa/cxfa_fffield.cpp
+++ b/xfa/fxfa/cxfa_fffield.cpp
@@ -684,7 +684,7 @@ int32_t CXFA_FFField::CalculateWidgetAcc(CXFA_WidgetAcc* pAcc) {
}
case XFA_AttributeEnum::Warning: {
if (version <= XFA_VERSION_204) {
- CXFA_Script* script = calc->GetScript();
+ CXFA_Script* script = calc->GetScriptIfExists();
if (!script)
return 1;
if (script->GetExpression().IsEmpty())
diff --git a/xfa/fxfa/cxfa_ffwidgethandler.cpp b/xfa/fxfa/cxfa_ffwidgethandler.cpp
index d4ead07ba9..87cef5fae4 100644
--- a/xfa/fxfa/cxfa_ffwidgethandler.cpp
+++ b/xfa/fxfa/cxfa_ffwidgethandler.cpp
@@ -195,7 +195,7 @@ bool CXFA_FFWidgetHandler::HasEvent(CXFA_WidgetAcc* pWidgetAcc,
switch (eEventType) {
case XFA_EVENT_Calculate: {
CXFA_Calculate* calc = node->GetCalculateIfExists();
- return calc && calc->GetScript();
+ return calc && calc->GetScriptIfExists();
}
case XFA_EVENT_Validate: {
CXFA_Validate* validate = node->GetValidateIfExists();
@@ -234,7 +234,7 @@ int32_t CXFA_FFWidgetHandler::ProcessEvent(CXFA_WidgetAcc* pWidgetAcc,
return XFA_EVENTERROR_NotExist;
if (node->IsUserInteractive())
return XFA_EVENTERROR_Disabled;
- return node->ExecuteScript(m_pDocView, calc->GetScript(), pParam);
+ return node->ExecuteScript(m_pDocView, calc->GetScriptIfExists(), pParam);
}
default:
break;
diff --git a/xfa/fxfa/parser/cxfa_calculate.cpp b/xfa/fxfa/parser/cxfa_calculate.cpp
index cacb326f0f..328678783c 100644
--- a/xfa/fxfa/parser/cxfa_calculate.cpp
+++ b/xfa/fxfa/parser/cxfa_calculate.cpp
@@ -49,7 +49,7 @@ XFA_AttributeEnum CXFA_Calculate::GetOverride() {
.value_or(XFA_AttributeEnum::Error);
}
-CXFA_Script* CXFA_Calculate::GetScript() {
+CXFA_Script* CXFA_Calculate::GetScriptIfExists() {
return GetChild<CXFA_Script>(0, XFA_Element::Script, false);
}
diff --git a/xfa/fxfa/parser/cxfa_calculate.h b/xfa/fxfa/parser/cxfa_calculate.h
index 3f6ca6a8c7..a5be908b4c 100644
--- a/xfa/fxfa/parser/cxfa_calculate.h
+++ b/xfa/fxfa/parser/cxfa_calculate.h
@@ -17,7 +17,7 @@ class CXFA_Calculate : public CXFA_Node {
~CXFA_Calculate() override;
XFA_AttributeEnum GetOverride();
- CXFA_Script* GetScript();
+ CXFA_Script* GetScriptIfExists();
WideString GetMessageText();
};
diff --git a/xfa/fxfa/parser/cxfa_node.cpp b/xfa/fxfa/parser/cxfa_node.cpp
index 5d72cf7cb9..c7a0bb1668 100644
--- a/xfa/fxfa/parser/cxfa_node.cpp
+++ b/xfa/fxfa/parser/cxfa_node.cpp
@@ -1714,7 +1714,7 @@ int32_t CXFA_Node::ProcessCalculate(CXFA_FFDocView* docView) {
CXFA_EventParam EventParam;
EventParam.m_eType = XFA_EVENT_Calculate;
- int32_t iRet = ExecuteScript(docView, calc->GetScript(), &EventParam);
+ int32_t iRet = ExecuteScript(docView, calc->GetScriptIfExists(), &EventParam);
if (iRet != XFA_EVENTERROR_Success)
return iRet;