From fb709d88935ae85532679d225993741919b23a7b Mon Sep 17 00:00:00 2001 From: Ryan Harrison Date: Mon, 16 Jul 2018 18:03:56 +0000 Subject: Process data changes regardless if they can be formatted UI elements in XFA can have two different clauses with different meanings. One is a formatting statement that dictates the format the underlying data should appear in. The other occurs within an block and specificies what format the underlying should be. If it doesn't fit this the block indicates what should occur. In the existing code actually running the second type was being conditionally guarded on whether of not the formatting of the first type succeeded. This CL moves the calls related to data changing earlier, to before the formatting and UI updating occurs. BUG=pdfium:1065 Change-Id: Ib525c490074187c3272f4263ab451bf347b74f9c Reviewed-on: https://pdfium-review.googlesource.com/37250 Reviewed-by: Henrique Nakashima Commit-Queue: Ryan Harrison --- xfa/fxfa/cxfa_fffield.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'xfa') diff --git a/xfa/fxfa/cxfa_fffield.cpp b/xfa/fxfa/cxfa_fffield.cpp index 6f7aab899f..f3c1412361 100644 --- a/xfa/fxfa/cxfa_fffield.cpp +++ b/xfa/fxfa/cxfa_fffield.cpp @@ -613,14 +613,13 @@ bool CXFA_FFField::ProcessCommittedData() { return false; if (!IsDataChanged()) return false; - if (CalculateOverride() != 1) - return false; - if (!CommitData()) - return false; m_pDocView->SetChangeMark(); m_pDocView->AddValidateNode(m_pNode.Get()); - return true; + + if (CalculateOverride() != 1) + return false; + return CommitData(); } int32_t CXFA_FFField::CalculateOverride() { -- cgit v1.2.3