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

Side by Side Diff: fpdfsdk/src/formfiller/FFL_Utils.cpp

Issue 1410343003: [Merge to XFA] Revert "Revert "Add type cast definitions for CPDF_Dictionary."" (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@xfa
Patch Set: Rebase to origin/xfa Created 5 years, 2 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 | « fpdfsdk/src/formfiller/FFL_CBA_Fontmap.cpp ('k') | fpdfsdk/src/fpdf_flatten.cpp » ('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 8
9 #include "../../include/formfiller/FormFiller.h" 9 #include "../../include/formfiller/FormFiller.h"
10 #include "../../include/formfiller/FFL_Utils.h" 10 #include "../../include/formfiller/FFL_Utils.h"
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 switch (pObj->GetType()) { 44 switch (pObj->GetType()) {
45 case PDFOBJ_ARRAY: { 45 case PDFOBJ_ARRAY: {
46 CPDF_Array* pArray = (CPDF_Array*)pObj; 46 CPDF_Array* pArray = (CPDF_Array*)pObj;
47 for (FX_DWORD i = 0; i < pArray->GetCount(); i++) { 47 for (FX_DWORD i = 0; i < pArray->GetCount(); i++) {
48 CPDF_Object* pElement = pArray->GetElementValue(i); 48 CPDF_Object* pElement = pArray->GetElementValue(i);
49 TraceObject(pElement); 49 TraceObject(pElement);
50 } 50 }
51 } break; 51 } break;
52 52
53 case PDFOBJ_DICTIONARY: { 53 case PDFOBJ_DICTIONARY: {
54 CPDF_Dictionary* pDict = (CPDF_Dictionary*)pObj; 54 CPDF_Dictionary* pDict = pObj->AsDictionary();
55 55
56 FX_POSITION fPos = pDict->GetStartPos(); 56 FX_POSITION fPos = pDict->GetStartPos();
57 CFX_ByteString csKey; 57 CFX_ByteString csKey;
58 do { 58 do {
59 CPDF_Object* pElement = pDict->GetNextElement(fPos, csKey); 59 CPDF_Object* pElement = pDict->GetNextElement(fPos, csKey);
60 // TRACE(csKey + "\n"); 60 // TRACE(csKey + "\n");
61 if (!pElement) 61 if (!pElement)
62 break; 62 break;
63 TraceObject(pElement); 63 TraceObject(pElement);
64 } while (TRUE); 64 } while (TRUE);
(...skipping 25 matching lines...) Expand all
90 // case PDFOBJ_KEYWORD: 90 // case PDFOBJ_KEYWORD:
91 // case PDFOBJ_EOF: 91 // case PDFOBJ_EOF:
92 default: 92 default:
93 break; 93 break;
94 } 94 }
95 if (dwObjNum == 0) 95 if (dwObjNum == 0)
96 return FALSE; 96 return FALSE;
97 97
98 return TRUE; 98 return TRUE;
99 } 99 }
OLDNEW
« no previous file with comments | « fpdfsdk/src/formfiller/FFL_CBA_Fontmap.cpp ('k') | fpdfsdk/src/fpdf_flatten.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698