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

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

Issue 1402413004: Add type cast definitions for CPDF_Stream. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Created 5 years, 1 month 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
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 "../../third_party/base/nonstd_unique_ptr.h" 8 #include "../../third_party/base/nonstd_unique_ptr.h"
9 #include "../include/fsdk_define.h" 9 #include "../include/fsdk_define.h"
10 10
(...skipping 229 matching lines...) Expand 10 before | Expand all | Expand 10 after
240 for (FX_DWORD i = 0; i < count; ++i) { 240 for (FX_DWORD i = 0; i < count; ++i) {
241 CPDF_Object* pNextObj = pArray->GetElement(i); 241 CPDF_Object* pNextObj = pArray->GetElement(i);
242 if (!pNextObj) 242 if (!pNextObj)
243 return FALSE; 243 return FALSE;
244 if (!UpdateReference(pNextObj, pDoc, pObjNumberMap)) 244 if (!UpdateReference(pNextObj, pDoc, pObjNumberMap))
245 return FALSE; 245 return FALSE;
246 } 246 }
247 break; 247 break;
248 } 248 }
249 case PDFOBJ_STREAM: { 249 case PDFOBJ_STREAM: {
250 CPDF_Stream* pStream = (CPDF_Stream*)pObj; 250 CPDF_Stream* pStream = pObj->AsStream();
251 CPDF_Dictionary* pDict = pStream->GetDict(); 251 CPDF_Dictionary* pDict = pStream->GetDict();
252 if (pDict) { 252 if (pDict) {
253 if (!UpdateReference(pDict, pDoc, pObjNumberMap)) 253 if (!UpdateReference(pDict, pDoc, pObjNumberMap))
254 return FALSE; 254 return FALSE;
255 } else { 255 } else {
256 return FALSE; 256 return FALSE;
257 } 257 }
258 break; 258 break;
259 } 259 }
260 default: 260 default:
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after
402 if (!pSrcDict) 402 if (!pSrcDict)
403 return FALSE; 403 return FALSE;
404 404
405 CPDF_Dictionary* pDstDict = pDstDoc->GetRoot(); 405 CPDF_Dictionary* pDstDict = pDstDoc->GetRoot();
406 if (!pDstDict) 406 if (!pDstDict)
407 return FALSE; 407 return FALSE;
408 408
409 pDstDict->SetAt(FX_BSTRC("ViewerPreferences"), pSrcDict->Clone(TRUE)); 409 pDstDict->SetAt(FX_BSTRC("ViewerPreferences"), pSrcDict->Clone(TRUE));
410 return TRUE; 410 return TRUE;
411 } 411 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698