| 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 | 8 |
| 9 #include "core/include/fpdfapi/cpdf_document.h" | 9 #include "core/include/fpdfapi/cpdf_document.h" |
| 10 #include "core/include/fpdfapi/cpdf_simple_parser.h" |
| 10 #include "core/include/fpdfdoc/fpdf_doc.h" | 11 #include "core/include/fpdfdoc/fpdf_doc.h" |
| 11 #include "core/src/fpdfdoc/doc_utils.h" | 12 #include "core/src/fpdfdoc/doc_utils.h" |
| 12 | 13 |
| 13 static const int FPDFDOC_UTILS_MAXRECURSION = 32; | 14 static const int FPDFDOC_UTILS_MAXRECURSION = 32; |
| 14 | 15 |
| 15 CFX_WideString GetFullName(CPDF_Dictionary* pFieldDict) { | 16 CFX_WideString GetFullName(CPDF_Dictionary* pFieldDict) { |
| 16 CFX_WideString full_name; | 17 CFX_WideString full_name; |
| 17 CPDF_Dictionary* pLevel = pFieldDict; | 18 CPDF_Dictionary* pLevel = pFieldDict; |
| 18 while (pLevel) { | 19 while (pLevel) { |
| 19 CFX_WideString short_name = pLevel->GetUnicodeTextBy("T"); | 20 CFX_WideString short_name = pLevel->GetUnicodeTextBy("T"); |
| (...skipping 676 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 696 CPDF_Object* pAttr = pFieldDict->GetElementValue(name); | 697 CPDF_Object* pAttr = pFieldDict->GetElementValue(name); |
| 697 if (pAttr) { | 698 if (pAttr) { |
| 698 return pAttr; | 699 return pAttr; |
| 699 } | 700 } |
| 700 CPDF_Dictionary* pParent = pFieldDict->GetDictBy("Parent"); | 701 CPDF_Dictionary* pParent = pFieldDict->GetDictBy("Parent"); |
| 701 if (!pParent) { | 702 if (!pParent) { |
| 702 return NULL; | 703 return NULL; |
| 703 } | 704 } |
| 704 return FPDF_GetFieldAttr(pParent, name, nLevel + 1); | 705 return FPDF_GetFieldAttr(pParent, name, nLevel + 1); |
| 705 } | 706 } |
| OLD | NEW |