From 08915150a3fb64aa1ebf9bdf20d1158a20b4266f Mon Sep 17 00:00:00 2001 From: Dan Sinclair Date: Tue, 23 Jan 2018 15:22:54 +0000 Subject: Convert CXFA_WidgetAccIterator to CXFA_ReadyNodeIterator This CL converts the WidgetAcc iterator to return nodes in which the OnReady event has been fired. Change-Id: I5ec6809c1610ac3467019d8492121901d3845a37 Reviewed-on: https://pdfium-review.googlesource.com/23490 Reviewed-by: Ryan Harrison Commit-Queue: dsinclair --- xfa/fxfa/cxfa_ffdocview.cpp | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'xfa/fxfa/cxfa_ffdocview.cpp') diff --git a/xfa/fxfa/cxfa_ffdocview.cpp b/xfa/fxfa/cxfa_ffdocview.cpp index f7dbb98ce0..95b8b9cfb6 100644 --- a/xfa/fxfa/cxfa_ffdocview.cpp +++ b/xfa/fxfa/cxfa_ffdocview.cpp @@ -28,8 +28,8 @@ #include "xfa/fxfa/cxfa_ffwidget.h" #include "xfa/fxfa/cxfa_ffwidgethandler.h" #include "xfa/fxfa/cxfa_fwladapterwidgetmgr.h" +#include "xfa/fxfa/cxfa_readynodeiterator.h" #include "xfa/fxfa/cxfa_textprovider.h" -#include "xfa/fxfa/cxfa_widgetacciterator.h" #include "xfa/fxfa/parser/cxfa_acrobat.h" #include "xfa/fxfa/parser/cxfa_binditems.h" #include "xfa/fxfa/parser/cxfa_calculate.h" @@ -245,11 +245,11 @@ void CXFA_FFDocView::ResetNode(CXFA_Node* pNode) { if (pFormNode->GetElementType() != XFA_Element::Field && pFormNode->GetElementType() != XFA_Element::ExclGroup) { - CXFA_WidgetAccIterator Iterator(pFormNode); - while (CXFA_WidgetAcc* pAcc = Iterator.MoveToNext()) { - bChanged |= ResetSingleNodeData(pAcc->GetNode()); - if (pAcc->GetNode()->GetElementType() == XFA_Element::ExclGroup) - Iterator.SkipTree(); + CXFA_ReadyNodeIterator it(pFormNode); + while (CXFA_Node* pNode = it.MoveToNext()) { + bChanged |= ResetSingleNodeData(pNode); + if (pNode->GetElementType() == XFA_Element::ExclGroup) + it.SkipTree(); } } if (bChanged) @@ -312,10 +312,10 @@ CXFA_FFWidgetHandler* CXFA_FFDocView::GetWidgetHandler() { return m_pWidgetHandler.get(); } -std::unique_ptr -CXFA_FFDocView::CreateWidgetAccIterator() { +std::unique_ptr +CXFA_FFDocView::CreateReadyNodeIterator() { CXFA_Subform* pFormRoot = GetRootSubform(); - return pFormRoot ? pdfium::MakeUnique(pFormRoot) + return pFormRoot ? pdfium::MakeUnique(pFormRoot) : nullptr; } -- cgit v1.2.3