summaryrefslogtreecommitdiff
path: root/xfa/fxfa/app/xfa_ffdocview.cpp
diff options
context:
space:
mode:
authorDan Sinclair <dsinclair@chromium.org>2017-03-23 09:13:37 -0400
committerChromium commit bot <commit-bot@chromium.org>2017-03-23 13:37:42 +0000
commit1bbedec89cc59df3e305dc25082d9699237d70ab (patch)
tree914e592d93139bf3e2d5057d7d70292cc39b66a9 /xfa/fxfa/app/xfa_ffdocview.cpp
parente3978d0bf4283f6a8b39c2e7a4f980ac92631280 (diff)
downloadpdfium-1bbedec89cc59df3e305dc25082d9699237d70ab.tar.xz
Remove unused XFA_VALIDATE code
The XFA Validation flag is always set to preSubmit. This Cl removes the flag and other values and just uses the preSubmit option. Change-Id: Ic2e88d72ad94b605a2da355c4c0a56def47df73e Reviewed-on: https://pdfium-review.googlesource.com/3153 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: Nicolás Peña <npm@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org>
Diffstat (limited to 'xfa/fxfa/app/xfa_ffdocview.cpp')
-rw-r--r--xfa/fxfa/app/xfa_ffdocview.cpp28
1 files changed, 7 insertions, 21 deletions
diff --git a/xfa/fxfa/app/xfa_ffdocview.cpp b/xfa/fxfa/app/xfa_ffdocview.cpp
index 210002c530..b2ed1e907c 100644
--- a/xfa/fxfa/app/xfa_ffdocview.cpp
+++ b/xfa/fxfa/app/xfa_ffdocview.cpp
@@ -274,42 +274,28 @@ int32_t CXFA_FFDocView::ProcessWidgetEvent(CXFA_EventParam* pParam,
? pPresentNode->GetChild(0, XFA_Element::Validate)
: nullptr;
}
- if (pValidateNode) {
+ if (pValidateNode)
wsValidateStr = pValidateNode->GetContent();
- }
- }
- bool bValidate = false;
- switch (pParam->m_iValidateActivities) {
- case XFA_VALIDATE_preSubmit:
- bValidate = wsValidateStr.Find(L"preSubmit") != -1;
- break;
- case XFA_VALIDATE_prePrint:
- bValidate = wsValidateStr.Find(L"prePrint") != -1;
- break;
- case XFA_VALIDATE_preExecute:
- bValidate = wsValidateStr.Find(L"preExecute") != -1;
- break;
- case XFA_VALIDATE_preSave:
- bValidate = wsValidateStr.Find(L"preSave") != -1;
- break;
}
- if (!bValidate) {
+
+ if (wsValidateStr.Find(L"preSubmit") == -1)
return XFA_EVENTERROR_Success;
- }
}
+
CXFA_Node* pNode = pWidgetAcc ? pWidgetAcc->GetNode() : nullptr;
if (!pNode) {
CXFA_Node* pRootItem =
ToNode(m_pDoc->GetXFADoc()->GetXFAObject(XFA_HASHCODE_Form));
- if (!pRootItem) {
+ if (!pRootItem)
return XFA_EVENTERROR_Error;
- }
+
pNode = pRootItem->GetChild(0, XFA_Element::Subform);
}
ExecEventActivityByDeepFirst(pNode, pParam->m_eType, pParam->m_bIsFormReady,
true, nullptr);
return XFA_EVENTERROR_Success;
}
+
CXFA_FFWidgetHandler* CXFA_FFDocView::GetWidgetHandler() {
if (!m_pWidgetHandler)
m_pWidgetHandler = pdfium::MakeUnique<CXFA_FFWidgetHandler>(this);