| 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 "../../include/fpdfdoc/fpdf_doc.h" | 7 #include "core/include/fpdfdoc/fpdf_doc.h" |
| 8 #include "doc_utils.h" | 8 #include "doc_utils.h" |
| 9 | 9 |
| 10 static const int FPDFDOC_UTILS_MAXRECURSION = 32; | 10 static const int FPDFDOC_UTILS_MAXRECURSION = 32; |
| 11 | 11 |
| 12 CFX_WideString GetFullName(CPDF_Dictionary* pFieldDict) { | 12 CFX_WideString GetFullName(CPDF_Dictionary* pFieldDict) { |
| 13 CFX_WideString full_name; | 13 CFX_WideString full_name; |
| 14 CPDF_Dictionary* pLevel = pFieldDict; | 14 CPDF_Dictionary* pLevel = pFieldDict; |
| 15 while (pLevel) { | 15 while (pLevel) { |
| 16 CFX_WideString short_name = pLevel->GetUnicodeText("T"); | 16 CFX_WideString short_name = pLevel->GetUnicodeText("T"); |
| 17 if (short_name != L"") { | 17 if (short_name != L"") { |
| (...skipping 700 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 718 CPDF_Object* pAttr = pFieldDict->GetElementValue(name); | 718 CPDF_Object* pAttr = pFieldDict->GetElementValue(name); |
| 719 if (pAttr) { | 719 if (pAttr) { |
| 720 return pAttr; | 720 return pAttr; |
| 721 } | 721 } |
| 722 CPDF_Dictionary* pParent = pFieldDict->GetDict("Parent"); | 722 CPDF_Dictionary* pParent = pFieldDict->GetDict("Parent"); |
| 723 if (pParent == NULL) { | 723 if (pParent == NULL) { |
| 724 return NULL; | 724 return NULL; |
| 725 } | 725 } |
| 726 return FPDF_GetFieldAttr(pParent, name, nLevel + 1); | 726 return FPDF_GetFieldAttr(pParent, name, nLevel + 1); |
| 727 } | 727 } |
| OLD | NEW |