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 <algorithm> | 7 #include <algorithm> |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "core/fpdfapi/fpdf_font/include/cpdf_font.h" | 10 #include "core/fpdfapi/fpdf_font/include/cpdf_font.h" |
11 #include "core/fpdfapi/fpdf_parser/include/cpdf_array.h" | 11 #include "core/fpdfapi/fpdf_parser/include/cpdf_array.h" |
12 #include "core/fpdfapi/fpdf_parser/include/cpdf_document.h" | 12 #include "core/fpdfapi/fpdf_parser/include/cpdf_document.h" |
13 #include "core/fpdfapi/fpdf_parser/include/cpdf_simple_parser.h" | 13 #include "core/fpdfapi/fpdf_parser/include/cpdf_simple_parser.h" |
| 14 #include "core/fpdfapi/fpdf_parser/include/fpdf_parser_decode.h" |
14 #include "core/fpdfdoc/doc_utils.h" | 15 #include "core/fpdfdoc/doc_utils.h" |
15 #include "core/fpdfdoc/include/fpdf_doc.h" | 16 #include "core/fpdfdoc/include/cpdf_defaultappearance.h" |
| 17 #include "core/fpdfdoc/include/cpdf_formcontrol.h" |
| 18 #include "core/fpdfdoc/include/cpdf_interform.h" |
16 #include "core/fxge/include/fx_font.h" | 19 #include "core/fxge/include/fx_font.h" |
17 | 20 |
18 namespace { | 21 namespace { |
19 | 22 |
20 const int FPDFDOC_UTILS_MAXRECURSION = 32; | 23 const int FPDFDOC_UTILS_MAXRECURSION = 32; |
21 | 24 |
22 CPDF_Object* SearchNumberNode(const CPDF_Dictionary* pNode, int num) { | 25 CPDF_Object* SearchNumberNode(const CPDF_Dictionary* pNode, int num) { |
23 CPDF_Array* pLimits = pNode->GetArrayBy("Limits"); | 26 CPDF_Array* pLimits = pNode->GetArrayBy("Limits"); |
24 if (pLimits && | 27 if (pLimits && |
25 (num < pLimits->GetIntegerAt(0) || num > pLimits->GetIntegerAt(1))) { | 28 (num < pLimits->GetIntegerAt(0) || num > pLimits->GetIntegerAt(1))) { |
(...skipping 720 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
746 CPDF_Object* pAttr = pFieldDict->GetDirectObjectBy(name); | 749 CPDF_Object* pAttr = pFieldDict->GetDirectObjectBy(name); |
747 if (pAttr) { | 750 if (pAttr) { |
748 return pAttr; | 751 return pAttr; |
749 } | 752 } |
750 CPDF_Dictionary* pParent = pFieldDict->GetDictBy("Parent"); | 753 CPDF_Dictionary* pParent = pFieldDict->GetDictBy("Parent"); |
751 if (!pParent) { | 754 if (!pParent) { |
752 return nullptr; | 755 return nullptr; |
753 } | 756 } |
754 return FPDF_GetFieldAttr(pParent, name, nLevel + 1); | 757 return FPDF_GetFieldAttr(pParent, name, nLevel + 1); |
755 } | 758 } |
OLD | NEW |