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