Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(58)

Side by Side Diff: xfa/fxfa/app/xfa_ffdocview.cpp

Issue 1890563003: Simplify XFA event handling. (Closed) Base URL: https://pdfium.googlesource.com/pdfium@master
Patch Set: remove layout event cruft Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2014 PDFium Authors. All rights reserved. 1 // Copyright 2014 PDFium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
6 6
7 #include "xfa/fxfa/include/xfa_ffdocview.h" 7 #include "xfa/fxfa/include/xfa_ffdocview.h"
8 8
9 #include "core/fxcrt/include/fx_ext.h" 9 #include "core/fxcrt/include/fx_ext.h"
10 #include "xfa/fxfa/app/xfa_ffbarcode.h" 10 #include "xfa/fxfa/app/xfa_ffbarcode.h"
(...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after
208 208
209 CXFA_LayoutProcessor* CXFA_FFDocView::GetXFALayout() const { 209 CXFA_LayoutProcessor* CXFA_FFDocView::GetXFALayout() const {
210 return m_pDoc->GetXFADoc()->GetDocLayout(); 210 return m_pDoc->GetXFADoc()->GetDocLayout();
211 } 211 }
212 FX_BOOL CXFA_FFDocView::ResetSingleWidgetAccData(CXFA_WidgetAcc* pWidgetAcc) { 212 FX_BOOL CXFA_FFDocView::ResetSingleWidgetAccData(CXFA_WidgetAcc* pWidgetAcc) {
213 CXFA_Node* pNode = pWidgetAcc->GetNode(); 213 CXFA_Node* pNode = pWidgetAcc->GetNode();
214 XFA_ELEMENT eType = pNode->GetClassID(); 214 XFA_ELEMENT eType = pNode->GetClassID();
215 if (eType != XFA_ELEMENT_Field && eType != XFA_ELEMENT_ExclGroup) { 215 if (eType != XFA_ELEMENT_Field && eType != XFA_ELEMENT_ExclGroup) {
216 return FALSE; 216 return FALSE;
217 } 217 }
218 FX_BOOL bNotify = IsStaticNotify();
219 pWidgetAcc->ResetData(); 218 pWidgetAcc->ResetData();
220 pWidgetAcc->UpdateUIDisplay(); 219 pWidgetAcc->UpdateUIDisplay();
221 if (bNotify) {
222 pWidgetAcc->NotifyEvent(XFA_WIDGETEVENT_PostContentChanged, NULL, NULL,
223 NULL);
224 }
225 if (CXFA_Validate validate = pWidgetAcc->GetValidate()) { 220 if (CXFA_Validate validate = pWidgetAcc->GetValidate()) {
226 AddValidateWidget(pWidgetAcc); 221 AddValidateWidget(pWidgetAcc);
227 validate.GetNode()->SetFlag(XFA_NODEFLAG_NeedsInitApp, TRUE, FALSE); 222 validate.GetNode()->SetFlag(XFA_NODEFLAG_NeedsInitApp, TRUE, FALSE);
228 } 223 }
229 return TRUE; 224 return TRUE;
230 } 225 }
231 void CXFA_FFDocView::ResetWidgetData(CXFA_WidgetAcc* pWidgetAcc) { 226 void CXFA_FFDocView::ResetWidgetData(CXFA_WidgetAcc* pWidgetAcc) {
232 m_bLayoutEvent = TRUE; 227 m_bLayoutEvent = TRUE;
233 FX_BOOL bChanged = FALSE; 228 FX_BOOL bChanged = FALSE;
234 CXFA_Node* pFormNode = NULL; 229 CXFA_Node* pFormNode = NULL;
(...skipping 683 matching lines...) Expand 10 before | Expand all | Expand 10 after
918 CXFA_WidgetAcc* CXFA_WidgetAccIterator::GetCurrentWidgetAcc() { 913 CXFA_WidgetAcc* CXFA_WidgetAccIterator::GetCurrentWidgetAcc() {
919 return NULL; 914 return NULL;
920 } 915 }
921 FX_BOOL CXFA_WidgetAccIterator::SetCurrentWidgetAcc(CXFA_WidgetAcc* hWidget) { 916 FX_BOOL CXFA_WidgetAccIterator::SetCurrentWidgetAcc(CXFA_WidgetAcc* hWidget) {
922 return FALSE; 917 return FALSE;
923 } 918 }
924 void CXFA_WidgetAccIterator::SkipTree() { 919 void CXFA_WidgetAccIterator::SkipTree() {
925 m_ContentIterator.SkipChildrenAndMoveToNext(); 920 m_ContentIterator.SkipChildrenAndMoveToNext();
926 m_pCurWidgetAcc = NULL; 921 m_pCurWidgetAcc = NULL;
927 } 922 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698