OLD | NEW |
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 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
49 XFA_ATTRIBUTEENUM_PreSave, XFA_ATTRIBUTEENUM_PreSign, | 49 XFA_ATTRIBUTEENUM_PreSave, XFA_ATTRIBUTEENUM_PreSign, |
50 XFA_ATTRIBUTEENUM_PreSubmit, XFA_ATTRIBUTEENUM_Ready, | 50 XFA_ATTRIBUTEENUM_PreSubmit, XFA_ATTRIBUTEENUM_Ready, |
51 XFA_ATTRIBUTEENUM_Unknown, | 51 XFA_ATTRIBUTEENUM_Unknown, |
52 }; | 52 }; |
53 | 53 |
54 CXFA_FFDocView::CXFA_FFDocView(CXFA_FFDoc* pDoc) | 54 CXFA_FFDocView::CXFA_FFDocView(CXFA_FFDoc* pDoc) |
55 : m_bLayoutEvent(FALSE), | 55 : m_bLayoutEvent(FALSE), |
56 m_pListFocusWidget(nullptr), | 56 m_pListFocusWidget(nullptr), |
57 m_bInLayoutStatus(FALSE), | 57 m_bInLayoutStatus(FALSE), |
58 m_pDoc(pDoc), | 58 m_pDoc(pDoc), |
59 m_pWidgetHandler(nullptr), | |
60 m_pXFADocLayout(nullptr), | 59 m_pXFADocLayout(nullptr), |
61 m_pFocusAcc(nullptr), | 60 m_pFocusAcc(nullptr), |
62 m_pFocusWidget(nullptr), | 61 m_pFocusWidget(nullptr), |
63 m_pOldFocusWidget(nullptr), | 62 m_pOldFocusWidget(nullptr), |
64 m_iStatus(XFA_DOCVIEW_LAYOUTSTATUS_None), | 63 m_iStatus(XFA_DOCVIEW_LAYOUTSTATUS_None), |
65 m_iLock(0) {} | 64 m_iLock(0) {} |
66 | 65 |
67 CXFA_FFDocView::~CXFA_FFDocView() { | 66 CXFA_FFDocView::~CXFA_FFDocView() { |
68 DestroyDocView(); | 67 DestroyDocView(); |
69 delete m_pWidgetHandler; | |
70 } | 68 } |
71 | 69 |
72 void CXFA_FFDocView::InitLayout(CXFA_Node* pNode) { | 70 void CXFA_FFDocView::InitLayout(CXFA_Node* pNode) { |
73 RunBindItems(); | 71 RunBindItems(); |
74 ExecEventActivityByDeepFirst(pNode, XFA_EVENT_Initialize); | 72 ExecEventActivityByDeepFirst(pNode, XFA_EVENT_Initialize, FALSE, TRUE, |
75 ExecEventActivityByDeepFirst(pNode, XFA_EVENT_IndexChange); | 73 nullptr); |
| 74 ExecEventActivityByDeepFirst(pNode, XFA_EVENT_IndexChange, FALSE, TRUE, |
| 75 nullptr); |
76 } | 76 } |
77 int32_t CXFA_FFDocView::StartLayout(int32_t iStartPage) { | 77 int32_t CXFA_FFDocView::StartLayout(int32_t iStartPage) { |
78 m_iStatus = XFA_DOCVIEW_LAYOUTSTATUS_Start; | 78 m_iStatus = XFA_DOCVIEW_LAYOUTSTATUS_Start; |
79 m_pDoc->GetXFADoc()->DoProtoMerge(); | 79 m_pDoc->GetXFADoc()->DoProtoMerge(); |
80 m_pDoc->GetXFADoc()->DoDataMerge(); | 80 m_pDoc->GetXFADoc()->DoDataMerge(); |
81 m_pXFADocLayout = GetXFALayout(); | 81 m_pXFADocLayout = GetXFALayout(); |
82 int32_t iStatus = m_pXFADocLayout->StartLayout(); | 82 int32_t iStatus = m_pXFADocLayout->StartLayout(); |
83 if (iStatus < 0) { | 83 if (iStatus < 0) { |
84 return iStatus; | 84 return iStatus; |
85 } | 85 } |
86 CXFA_Node* pRootItem = | 86 CXFA_Node* pRootItem = |
87 ToNode(m_pDoc->GetXFADoc()->GetXFAObject(XFA_HASHCODE_Form)); | 87 ToNode(m_pDoc->GetXFADoc()->GetXFAObject(XFA_HASHCODE_Form)); |
88 if (!pRootItem) { | 88 if (!pRootItem) { |
89 return iStatus; | 89 return iStatus; |
90 } | 90 } |
91 InitLayout(pRootItem); | 91 InitLayout(pRootItem); |
92 InitCalculate(pRootItem); | 92 InitCalculate(pRootItem); |
93 InitValidate(pRootItem); | 93 InitValidate(pRootItem); |
94 ExecEventActivityByDeepFirst(pRootItem, XFA_EVENT_Ready, TRUE); | 94 ExecEventActivityByDeepFirst(pRootItem, XFA_EVENT_Ready, TRUE, TRUE, nullptr); |
95 m_iStatus = XFA_DOCVIEW_LAYOUTSTATUS_Start; | 95 m_iStatus = XFA_DOCVIEW_LAYOUTSTATUS_Start; |
96 return iStatus; | 96 return iStatus; |
97 } | 97 } |
98 int32_t CXFA_FFDocView::DoLayout(IFX_Pause* pPause) { | 98 int32_t CXFA_FFDocView::DoLayout(IFX_Pause* pPause) { |
99 int32_t iStatus = 100; | 99 int32_t iStatus = 100; |
100 iStatus = m_pXFADocLayout->DoLayout(pPause); | 100 iStatus = m_pXFADocLayout->DoLayout(pPause); |
101 if (iStatus != 100) { | 101 if (iStatus != 100) { |
102 return iStatus; | 102 return iStatus; |
103 } | 103 } |
104 m_iStatus = XFA_DOCVIEW_LAYOUTSTATUS_Doing; | 104 m_iStatus = XFA_DOCVIEW_LAYOUTSTATUS_Doing; |
(...skipping 12 matching lines...) Expand all Loading... |
117 CXFA_Node* pPageSetNode = | 117 CXFA_Node* pPageSetNode = |
118 pSubformNode->GetFirstChildByClass(XFA_Element::PageSet); | 118 pSubformNode->GetFirstChildByClass(XFA_Element::PageSet); |
119 if (!pPageSetNode) { | 119 if (!pPageSetNode) { |
120 return; | 120 return; |
121 } | 121 } |
122 RunCalculateWidgets(); | 122 RunCalculateWidgets(); |
123 RunValidate(); | 123 RunValidate(); |
124 InitLayout(pPageSetNode); | 124 InitLayout(pPageSetNode); |
125 InitCalculate(pPageSetNode); | 125 InitCalculate(pPageSetNode); |
126 InitValidate(pPageSetNode); | 126 InitValidate(pPageSetNode); |
127 ExecEventActivityByDeepFirst(pPageSetNode, XFA_EVENT_Ready, TRUE); | 127 ExecEventActivityByDeepFirst(pPageSetNode, XFA_EVENT_Ready, TRUE, TRUE, |
128 ExecEventActivityByDeepFirst(pRootItem, XFA_EVENT_Ready); | 128 nullptr); |
129 ExecEventActivityByDeepFirst(pRootItem, XFA_EVENT_DocReady); | 129 ExecEventActivityByDeepFirst(pRootItem, XFA_EVENT_Ready, FALSE, TRUE, |
| 130 nullptr); |
| 131 ExecEventActivityByDeepFirst(pRootItem, XFA_EVENT_DocReady, FALSE, TRUE, |
| 132 nullptr); |
130 RunCalculateWidgets(); | 133 RunCalculateWidgets(); |
131 RunValidate(); | 134 RunValidate(); |
132 if (RunLayout()) { | 135 if (RunLayout()) { |
133 ExecEventActivityByDeepFirst(pRootItem, XFA_EVENT_Ready); | 136 ExecEventActivityByDeepFirst(pRootItem, XFA_EVENT_Ready, FALSE, TRUE, |
| 137 nullptr); |
134 } | 138 } |
135 m_CalculateAccs.RemoveAll(); | 139 m_CalculateAccs.RemoveAll(); |
136 if (m_pFocusAcc && !m_pFocusWidget) { | 140 if (m_pFocusAcc && !m_pFocusWidget) { |
137 SetFocusWidgetAcc(m_pFocusAcc); | 141 SetFocusWidgetAcc(m_pFocusAcc); |
138 } | 142 } |
139 m_iStatus = XFA_DOCVIEW_LAYOUTSTATUS_End; | 143 m_iStatus = XFA_DOCVIEW_LAYOUTSTATUS_End; |
140 } | 144 } |
141 int32_t CXFA_FFDocView::GetLayoutStatus() { | 145 int32_t CXFA_FFDocView::GetLayoutStatus() { |
142 return m_iStatus; | 146 return m_iStatus; |
143 } | 147 } |
(...skipping 26 matching lines...) Expand all Loading... |
170 void CXFA_FFDocView::UpdateDocView() { | 174 void CXFA_FFDocView::UpdateDocView() { |
171 if (IsUpdateLocked()) { | 175 if (IsUpdateLocked()) { |
172 return; | 176 return; |
173 } | 177 } |
174 LockUpdate(); | 178 LockUpdate(); |
175 int32_t iNewAdds = m_NewAddedNodes.GetSize(); | 179 int32_t iNewAdds = m_NewAddedNodes.GetSize(); |
176 for (int32_t i = 0; i < iNewAdds; i++) { | 180 for (int32_t i = 0; i < iNewAdds; i++) { |
177 CXFA_Node* pNode = m_NewAddedNodes[i]; | 181 CXFA_Node* pNode = m_NewAddedNodes[i]; |
178 InitCalculate(pNode); | 182 InitCalculate(pNode); |
179 InitValidate(pNode); | 183 InitValidate(pNode); |
180 ExecEventActivityByDeepFirst(pNode, XFA_EVENT_Ready, TRUE); | 184 ExecEventActivityByDeepFirst(pNode, XFA_EVENT_Ready, TRUE, TRUE, nullptr); |
181 } | 185 } |
182 m_NewAddedNodes.RemoveAll(); | 186 m_NewAddedNodes.RemoveAll(); |
183 RunSubformIndexChange(); | 187 RunSubformIndexChange(); |
184 RunCalculateWidgets(); | 188 RunCalculateWidgets(); |
185 RunValidate(); | 189 RunValidate(); |
186 ShowNullTestMsg(); | 190 ShowNullTestMsg(); |
187 if (RunLayout() && m_bLayoutEvent) { | 191 if (RunLayout() && m_bLayoutEvent) { |
188 RunEventLayoutReady(); | 192 RunEventLayoutReady(); |
189 } | 193 } |
190 m_bLayoutEvent = FALSE; | 194 m_bLayoutEvent = FALSE; |
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
296 } | 300 } |
297 CXFA_Node* pNode = pWidgetAcc ? pWidgetAcc->GetNode() : nullptr; | 301 CXFA_Node* pNode = pWidgetAcc ? pWidgetAcc->GetNode() : nullptr; |
298 if (!pNode) { | 302 if (!pNode) { |
299 CXFA_Node* pRootItem = | 303 CXFA_Node* pRootItem = |
300 ToNode(m_pDoc->GetXFADoc()->GetXFAObject(XFA_HASHCODE_Form)); | 304 ToNode(m_pDoc->GetXFADoc()->GetXFAObject(XFA_HASHCODE_Form)); |
301 if (!pRootItem) { | 305 if (!pRootItem) { |
302 return XFA_EVENTERROR_Error; | 306 return XFA_EVENTERROR_Error; |
303 } | 307 } |
304 pNode = pRootItem->GetChild(0, XFA_Element::Subform); | 308 pNode = pRootItem->GetChild(0, XFA_Element::Subform); |
305 } | 309 } |
306 ExecEventActivityByDeepFirst(pNode, pParam->m_eType, pParam->m_bIsFormReady); | 310 ExecEventActivityByDeepFirst(pNode, pParam->m_eType, pParam->m_bIsFormReady, |
| 311 TRUE, nullptr); |
307 return XFA_EVENTERROR_Success; | 312 return XFA_EVENTERROR_Success; |
308 } | 313 } |
309 CXFA_FFWidgetHandler* CXFA_FFDocView::GetWidgetHandler() { | 314 CXFA_FFWidgetHandler* CXFA_FFDocView::GetWidgetHandler() { |
310 if (!m_pWidgetHandler) { | 315 if (!m_pWidgetHandler) { |
311 m_pWidgetHandler = new CXFA_FFWidgetHandler(this); | 316 m_pWidgetHandler.reset(new CXFA_FFWidgetHandler(this)); |
312 } | 317 } |
313 return m_pWidgetHandler; | 318 return m_pWidgetHandler.get(); |
314 } | 319 } |
315 | 320 |
316 CXFA_WidgetAccIterator* CXFA_FFDocView::CreateWidgetAccIterator( | 321 CXFA_WidgetAccIterator* CXFA_FFDocView::CreateWidgetAccIterator( |
317 XFA_WIDGETORDER eOrder) { | 322 XFA_WIDGETORDER eOrder) { |
318 CXFA_Node* pFormRoot = GetRootSubform(); | 323 CXFA_Node* pFormRoot = GetRootSubform(); |
319 return pFormRoot ? new CXFA_WidgetAccIterator(this, pFormRoot) : nullptr; | 324 return pFormRoot ? new CXFA_WidgetAccIterator(this, pFormRoot) : nullptr; |
320 } | 325 } |
321 CXFA_FFWidget* CXFA_FFDocView::GetFocusWidget() { | 326 CXFA_FFWidget* CXFA_FFDocView::GetFocusWidget() { |
322 return m_pFocusWidget; | 327 return m_pFocusWidget; |
323 } | 328 } |
(...skipping 276 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
600 void CXFA_FFDocView::AddIndexChangedSubform(CXFA_Node* pNode) { | 605 void CXFA_FFDocView::AddIndexChangedSubform(CXFA_Node* pNode) { |
601 ASSERT(pNode->GetElementType() == XFA_Element::Subform); | 606 ASSERT(pNode->GetElementType() == XFA_Element::Subform); |
602 m_IndexChangedSubforms.Add(pNode); | 607 m_IndexChangedSubforms.Add(pNode); |
603 } | 608 } |
604 void CXFA_FFDocView::RunDocClose() { | 609 void CXFA_FFDocView::RunDocClose() { |
605 CXFA_Node* pRootItem = | 610 CXFA_Node* pRootItem = |
606 ToNode(m_pDoc->GetXFADoc()->GetXFAObject(XFA_HASHCODE_Form)); | 611 ToNode(m_pDoc->GetXFADoc()->GetXFAObject(XFA_HASHCODE_Form)); |
607 if (!pRootItem) { | 612 if (!pRootItem) { |
608 return; | 613 return; |
609 } | 614 } |
610 ExecEventActivityByDeepFirst(pRootItem, XFA_EVENT_DocClose); | 615 ExecEventActivityByDeepFirst(pRootItem, XFA_EVENT_DocClose, FALSE, TRUE, |
| 616 nullptr); |
611 } | 617 } |
612 void CXFA_FFDocView::DestroyDocView() { | 618 void CXFA_FFDocView::DestroyDocView() { |
613 ClearInvalidateList(); | 619 ClearInvalidateList(); |
614 m_iStatus = XFA_DOCVIEW_LAYOUTSTATUS_None; | 620 m_iStatus = XFA_DOCVIEW_LAYOUTSTATUS_None; |
615 m_iLock = 0; | 621 m_iLock = 0; |
616 m_ValidateAccs.RemoveAll(); | 622 m_ValidateAccs.RemoveAll(); |
617 m_BindItems.RemoveAll(); | 623 m_BindItems.RemoveAll(); |
618 m_CalculateAccs.RemoveAll(); | 624 m_CalculateAccs.RemoveAll(); |
619 } | 625 } |
620 FX_BOOL CXFA_FFDocView::IsStaticNotify() { | 626 FX_BOOL CXFA_FFDocView::IsStaticNotify() { |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
678 pCurAcc->GetNode()->SetUserData(XFA_CalcRefCount, (void*)(uintptr_t)0); | 684 pCurAcc->GetNode()->SetUserData(XFA_CalcRefCount, (void*)(uintptr_t)0); |
679 } | 685 } |
680 m_CalculateAccs.RemoveAll(); | 686 m_CalculateAccs.RemoveAll(); |
681 return XFA_EVENTERROR_Success; | 687 return XFA_EVENTERROR_Success; |
682 } | 688 } |
683 void CXFA_FFDocView::AddValidateWidget(CXFA_WidgetAcc* pWidget) { | 689 void CXFA_FFDocView::AddValidateWidget(CXFA_WidgetAcc* pWidget) { |
684 if (m_ValidateAccs.Find(pWidget) < 0) | 690 if (m_ValidateAccs.Find(pWidget) < 0) |
685 m_ValidateAccs.Add(pWidget); | 691 m_ValidateAccs.Add(pWidget); |
686 } | 692 } |
687 FX_BOOL CXFA_FFDocView::InitCalculate(CXFA_Node* pNode) { | 693 FX_BOOL CXFA_FFDocView::InitCalculate(CXFA_Node* pNode) { |
688 ExecEventActivityByDeepFirst(pNode, XFA_EVENT_InitCalculate); | 694 ExecEventActivityByDeepFirst(pNode, XFA_EVENT_InitCalculate, FALSE, TRUE, |
| 695 nullptr); |
689 return TRUE; | 696 return TRUE; |
690 } | 697 } |
691 FX_BOOL CXFA_FFDocView::InitValidate(CXFA_Node* pNode) { | 698 FX_BOOL CXFA_FFDocView::InitValidate(CXFA_Node* pNode) { |
692 if (!m_pDoc->GetDocProvider()->IsValidationsEnabled(m_pDoc)) { | 699 if (!m_pDoc->GetDocProvider()->IsValidationsEnabled(m_pDoc)) { |
693 return FALSE; | 700 return FALSE; |
694 } | 701 } |
695 ExecEventActivityByDeepFirst(pNode, XFA_EVENT_Validate); | 702 ExecEventActivityByDeepFirst(pNode, XFA_EVENT_Validate, FALSE, TRUE, nullptr); |
696 m_ValidateAccs.RemoveAll(); | 703 m_ValidateAccs.RemoveAll(); |
697 return TRUE; | 704 return TRUE; |
698 } | 705 } |
699 FX_BOOL CXFA_FFDocView::RunValidate() { | 706 FX_BOOL CXFA_FFDocView::RunValidate() { |
700 if (!m_pDoc->GetDocProvider()->IsValidationsEnabled(m_pDoc)) { | 707 if (!m_pDoc->GetDocProvider()->IsValidationsEnabled(m_pDoc)) { |
701 return FALSE; | 708 return FALSE; |
702 } | 709 } |
703 int32_t iCounts = m_ValidateAccs.GetSize(); | 710 int32_t iCounts = m_ValidateAccs.GetSize(); |
704 for (int32_t i = 0; i < iCounts; i++) { | 711 for (int32_t i = 0; i < iCounts; i++) { |
705 CXFA_WidgetAcc* pAcc = m_ValidateAccs[i]; | 712 CXFA_WidgetAcc* pAcc = m_ValidateAccs[i]; |
706 if (pAcc->GetNode()->HasRemovedChildren()) | 713 if (pAcc->GetNode()->HasRemovedChildren()) |
707 continue; | 714 continue; |
708 | 715 |
709 pAcc->ProcessValidate(); | 716 pAcc->ProcessValidate(); |
710 } | 717 } |
711 m_ValidateAccs.RemoveAll(); | 718 m_ValidateAccs.RemoveAll(); |
712 return TRUE; | 719 return TRUE; |
713 } | 720 } |
714 FX_BOOL CXFA_FFDocView::RunEventLayoutReady() { | 721 FX_BOOL CXFA_FFDocView::RunEventLayoutReady() { |
715 CXFA_Node* pRootItem = | 722 CXFA_Node* pRootItem = |
716 ToNode(m_pDoc->GetXFADoc()->GetXFAObject(XFA_HASHCODE_Form)); | 723 ToNode(m_pDoc->GetXFADoc()->GetXFAObject(XFA_HASHCODE_Form)); |
717 if (!pRootItem) { | 724 if (!pRootItem) { |
718 return FALSE; | 725 return FALSE; |
719 } | 726 } |
720 ExecEventActivityByDeepFirst(pRootItem, XFA_EVENT_Ready); | 727 ExecEventActivityByDeepFirst(pRootItem, XFA_EVENT_Ready, FALSE, TRUE, |
| 728 nullptr); |
721 RunLayout(); | 729 RunLayout(); |
722 return TRUE; | 730 return TRUE; |
723 } | 731 } |
724 void CXFA_FFDocView::RunBindItems() { | 732 void CXFA_FFDocView::RunBindItems() { |
725 for (int32_t i = 0; i < m_BindItems.GetSize(); i++) { | 733 for (int32_t i = 0; i < m_BindItems.GetSize(); i++) { |
726 if (m_BindItems[i]->HasRemovedChildren()) | 734 if (m_BindItems[i]->HasRemovedChildren()) |
727 continue; | 735 continue; |
728 | 736 |
729 CXFA_Node* pWidgetNode = m_BindItems[i]->GetNodeItem(XFA_NODEITEM_Parent); | 737 CXFA_Node* pWidgetNode = m_BindItems[i]->GetNodeItem(XFA_NODEITEM_Parent); |
730 CXFA_WidgetAcc* pAcc = | 738 CXFA_WidgetAcc* pAcc = |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
796 CXFA_Node* pFormPacketNode = | 804 CXFA_Node* pFormPacketNode = |
797 ToNode(m_pDoc->GetXFADoc()->GetXFAObject(XFA_HASHCODE_Form)); | 805 ToNode(m_pDoc->GetXFADoc()->GetXFAObject(XFA_HASHCODE_Form)); |
798 if (!pFormPacketNode) { | 806 if (!pFormPacketNode) { |
799 return nullptr; | 807 return nullptr; |
800 } | 808 } |
801 return pFormPacketNode->GetFirstChildByClass(XFA_Element::Subform); | 809 return pFormPacketNode->GetFirstChildByClass(XFA_Element::Subform); |
802 } | 810 } |
803 | 811 |
804 CXFA_WidgetAccIterator::CXFA_WidgetAccIterator(CXFA_FFDocView* pDocView, | 812 CXFA_WidgetAccIterator::CXFA_WidgetAccIterator(CXFA_FFDocView* pDocView, |
805 CXFA_Node* pTravelRoot) | 813 CXFA_Node* pTravelRoot) |
806 : m_ContentIterator(pTravelRoot) { | 814 : m_ContentIterator(pTravelRoot), |
807 m_pDocView = pDocView; | 815 m_pDocView(pDocView), |
808 m_pCurWidgetAcc = nullptr; | 816 m_pCurWidgetAcc(nullptr) {} |
809 } | 817 |
810 CXFA_WidgetAccIterator::~CXFA_WidgetAccIterator() {} | 818 CXFA_WidgetAccIterator::~CXFA_WidgetAccIterator() {} |
811 void CXFA_WidgetAccIterator::Reset() { | 819 void CXFA_WidgetAccIterator::Reset() { |
812 m_pCurWidgetAcc = nullptr; | 820 m_pCurWidgetAcc = nullptr; |
813 m_ContentIterator.Reset(); | 821 m_ContentIterator.Reset(); |
814 } | 822 } |
| 823 |
815 CXFA_WidgetAcc* CXFA_WidgetAccIterator::MoveToFirst() { | 824 CXFA_WidgetAcc* CXFA_WidgetAccIterator::MoveToFirst() { |
816 return nullptr; | 825 return nullptr; |
817 } | 826 } |
| 827 |
818 CXFA_WidgetAcc* CXFA_WidgetAccIterator::MoveToLast() { | 828 CXFA_WidgetAcc* CXFA_WidgetAccIterator::MoveToLast() { |
819 return nullptr; | 829 return nullptr; |
820 } | 830 } |
| 831 |
821 CXFA_WidgetAcc* CXFA_WidgetAccIterator::MoveToNext() { | 832 CXFA_WidgetAcc* CXFA_WidgetAccIterator::MoveToNext() { |
822 CXFA_Node* pItem = m_pCurWidgetAcc ? m_ContentIterator.MoveToNext() | 833 CXFA_Node* pItem = m_pCurWidgetAcc ? m_ContentIterator.MoveToNext() |
823 : m_ContentIterator.GetCurrent(); | 834 : m_ContentIterator.GetCurrent(); |
824 while (pItem) { | 835 while (pItem) { |
825 m_pCurWidgetAcc = static_cast<CXFA_WidgetAcc*>(pItem->GetWidgetData()); | 836 m_pCurWidgetAcc = static_cast<CXFA_WidgetAcc*>(pItem->GetWidgetData()); |
826 if (m_pCurWidgetAcc) | 837 if (m_pCurWidgetAcc) |
827 return m_pCurWidgetAcc; | 838 return m_pCurWidgetAcc; |
828 pItem = m_ContentIterator.MoveToNext(); | 839 pItem = m_ContentIterator.MoveToNext(); |
829 } | 840 } |
830 return nullptr; | 841 return nullptr; |
831 } | 842 } |
| 843 |
832 CXFA_WidgetAcc* CXFA_WidgetAccIterator::MoveToPrevious() { | 844 CXFA_WidgetAcc* CXFA_WidgetAccIterator::MoveToPrevious() { |
833 return nullptr; | 845 return nullptr; |
834 } | 846 } |
| 847 |
835 CXFA_WidgetAcc* CXFA_WidgetAccIterator::GetCurrentWidgetAcc() { | 848 CXFA_WidgetAcc* CXFA_WidgetAccIterator::GetCurrentWidgetAcc() { |
836 return nullptr; | 849 return nullptr; |
837 } | 850 } |
| 851 |
838 FX_BOOL CXFA_WidgetAccIterator::SetCurrentWidgetAcc(CXFA_WidgetAcc* hWidget) { | 852 FX_BOOL CXFA_WidgetAccIterator::SetCurrentWidgetAcc(CXFA_WidgetAcc* hWidget) { |
839 return FALSE; | 853 return FALSE; |
840 } | 854 } |
| 855 |
841 void CXFA_WidgetAccIterator::SkipTree() { | 856 void CXFA_WidgetAccIterator::SkipTree() { |
842 m_ContentIterator.SkipChildrenAndMoveToNext(); | 857 m_ContentIterator.SkipChildrenAndMoveToNext(); |
843 m_pCurWidgetAcc = nullptr; | 858 m_pCurWidgetAcc = nullptr; |
844 } | 859 } |
OLD | NEW |