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 "public/fpdf_formfill.h" | 7 #include "public/fpdf_formfill.h" |
8 | 8 |
9 #include <memory> | 9 #include <memory> |
10 #include <vector> | 10 #include <vector> |
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
85 | 85 |
86 CXFA_FFDocView* pDocView = pPageView->GetDocView(); | 86 CXFA_FFDocView* pDocView = pPageView->GetDocView(); |
87 if (!pDocView) | 87 if (!pDocView) |
88 return -1; | 88 return -1; |
89 | 89 |
90 CXFA_FFWidgetHandler* pWidgetHandler = pDocView->GetWidgetHandler(); | 90 CXFA_FFWidgetHandler* pWidgetHandler = pDocView->GetWidgetHandler(); |
91 if (!pWidgetHandler) | 91 if (!pWidgetHandler) |
92 return -1; | 92 return -1; |
93 | 93 |
94 std::unique_ptr<IXFA_WidgetIterator> pWidgetIterator( | 94 std::unique_ptr<IXFA_WidgetIterator> pWidgetIterator( |
95 pPageView->CreateWidgetIterator( | 95 pPageView->CreateWidgetIterator(XFA_TRAVERSEWAY_Form, |
96 XFA_TRAVERSEWAY_Form, | 96 XFA_WidgetStatus_Viewable)); |
97 XFA_WIDGETFILTER_Viewable | XFA_WIDGETFILTER_AllType)); | |
98 if (!pWidgetIterator) | 97 if (!pWidgetIterator) |
99 return -1; | 98 return -1; |
100 | 99 |
101 CXFA_FFWidget* pXFAAnnot = pWidgetIterator->MoveToNext(); | 100 CXFA_FFWidget* pXFAAnnot = pWidgetIterator->MoveToNext(); |
102 while (pXFAAnnot) { | 101 while (pXFAAnnot) { |
103 CFX_RectF rcBBox; | 102 CFX_RectF rcBBox; |
104 pXFAAnnot->GetBBox(rcBBox, 0); | 103 pXFAAnnot->GetBBox(rcBBox, 0); |
105 CFX_FloatRect rcWidget(rcBBox.left, rcBBox.top, rcBBox.left + rcBBox.width, | 104 CFX_FloatRect rcWidget(rcBBox.left, rcBBox.top, rcBBox.left + rcBBox.width, |
106 rcBBox.top + rcBBox.height); | 105 rcBBox.top + rcBBox.height); |
107 rcWidget.left -= 1.0f; | 106 rcWidget.left -= 1.0f; |
(...skipping 608 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
716 pActionHandler->DoAction_Page(action, CPDF_AAction::OpenPage, pSDKDoc); | 715 pActionHandler->DoAction_Page(action, CPDF_AAction::OpenPage, pSDKDoc); |
717 } | 716 } |
718 } else { | 717 } else { |
719 if (aa.ActionExist(CPDF_AAction::ClosePage)) { | 718 if (aa.ActionExist(CPDF_AAction::ClosePage)) { |
720 CPDF_Action action = aa.GetAction(CPDF_AAction::ClosePage); | 719 CPDF_Action action = aa.GetAction(CPDF_AAction::ClosePage); |
721 pActionHandler->DoAction_Page(action, CPDF_AAction::ClosePage, pSDKDoc); | 720 pActionHandler->DoAction_Page(action, CPDF_AAction::ClosePage, pSDKDoc); |
722 } | 721 } |
723 } | 722 } |
724 } | 723 } |
725 } | 724 } |
OLD | NEW |