Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(7)

Side by Side Diff: core/src/fpdfdoc/doc_utils.cpp

Issue 1773103003: Split off CPDF_Parser and CPDF_SimpleParser into .h/.cpp files (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Then address C#3. Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « core/src/fpdfdoc/doc_formfield.cpp ('k') | fpdfsdk/include/fsdk_define.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/include/fpdfapi/cpdf_document.h" 10 #include "core/include/fpdfapi/cpdf_document.h"
11 #include "core/include/fpdfapi/cpdf_simple_parser.h"
11 #include "core/include/fpdfdoc/fpdf_doc.h" 12 #include "core/include/fpdfdoc/fpdf_doc.h"
12 #include "core/src/fpdfdoc/doc_utils.h" 13 #include "core/src/fpdfdoc/doc_utils.h"
13 14
14 static const int FPDFDOC_UTILS_MAXRECURSION = 32; 15 static const int FPDFDOC_UTILS_MAXRECURSION = 32;
15 16
16 CFX_WideString GetFullName(CPDF_Dictionary* pFieldDict) { 17 CFX_WideString GetFullName(CPDF_Dictionary* pFieldDict) {
17 CFX_WideString full_name; 18 CFX_WideString full_name;
18 CPDF_Dictionary* pLevel = pFieldDict; 19 CPDF_Dictionary* pLevel = pFieldDict;
19 while (pLevel) { 20 while (pLevel) {
20 CFX_WideString short_name = pLevel->GetUnicodeTextBy("T"); 21 CFX_WideString short_name = pLevel->GetUnicodeTextBy("T");
(...skipping 676 matching lines...) Expand 10 before | Expand all | Expand 10 after
697 CPDF_Object* pAttr = pFieldDict->GetElementValue(name); 698 CPDF_Object* pAttr = pFieldDict->GetElementValue(name);
698 if (pAttr) { 699 if (pAttr) {
699 return pAttr; 700 return pAttr;
700 } 701 }
701 CPDF_Dictionary* pParent = pFieldDict->GetDictBy("Parent"); 702 CPDF_Dictionary* pParent = pFieldDict->GetDictBy("Parent");
702 if (!pParent) { 703 if (!pParent) {
703 return NULL; 704 return NULL;
704 } 705 }
705 return FPDF_GetFieldAttr(pParent, name, nLevel + 1); 706 return FPDF_GetFieldAttr(pParent, name, nLevel + 1);
706 } 707 }
OLDNEW
« no previous file with comments | « core/src/fpdfdoc/doc_formfield.cpp ('k') | fpdfsdk/include/fsdk_define.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698