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/xfa_ffdocview.h" | 7 #include "xfa/fxfa/xfa_ffdocview.h" |
8 | 8 |
9 #include "core/fxcrt/fx_ext.h" | 9 #include "core/fxcrt/fx_ext.h" |
10 #include "third_party/base/ptr_util.h" | 10 #include "third_party/base/ptr_util.h" |
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
131 ExecEventActivityByDeepFirst(pRootItem, XFA_EVENT_Ready, false, true, | 131 ExecEventActivityByDeepFirst(pRootItem, XFA_EVENT_Ready, false, true, |
132 nullptr); | 132 nullptr); |
133 ExecEventActivityByDeepFirst(pRootItem, XFA_EVENT_DocReady, false, true, | 133 ExecEventActivityByDeepFirst(pRootItem, XFA_EVENT_DocReady, false, true, |
134 nullptr); | 134 nullptr); |
135 RunCalculateWidgets(); | 135 RunCalculateWidgets(); |
136 RunValidate(); | 136 RunValidate(); |
137 if (RunLayout()) { | 137 if (RunLayout()) { |
138 ExecEventActivityByDeepFirst(pRootItem, XFA_EVENT_Ready, false, true, | 138 ExecEventActivityByDeepFirst(pRootItem, XFA_EVENT_Ready, false, true, |
139 nullptr); | 139 nullptr); |
140 } | 140 } |
141 m_CalculateAccs.RemoveAll(); | 141 m_CalculateAccs.clear(); |
142 if (m_pFocusAcc && !m_pFocusWidget) { | 142 if (m_pFocusAcc && !m_pFocusWidget) { |
143 SetFocusWidgetAcc(m_pFocusAcc); | 143 SetFocusWidgetAcc(m_pFocusAcc); |
144 } | 144 } |
145 m_iStatus = XFA_DOCVIEW_LAYOUTSTATUS_End; | 145 m_iStatus = XFA_DOCVIEW_LAYOUTSTATUS_End; |
146 } | 146 } |
147 int32_t CXFA_FFDocView::GetLayoutStatus() { | 147 int32_t CXFA_FFDocView::GetLayoutStatus() { |
148 return m_iStatus; | 148 return m_iStatus; |
149 } | 149 } |
150 void CXFA_FFDocView::ShowNullTestMsg() { | 150 void CXFA_FFDocView::ShowNullTestMsg() { |
151 int32_t iCount = pdfium::CollectionSize<int32_t>(m_arrNullTestMsg); | 151 int32_t iCount = pdfium::CollectionSize<int32_t>(m_arrNullTestMsg); |
(...skipping 14 matching lines...) Expand all Loading... | |
166 wsTemp.Format(wsLimit.c_str(), iRemain); | 166 wsTemp.Format(wsLimit.c_str(), iRemain); |
167 wsMsg += FX_WSTRC(L"\n") + wsTemp; | 167 wsMsg += FX_WSTRC(L"\n") + wsTemp; |
168 } | 168 } |
169 } | 169 } |
170 CFX_WideString wsTitle; | 170 CFX_WideString wsTitle; |
171 pAppProvider->LoadString(XFA_IDS_AppName, wsTitle); | 171 pAppProvider->LoadString(XFA_IDS_AppName, wsTitle); |
172 pAppProvider->MsgBox(wsMsg, wsTitle, XFA_MBICON_Status, XFA_MB_OK); | 172 pAppProvider->MsgBox(wsMsg, wsTitle, XFA_MBICON_Status, XFA_MB_OK); |
173 } | 173 } |
174 m_arrNullTestMsg.clear(); | 174 m_arrNullTestMsg.clear(); |
175 } | 175 } |
176 | |
176 void CXFA_FFDocView::UpdateDocView() { | 177 void CXFA_FFDocView::UpdateDocView() { |
177 if (IsUpdateLocked()) { | 178 if (IsUpdateLocked()) |
178 return; | 179 return; |
179 } | 180 |
180 LockUpdate(); | 181 LockUpdate(); |
181 int32_t iNewAdds = m_NewAddedNodes.GetSize(); | 182 for (CXFA_Node* pNode : m_NewAddedNodes) { |
182 for (int32_t i = 0; i < iNewAdds; i++) { | |
183 CXFA_Node* pNode = m_NewAddedNodes[i]; | |
184 InitCalculate(pNode); | 183 InitCalculate(pNode); |
185 InitValidate(pNode); | 184 InitValidate(pNode); |
186 ExecEventActivityByDeepFirst(pNode, XFA_EVENT_Ready, true, true, nullptr); | 185 ExecEventActivityByDeepFirst(pNode, XFA_EVENT_Ready, true, true, nullptr); |
187 } | 186 } |
188 m_NewAddedNodes.RemoveAll(); | 187 m_NewAddedNodes.clear(); |
189 RunSubformIndexChange(); | 188 RunSubformIndexChange(); |
190 RunCalculateWidgets(); | 189 RunCalculateWidgets(); |
191 RunValidate(); | 190 RunValidate(); |
192 ShowNullTestMsg(); | 191 ShowNullTestMsg(); |
193 if (RunLayout() && m_bLayoutEvent) { | 192 if (RunLayout() && m_bLayoutEvent) |
194 RunEventLayoutReady(); | 193 RunEventLayoutReady(); |
195 } | 194 |
196 m_bLayoutEvent = false; | 195 m_bLayoutEvent = false; |
197 m_CalculateAccs.RemoveAll(); | 196 m_CalculateAccs.clear(); |
198 RunInvalidate(); | 197 RunInvalidate(); |
199 UnlockUpdate(); | 198 UnlockUpdate(); |
200 } | 199 } |
200 | |
201 int32_t CXFA_FFDocView::CountPageViews() { | 201 int32_t CXFA_FFDocView::CountPageViews() { |
202 if (!m_pXFADocLayout) { | 202 if (!m_pXFADocLayout) { |
203 return 0; | 203 return 0; |
204 } | 204 } |
205 return m_pXFADocLayout->CountPages(); | 205 return m_pXFADocLayout->CountPages(); |
206 } | 206 } |
207 CXFA_FFPageView* CXFA_FFDocView::GetPageView(int32_t nIndex) { | 207 CXFA_FFPageView* CXFA_FFDocView::GetPageView(int32_t nIndex) { |
208 if (!m_pXFADocLayout) { | 208 if (!m_pXFADocLayout) { |
209 return nullptr; | 209 return nullptr; |
210 } | 210 } |
(...skipping 366 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
577 m_pDoc->GetDocEnvironment()->PageViewEvent(nullptr, | 577 m_pDoc->GetDocEnvironment()->PageViewEvent(nullptr, |
578 XFA_PAGEVIEWEVENT_StopLayout); | 578 XFA_PAGEVIEWEVENT_StopLayout); |
579 return true; | 579 return true; |
580 } | 580 } |
581 m_bInLayoutStatus = false; | 581 m_bInLayoutStatus = false; |
582 m_pDoc->GetDocEnvironment()->PageViewEvent(nullptr, | 582 m_pDoc->GetDocEnvironment()->PageViewEvent(nullptr, |
583 XFA_PAGEVIEWEVENT_StopLayout); | 583 XFA_PAGEVIEWEVENT_StopLayout); |
584 UnlockUpdate(); | 584 UnlockUpdate(); |
585 return false; | 585 return false; |
586 } | 586 } |
587 | |
587 void CXFA_FFDocView::RunSubformIndexChange() { | 588 void CXFA_FFDocView::RunSubformIndexChange() { |
588 int32_t iSubforms = m_IndexChangedSubforms.GetSize(); | 589 for (CXFA_Node* pSubformNode : m_IndexChangedSubforms) { |
589 for (int32_t i = 0; i < iSubforms; i++) { | |
590 CXFA_Node* pSubformNode = m_IndexChangedSubforms[i]; | |
591 CXFA_WidgetAcc* pWidgetAcc = | 590 CXFA_WidgetAcc* pWidgetAcc = |
592 static_cast<CXFA_WidgetAcc*>(pSubformNode->GetWidgetData()); | 591 static_cast<CXFA_WidgetAcc*>(pSubformNode->GetWidgetData()); |
593 if (!pWidgetAcc) { | 592 if (!pWidgetAcc) |
594 continue; | 593 continue; |
595 } | 594 |
596 CXFA_EventParam eParam; | 595 CXFA_EventParam eParam; |
597 eParam.m_eType = XFA_EVENT_IndexChange; | 596 eParam.m_eType = XFA_EVENT_IndexChange; |
598 eParam.m_pTarget = pWidgetAcc; | 597 eParam.m_pTarget = pWidgetAcc; |
599 pWidgetAcc->ProcessEvent(XFA_ATTRIBUTEENUM_IndexChange, &eParam); | 598 pWidgetAcc->ProcessEvent(XFA_ATTRIBUTEENUM_IndexChange, &eParam); |
600 } | 599 } |
601 m_IndexChangedSubforms.RemoveAll(); | 600 m_IndexChangedSubforms.clear(); |
602 } | 601 } |
602 | |
603 void CXFA_FFDocView::AddNewFormNode(CXFA_Node* pNode) { | 603 void CXFA_FFDocView::AddNewFormNode(CXFA_Node* pNode) { |
604 m_NewAddedNodes.Add(pNode); | 604 m_NewAddedNodes.push_back(pNode); |
605 InitLayout(pNode); | 605 InitLayout(pNode); |
606 } | 606 } |
607 | |
607 void CXFA_FFDocView::AddIndexChangedSubform(CXFA_Node* pNode) { | 608 void CXFA_FFDocView::AddIndexChangedSubform(CXFA_Node* pNode) { |
608 ASSERT(pNode->GetElementType() == XFA_Element::Subform); | 609 ASSERT(pNode->GetElementType() == XFA_Element::Subform); |
609 m_IndexChangedSubforms.Add(pNode); | 610 m_IndexChangedSubforms.push_back(pNode); |
610 } | 611 } |
612 | |
611 void CXFA_FFDocView::RunDocClose() { | 613 void CXFA_FFDocView::RunDocClose() { |
612 CXFA_Node* pRootItem = | 614 CXFA_Node* pRootItem = |
613 ToNode(m_pDoc->GetXFADoc()->GetXFAObject(XFA_HASHCODE_Form)); | 615 ToNode(m_pDoc->GetXFADoc()->GetXFAObject(XFA_HASHCODE_Form)); |
614 if (!pRootItem) { | 616 if (!pRootItem) { |
615 return; | 617 return; |
616 } | 618 } |
617 ExecEventActivityByDeepFirst(pRootItem, XFA_EVENT_DocClose, false, true, | 619 ExecEventActivityByDeepFirst(pRootItem, XFA_EVENT_DocClose, false, true, |
618 nullptr); | 620 nullptr); |
619 } | 621 } |
620 void CXFA_FFDocView::DestroyDocView() { | 622 void CXFA_FFDocView::DestroyDocView() { |
621 ClearInvalidateList(); | 623 ClearInvalidateList(); |
622 m_iStatus = XFA_DOCVIEW_LAYOUTSTATUS_None; | 624 m_iStatus = XFA_DOCVIEW_LAYOUTSTATUS_None; |
623 m_iLock = 0; | 625 m_iLock = 0; |
624 m_ValidateAccs.RemoveAll(); | 626 m_ValidateAccs.clear(); |
625 m_BindItems.RemoveAll(); | 627 m_BindItems.clear(); |
626 m_CalculateAccs.RemoveAll(); | 628 m_CalculateAccs.clear(); |
627 } | 629 } |
628 bool CXFA_FFDocView::IsStaticNotify() { | 630 bool CXFA_FFDocView::IsStaticNotify() { |
629 return m_pDoc->GetDocType() == XFA_DOCTYPE_Static; | 631 return m_pDoc->GetDocType() == XFA_DOCTYPE_Static; |
630 } | 632 } |
631 void CXFA_FFDocView::AddCalculateWidgetAcc(CXFA_WidgetAcc* pWidgetAcc) { | 633 void CXFA_FFDocView::AddCalculateWidgetAcc(CXFA_WidgetAcc* pWidgetAcc) { |
632 int32_t iAccs = m_CalculateAccs.GetSize(); | |
633 CXFA_WidgetAcc* pCurrentAcc = | 634 CXFA_WidgetAcc* pCurrentAcc = |
634 iAccs > 0 ? m_CalculateAccs[iAccs - 1] : nullptr; | 635 !m_CalculateAccs.empty() ? m_CalculateAccs.back() : nullptr; |
635 if (pCurrentAcc != pWidgetAcc) { | 636 if (pCurrentAcc != pWidgetAcc) |
636 m_CalculateAccs.Add(pWidgetAcc); | 637 m_CalculateAccs.push_back(pWidgetAcc); |
637 } | |
638 } | 638 } |
639 void CXFA_FFDocView::AddCalculateNodeNotify(CXFA_Node* pNodeChange) { | 639 void CXFA_FFDocView::AddCalculateNodeNotify(CXFA_Node* pNodeChange) { |
640 CXFA_CalcData* pGlobalData = | 640 CXFA_CalcData* pGlobalData = |
641 (CXFA_CalcData*)pNodeChange->GetUserData(XFA_CalcData); | 641 (CXFA_CalcData*)pNodeChange->GetUserData(XFA_CalcData); |
642 int32_t iCount = pGlobalData ? pGlobalData->m_Globals.GetSize() : 0; | 642 int32_t iCount = pGlobalData ? pGlobalData->m_Globals.GetSize() : 0; |
643 for (int32_t i = 0; i < iCount; i++) { | 643 for (int32_t i = 0; i < iCount; i++) { |
644 CXFA_WidgetAcc* pResultAcc = pGlobalData->m_Globals[i]; | 644 CXFA_WidgetAcc* pResultAcc = pGlobalData->m_Globals[i]; |
645 if (pResultAcc->GetNode()->HasRemovedChildren()) | 645 if (pResultAcc->GetNode()->HasRemovedChildren()) |
646 continue; | 646 continue; |
647 | 647 |
648 int32_t iAccs = m_CalculateAccs.GetSize(); | |
649 CXFA_WidgetAcc* pCurrentAcc = | 648 CXFA_WidgetAcc* pCurrentAcc = |
dsinclair
2017/01/02 17:47:13
What about just doing:
AddCalculateWidgetAcc(pRes
Tom Sepez
2017/01/03 22:04:03
Done.
| |
650 iAccs > 0 ? m_CalculateAccs[iAccs - 1] : nullptr; | 649 !m_CalculateAccs.empty() ? m_CalculateAccs.back() : nullptr; |
651 if (pCurrentAcc != pResultAcc) { | 650 if (pCurrentAcc != pResultAcc) |
652 m_CalculateAccs.Add(pResultAcc); | 651 m_CalculateAccs.push_back(pResultAcc); |
653 } | |
654 } | 652 } |
655 } | 653 } |
656 void CXFA_FFDocView::RunCalculateRecursive(int32_t& iIndex) { | 654 void CXFA_FFDocView::RunCalculateRecursive(int32_t& iIndex) { |
657 while (iIndex < m_CalculateAccs.GetSize()) { | 655 while (iIndex < pdfium::CollectionSize<int32_t>(m_CalculateAccs)) { |
658 CXFA_WidgetAcc* pCurAcc = m_CalculateAccs[iIndex]; | 656 CXFA_WidgetAcc* pCurAcc = m_CalculateAccs[iIndex]; |
659 AddCalculateNodeNotify(pCurAcc->GetNode()); | 657 AddCalculateNodeNotify(pCurAcc->GetNode()); |
660 int32_t iRefCount = | 658 int32_t iRefCount = |
661 (int32_t)(uintptr_t)pCurAcc->GetNode()->GetUserData(XFA_CalcRefCount); | 659 (int32_t)(uintptr_t)pCurAcc->GetNode()->GetUserData(XFA_CalcRefCount); |
662 iRefCount++; | 660 iRefCount++; |
663 pCurAcc->GetNode()->SetUserData(XFA_CalcRefCount, | 661 pCurAcc->GetNode()->SetUserData(XFA_CalcRefCount, |
664 (void*)(uintptr_t)iRefCount); | 662 (void*)(uintptr_t)iRefCount); |
665 if (iRefCount > 11) { | 663 if (iRefCount > 11) { |
666 break; | 664 break; |
667 } | 665 } |
668 if ((pCurAcc->ProcessCalculate()) == XFA_EVENTERROR_Success) { | 666 if ((pCurAcc->ProcessCalculate()) == XFA_EVENTERROR_Success) { |
669 AddValidateWidget(pCurAcc); | 667 AddValidateWidget(pCurAcc); |
670 } | 668 } |
671 iIndex++; | 669 iIndex++; |
672 RunCalculateRecursive(iIndex); | 670 RunCalculateRecursive(iIndex); |
673 } | 671 } |
674 } | 672 } |
673 | |
675 int32_t CXFA_FFDocView::RunCalculateWidgets() { | 674 int32_t CXFA_FFDocView::RunCalculateWidgets() { |
676 if (!m_pDoc->GetDocEnvironment()->IsCalculationsEnabled(m_pDoc)) { | 675 if (!m_pDoc->GetDocEnvironment()->IsCalculationsEnabled(m_pDoc)) { |
677 return XFA_EVENTERROR_Disabled; | 676 return XFA_EVENTERROR_Disabled; |
678 } | 677 } |
679 int32_t iCounts = m_CalculateAccs.GetSize(); | 678 int32_t iCounts = pdfium::CollectionSize<int32_t>(m_CalculateAccs); |
680 int32_t iIndex = 0; | 679 int32_t iIndex = 0; |
681 if (iCounts > 0) { | 680 if (iCounts > 0) |
682 RunCalculateRecursive(iIndex); | 681 RunCalculateRecursive(iIndex); |
683 } | 682 |
684 for (int32_t i = 0; i < m_CalculateAccs.GetSize(); i++) { | 683 for (CXFA_WidgetAcc* pCurAcc : m_CalculateAccs) |
685 CXFA_WidgetAcc* pCurAcc = m_CalculateAccs[i]; | |
686 pCurAcc->GetNode()->SetUserData(XFA_CalcRefCount, (void*)(uintptr_t)0); | 684 pCurAcc->GetNode()->SetUserData(XFA_CalcRefCount, (void*)(uintptr_t)0); |
687 } | 685 |
688 m_CalculateAccs.RemoveAll(); | 686 m_CalculateAccs.clear(); |
689 return XFA_EVENTERROR_Success; | 687 return XFA_EVENTERROR_Success; |
690 } | 688 } |
689 | |
691 void CXFA_FFDocView::AddValidateWidget(CXFA_WidgetAcc* pWidget) { | 690 void CXFA_FFDocView::AddValidateWidget(CXFA_WidgetAcc* pWidget) { |
692 if (m_ValidateAccs.Find(pWidget) < 0) | 691 if (!pdfium::ContainsValue(m_ValidateAccs, pWidget)) |
693 m_ValidateAccs.Add(pWidget); | 692 m_ValidateAccs.push_back(pWidget); |
694 } | 693 } |
694 | |
695 bool CXFA_FFDocView::InitCalculate(CXFA_Node* pNode) { | 695 bool CXFA_FFDocView::InitCalculate(CXFA_Node* pNode) { |
696 ExecEventActivityByDeepFirst(pNode, XFA_EVENT_InitCalculate, false, true, | 696 ExecEventActivityByDeepFirst(pNode, XFA_EVENT_InitCalculate, false, true, |
697 nullptr); | 697 nullptr); |
698 return true; | 698 return true; |
699 } | 699 } |
700 | |
700 bool CXFA_FFDocView::InitValidate(CXFA_Node* pNode) { | 701 bool CXFA_FFDocView::InitValidate(CXFA_Node* pNode) { |
701 if (!m_pDoc->GetDocEnvironment()->IsValidationsEnabled(m_pDoc)) { | 702 if (!m_pDoc->GetDocEnvironment()->IsValidationsEnabled(m_pDoc)) |
702 return false; | 703 return false; |
703 } | 704 |
704 ExecEventActivityByDeepFirst(pNode, XFA_EVENT_Validate, false, true, nullptr); | 705 ExecEventActivityByDeepFirst(pNode, XFA_EVENT_Validate, false, true, nullptr); |
705 m_ValidateAccs.RemoveAll(); | 706 m_ValidateAccs.clear(); |
706 return true; | 707 return true; |
707 } | 708 } |
709 | |
708 bool CXFA_FFDocView::RunValidate() { | 710 bool CXFA_FFDocView::RunValidate() { |
709 if (!m_pDoc->GetDocEnvironment()->IsValidationsEnabled(m_pDoc)) { | 711 if (!m_pDoc->GetDocEnvironment()->IsValidationsEnabled(m_pDoc)) |
710 return false; | 712 return false; |
713 | |
714 for (CXFA_WidgetAcc* pAcc : m_ValidateAccs) { | |
715 if (!pAcc->GetNode()->HasRemovedChildren()) | |
716 pAcc->ProcessValidate(); | |
711 } | 717 } |
712 int32_t iCounts = m_ValidateAccs.GetSize(); | 718 m_ValidateAccs.clear(); |
713 for (int32_t i = 0; i < iCounts; i++) { | |
714 CXFA_WidgetAcc* pAcc = m_ValidateAccs[i]; | |
715 if (pAcc->GetNode()->HasRemovedChildren()) | |
716 continue; | |
717 | |
718 pAcc->ProcessValidate(); | |
719 } | |
720 m_ValidateAccs.RemoveAll(); | |
721 return true; | 719 return true; |
722 } | 720 } |
723 bool CXFA_FFDocView::RunEventLayoutReady() { | 721 bool CXFA_FFDocView::RunEventLayoutReady() { |
724 CXFA_Node* pRootItem = | 722 CXFA_Node* pRootItem = |
725 ToNode(m_pDoc->GetXFADoc()->GetXFAObject(XFA_HASHCODE_Form)); | 723 ToNode(m_pDoc->GetXFADoc()->GetXFAObject(XFA_HASHCODE_Form)); |
726 if (!pRootItem) { | 724 if (!pRootItem) { |
727 return false; | 725 return false; |
728 } | 726 } |
729 ExecEventActivityByDeepFirst(pRootItem, XFA_EVENT_Ready, false, true, | 727 ExecEventActivityByDeepFirst(pRootItem, XFA_EVENT_Ready, false, true, |
730 nullptr); | 728 nullptr); |
731 RunLayout(); | 729 RunLayout(); |
732 return true; | 730 return true; |
733 } | 731 } |
734 void CXFA_FFDocView::RunBindItems() { | 732 void CXFA_FFDocView::RunBindItems() { |
735 for (int32_t i = 0; i < m_BindItems.GetSize(); i++) { | 733 for (const auto& item : m_BindItems) { |
736 if (m_BindItems[i]->HasRemovedChildren()) | 734 if (item->HasRemovedChildren()) |
737 continue; | 735 continue; |
738 | 736 |
739 CXFA_Node* pWidgetNode = m_BindItems[i]->GetNodeItem(XFA_NODEITEM_Parent); | 737 CXFA_Node* pWidgetNode = item->GetNodeItem(XFA_NODEITEM_Parent); |
740 CXFA_WidgetAcc* pAcc = | 738 CXFA_WidgetAcc* pAcc = |
741 static_cast<CXFA_WidgetAcc*>(pWidgetNode->GetWidgetData()); | 739 static_cast<CXFA_WidgetAcc*>(pWidgetNode->GetWidgetData()); |
742 if (!pAcc) | 740 if (!pAcc) |
743 continue; | 741 continue; |
744 | 742 |
745 CXFA_BindItems binditems(m_BindItems[i]); | 743 CXFA_BindItems binditems(item); |
746 CXFA_ScriptContext* pScriptContext = | 744 CXFA_ScriptContext* pScriptContext = |
747 pWidgetNode->GetDocument()->GetScriptContext(); | 745 pWidgetNode->GetDocument()->GetScriptContext(); |
748 CFX_WideStringC wsRef; | 746 CFX_WideStringC wsRef; |
749 binditems.GetRef(wsRef); | 747 binditems.GetRef(wsRef); |
750 uint32_t dwStyle = XFA_RESOLVENODE_Children | XFA_RESOLVENODE_Properties | | 748 uint32_t dwStyle = XFA_RESOLVENODE_Children | XFA_RESOLVENODE_Properties | |
751 XFA_RESOLVENODE_Siblings | XFA_RESOLVENODE_Parent | | 749 XFA_RESOLVENODE_Siblings | XFA_RESOLVENODE_Parent | |
752 XFA_RESOLVENODE_ALL; | 750 XFA_RESOLVENODE_ALL; |
753 XFA_RESOLVENODE_RS rs; | 751 XFA_RESOLVENODE_RS rs; |
754 pScriptContext->ResolveObjects(pWidgetNode, wsRef, rs, dwStyle); | 752 pScriptContext->ResolveObjects(pWidgetNode, wsRef, rs, dwStyle); |
755 int32_t iCount = rs.nodes.GetSize(); | 753 int32_t iCount = rs.nodes.GetSize(); |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
787 CXFA_Node* nodeLabel = refNode->GetFirstChildByName(wsLabelRef); | 785 CXFA_Node* nodeLabel = refNode->GetFirstChildByName(wsLabelRef); |
788 if (nodeLabel) | 786 if (nodeLabel) |
789 wsLabel = nodeLabel->GetContent(); | 787 wsLabel = nodeLabel->GetContent(); |
790 } | 788 } |
791 } else { | 789 } else { |
792 wsLabel = wsValue; | 790 wsLabel = wsValue; |
793 } | 791 } |
794 pAcc->InsertItem(wsLabel, wsValue); | 792 pAcc->InsertItem(wsLabel, wsValue); |
795 } | 793 } |
796 } | 794 } |
797 m_BindItems.RemoveAll(); | 795 m_BindItems.clear(); |
798 } | 796 } |
799 void CXFA_FFDocView::SetChangeMark() { | 797 void CXFA_FFDocView::SetChangeMark() { |
800 if (m_iStatus < XFA_DOCVIEW_LAYOUTSTATUS_End) { | 798 if (m_iStatus < XFA_DOCVIEW_LAYOUTSTATUS_End) { |
801 return; | 799 return; |
802 } | 800 } |
803 m_pDoc->GetDocEnvironment()->SetChangeMark(m_pDoc); | 801 m_pDoc->GetDocEnvironment()->SetChangeMark(m_pDoc); |
804 } | 802 } |
805 CXFA_Node* CXFA_FFDocView::GetRootSubform() { | 803 CXFA_Node* CXFA_FFDocView::GetRootSubform() { |
806 CXFA_Node* pFormPacketNode = | 804 CXFA_Node* pFormPacketNode = |
807 ToNode(m_pDoc->GetXFADoc()->GetXFAObject(XFA_HASHCODE_Form)); | 805 ToNode(m_pDoc->GetXFADoc()->GetXFAObject(XFA_HASHCODE_Form)); |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
852 } | 850 } |
853 | 851 |
854 bool CXFA_WidgetAccIterator::SetCurrentWidgetAcc(CXFA_WidgetAcc* hWidget) { | 852 bool CXFA_WidgetAccIterator::SetCurrentWidgetAcc(CXFA_WidgetAcc* hWidget) { |
855 return false; | 853 return false; |
856 } | 854 } |
857 | 855 |
858 void CXFA_WidgetAccIterator::SkipTree() { | 856 void CXFA_WidgetAccIterator::SkipTree() { |
859 m_ContentIterator.SkipChildrenAndMoveToNext(); | 857 m_ContentIterator.SkipChildrenAndMoveToNext(); |
860 m_pCurWidgetAcc = nullptr; | 858 m_pCurWidgetAcc = nullptr; |
861 } | 859 } |
OLD | NEW |