summaryrefslogtreecommitdiff
path: root/xfa/fxfa/parser
diff options
context:
space:
mode:
Diffstat (limited to 'xfa/fxfa/parser')
-rw-r--r--xfa/fxfa/parser/cxfa_event.cpp2
-rw-r--r--xfa/fxfa/parser/cxfa_event.h4
-rw-r--r--xfa/fxfa/parser/cxfa_node.cpp6
3 files changed, 12 insertions, 0 deletions
diff --git a/xfa/fxfa/parser/cxfa_event.cpp b/xfa/fxfa/parser/cxfa_event.cpp
index 3dfa8b870e..8b4a0b56a2 100644
--- a/xfa/fxfa/parser/cxfa_event.cpp
+++ b/xfa/fxfa/parser/cxfa_event.cpp
@@ -73,6 +73,8 @@ CXFA_Script* CXFA_Event::GetScriptIfExists() {
return GetChild<CXFA_Script>(0, XFA_Element::Script, false);
}
+#ifdef PDF_XFA_ELEMENT_SUBMIT_ENABLED
CXFA_Submit* CXFA_Event::GetSubmitIfExists() {
return GetChild<CXFA_Submit>(0, XFA_Element::Submit, false);
}
+#endif // PDF_XFA_ELEMENT_SUBMIT_ENABLED
diff --git a/xfa/fxfa/parser/cxfa_event.h b/xfa/fxfa/parser/cxfa_event.h
index a410805675..6902b52eef 100644
--- a/xfa/fxfa/parser/cxfa_event.h
+++ b/xfa/fxfa/parser/cxfa_event.h
@@ -20,7 +20,11 @@ class CXFA_Event : public CXFA_Node {
XFA_AttributeEnum GetActivity();
XFA_Element GetEventType() const;
CXFA_Script* GetScriptIfExists();
+
+#ifdef PDF_XFA_ELEMENT_SUBMIT_ENABLED
CXFA_Submit* GetSubmitIfExists();
+#endif // PDF_XFA_ELEMENT_SUBMIT_ENABLED
+
WideString GetRef();
};
diff --git a/xfa/fxfa/parser/cxfa_node.cpp b/xfa/fxfa/parser/cxfa_node.cpp
index 5f919b7b14..363af54028 100644
--- a/xfa/fxfa/parser/cxfa_node.cpp
+++ b/xfa/fxfa/parser/cxfa_node.cpp
@@ -2008,11 +2008,17 @@ int32_t CXFA_Node::ProcessEvent(CXFA_FFDocView* docView,
case XFA_Element::SignData:
break;
case XFA_Element::Submit: {
+// TODO(crbug.com/867485): Submit is disabled for now. Fix it and reenable this
+// code.
+#ifdef PDF_XFA_ELEMENT_SUBMIT_ENABLED
CXFA_Submit* submit = event->GetSubmitIfExists();
if (!submit)
return XFA_EVENTERROR_NotExist;
return docView->GetDoc()->GetDocEnvironment()->Submit(docView->GetDoc(),
submit);
+#else
+ return XFA_EVENTERROR_Disabled;
+#endif // PDF_XFA_ELEMENT_SUBMIT_ENABLED
}
default:
break;