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 "fpdfsdk/include/fsdk_baseform.h" | 7 #include "fpdfsdk/include/fsdk_baseform.h" |
8 | 8 |
9 #include <algorithm> | 9 #include <algorithm> |
10 #include <map> | 10 #include <map> |
(...skipping 2294 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2305 return fa.bRC; | 2305 return fa.bRC; |
2306 } | 2306 } |
2307 | 2307 |
2308 FX_BOOL CPDFSDK_InterForm::DoAction_Hide(const CPDF_Action& action) { | 2308 FX_BOOL CPDFSDK_InterForm::DoAction_Hide(const CPDF_Action& action) { |
2309 ASSERT(action.GetDict()); | 2309 ASSERT(action.GetDict()); |
2310 | 2310 |
2311 CPDF_ActionFields af(&action); | 2311 CPDF_ActionFields af(&action); |
2312 std::vector<CPDF_Object*> fieldObjects = af.GetAllFields(); | 2312 std::vector<CPDF_Object*> fieldObjects = af.GetAllFields(); |
2313 std::vector<CPDF_FormField*> fields = GetFieldFromObjects(fieldObjects); | 2313 std::vector<CPDF_FormField*> fields = GetFieldFromObjects(fieldObjects); |
2314 | 2314 |
2315 FX_BOOL bHide = action.GetHideStatus(); | 2315 bool bHide = action.GetHideStatus(); |
2316 FX_BOOL bChanged = FALSE; | 2316 FX_BOOL bChanged = FALSE; |
2317 | 2317 |
2318 for (CPDF_FormField* pField : fields) { | 2318 for (CPDF_FormField* pField : fields) { |
2319 for (int i = 0, sz = pField->CountControls(); i < sz; ++i) { | 2319 for (int i = 0, sz = pField->CountControls(); i < sz; ++i) { |
2320 CPDF_FormControl* pControl = pField->GetControl(i); | 2320 CPDF_FormControl* pControl = pField->GetControl(i); |
2321 ASSERT(pControl); | 2321 ASSERT(pControl); |
2322 | 2322 |
2323 if (CPDFSDK_Widget* pWidget = GetWidget(pControl)) { | 2323 if (CPDFSDK_Widget* pWidget = GetWidget(pControl)) { |
2324 uint32_t nFlags = pWidget->GetFlags(); | 2324 uint32_t nFlags = pWidget->GetFlags(); |
2325 nFlags &= ~ANNOTFLAG_INVISIBLE; | 2325 nFlags &= ~ANNOTFLAG_INVISIBLE; |
(...skipping 479 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2805 break; | 2805 break; |
2806 } | 2806 } |
2807 } | 2807 } |
2808 } | 2808 } |
2809 | 2809 |
2810 CFX_FloatRect CBA_AnnotIterator::GetAnnotRect(const CPDFSDK_Annot* pAnnot) { | 2810 CFX_FloatRect CBA_AnnotIterator::GetAnnotRect(const CPDFSDK_Annot* pAnnot) { |
2811 CFX_FloatRect rcAnnot; | 2811 CFX_FloatRect rcAnnot; |
2812 pAnnot->GetPDFAnnot()->GetRect(rcAnnot); | 2812 pAnnot->GetPDFAnnot()->GetRect(rcAnnot); |
2813 return rcAnnot; | 2813 return rcAnnot; |
2814 } | 2814 } |
OLD | NEW |