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/fpdfppo.h" | 7 #include "../include/fpdfppo.h" |
8 #include "../include/fsdk_define.h" | 8 #include "../include/fsdk_define.h" |
9 | 9 |
10 class CPDF_PageOrganizer | 10 class CPDF_PageOrganizer |
(...skipping 295 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
306 | 306 |
307 size_t dwNewObjNum = 0; | 307 size_t dwNewObjNum = 0; |
308 | 308 |
309 pMapPtrToPtr->Lookup((FX_LPVOID)dwObjnum, (FX_LPVOID&)dwNewObjNum); | 309 pMapPtrToPtr->Lookup((FX_LPVOID)dwObjnum, (FX_LPVOID&)dwNewObjNum); |
310 if(dwNewObjNum) | 310 if(dwNewObjNum) |
311 { | 311 { |
312 return (int)dwNewObjNum; | 312 return (int)dwNewObjNum; |
313 } | 313 } |
314 else | 314 else |
315 { | 315 { |
316 » » CPDF_Object* pClone = pRef->GetDirect()->Clone(); | 316 » » CPDF_Object* pDirect = pRef->GetDirect(); |
317 » » if(!pClone)» » » | 317 » » if(!pDirect) |
318 » » { | |
318 return 0; | 319 return 0; |
320 } | |
321 | |
322 CPDF_Object* pClone = pDirect->Clone(); | |
Tom Sepez
2014/09/08 17:58:34
nit: stray space before equals.
| |
323 if(!pClone) | |
324 { | |
325 return 0; | |
326 } | |
319 | 327 |
320 if(pClone->GetType() == PDFOBJ_DICTIONARY) | 328 if(pClone->GetType() == PDFOBJ_DICTIONARY) |
321 { | 329 { |
322 CPDF_Dictionary* pDictClone = (CPDF_Dictionary*)pClone; | 330 CPDF_Dictionary* pDictClone = (CPDF_Dictionary*)pClone; |
323 if(pDictClone->KeyExist("Type")) | 331 if(pDictClone->KeyExist("Type")) |
324 { | 332 { |
325 CFX_ByteString strType = pDictClone->GetString(" Type"); | 333 CFX_ByteString strType = pDictClone->GetString(" Type"); |
326 if(!FXSYS_stricmp(strType, "Pages")) | 334 if(!FXSYS_stricmp(strType, "Pages")) |
327 { | 335 { |
328 pDictClone->Release(); | 336 pDictClone->Release(); |
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
455 if(!pSrcDict) | 463 if(!pSrcDict) |
456 return FALSE; | 464 return FALSE; |
457 CPDF_Document* pDstDoc = (CPDF_Document*)dest_doc; | 465 CPDF_Document* pDstDoc = (CPDF_Document*)dest_doc; |
458 CPDF_Dictionary* pDstDict = pDstDoc->GetRoot(); | 466 CPDF_Dictionary* pDstDict = pDstDoc->GetRoot(); |
459 if(!pDstDict) | 467 if(!pDstDict) |
460 return FALSE; | 468 return FALSE; |
461 pDstDict->SetAt(FX_BSTRC("ViewerPreferences"), pSrcDict->Clone(TRUE)); | 469 pDstDict->SetAt(FX_BSTRC("ViewerPreferences"), pSrcDict->Clone(TRUE)); |
462 return TRUE; | 470 return TRUE; |
463 } | 471 } |
464 | 472 |
OLD | NEW |