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

Side by Side Diff: fpdfsdk/src/fpdfppo.cpp

Issue 1417033004: Merge to XFA: Add type cast definitions for CPDF_Name. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@xfa
Patch Set: 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_Utils.cpp ('k') | fpdfsdk/src/javascript/Document.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 "../../public/fpdf_ppo.h" 7 #include "../../public/fpdf_ppo.h"
8 #include "../include/fsdk_define.h" 8 #include "../include/fsdk_define.h"
9 #include "../include/fpdfxfa/fpdfxfa_doc.h" 9 #include "../include/fpdfxfa/fpdfxfa_doc.h"
10 10
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after
179 return TRUE; 179 return TRUE;
180 } 180 }
181 181
182 CPDF_Object* CPDF_PageOrganizer::PageDictGetInheritableTag( 182 CPDF_Object* CPDF_PageOrganizer::PageDictGetInheritableTag(
183 CPDF_Dictionary* pDict, 183 CPDF_Dictionary* pDict,
184 CFX_ByteString nSrctag) { 184 CFX_ByteString nSrctag) {
185 if (!pDict || !pDict->KeyExist("Type") || nSrctag.IsEmpty()) 185 if (!pDict || !pDict->KeyExist("Type") || nSrctag.IsEmpty())
186 return NULL; 186 return NULL;
187 187
188 CPDF_Object* pType = pDict->GetElement("Type")->GetDirect(); 188 CPDF_Object* pType = pDict->GetElement("Type")->GetDirect();
189 if (!pType || pType->GetType() != PDFOBJ_NAME) 189 if (!ToName(pType))
190 return NULL; 190 return nullptr;
dsinclair 2015/10/21 18:00:14 Merge conflict. I'm guessing due to the NULL vs nu
Tom Sepez 2015/10/21 19:41:04 Acknowledged.
191
192 if (pType->GetString().Compare("Page")) 191 if (pType->GetString().Compare("Page"))
193 return NULL; 192 return NULL;
194 if (!pDict->KeyExist("Parent")) 193 if (!pDict->KeyExist("Parent"))
195 return NULL; 194 return NULL;
196 195
197 CPDF_Dictionary* pp = ToDictionary(pDict->GetElement("Parent")->GetDirect()); 196 CPDF_Dictionary* pp = ToDictionary(pDict->GetElement("Parent")->GetDirect());
198 if (!pp) 197 if (!pp)
199 return nullptr; 198 return nullptr;
200 199
201 if (pDict->KeyExist((const char*)nSrctag)) 200 if (pDict->KeyExist((const char*)nSrctag))
(...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after
413 if (!pSrcDict) 412 if (!pSrcDict)
414 return FALSE; 413 return FALSE;
415 414
416 CPDF_Dictionary* pDstDict = pDstDoc->GetRoot(); 415 CPDF_Dictionary* pDstDict = pDstDoc->GetRoot();
417 if (!pDstDict) 416 if (!pDstDict)
418 return FALSE; 417 return FALSE;
419 418
420 pDstDict->SetAt(FX_BSTRC("ViewerPreferences"), pSrcDict->Clone(TRUE)); 419 pDstDict->SetAt(FX_BSTRC("ViewerPreferences"), pSrcDict->Clone(TRUE));
421 return TRUE; 420 return TRUE;
422 } 421 }
OLDNEW
« no previous file with comments | « fpdfsdk/src/formfiller/FFL_Utils.cpp ('k') | fpdfsdk/src/javascript/Document.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698