Chromium Code Reviews| 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 "../../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 198 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 209 pp = ToDictionary(pp->GetElement("Parent")->GetDirect()); | 209 pp = ToDictionary(pp->GetElement("Parent")->GetDirect()); |
| 210 } | 210 } |
| 211 return nullptr; | 211 return nullptr; |
| 212 } | 212 } |
| 213 | 213 |
| 214 FX_BOOL CPDF_PageOrganizer::UpdateReference(CPDF_Object* pObj, | 214 FX_BOOL CPDF_PageOrganizer::UpdateReference(CPDF_Object* pObj, |
| 215 CPDF_Document* pDoc, | 215 CPDF_Document* pDoc, |
| 216 CFX_MapPtrToPtr* pMapPtrToPtr) { | 216 CFX_MapPtrToPtr* pMapPtrToPtr) { |
| 217 switch (pObj->GetType()) { | 217 switch (pObj->GetType()) { |
| 218 case PDFOBJ_REFERENCE: { | 218 case PDFOBJ_REFERENCE: { |
| 219 CPDF_Reference* pReference = (CPDF_Reference*)pObj; | 219 CPDF_Reference* pReference = pObj->AsReference(); |
| 220 int newobjnum = GetNewObjId(pDoc, pMapPtrToPtr, pReference); | 220 int newobjnum = GetNewObjId(pDoc, pMapPtrToPtr, pReference); |
|
dsinclair
2015/10/26 20:13:54
There was a merge conflict here because line 220 h
| |
| 221 if (newobjnum == 0) | 221 if (newobjnum == 0) |
| 222 return FALSE; | 222 return FALSE; |
| 223 pReference->SetRef(pDoc, newobjnum); //, 0); | 223 pReference->SetRef(pDoc, newobjnum); |
| 224 break; | 224 break; |
| 225 } | 225 } |
| 226 case PDFOBJ_DICTIONARY: { | 226 case PDFOBJ_DICTIONARY: { |
| 227 CPDF_Dictionary* pDict = pObj->AsDictionary(); | 227 CPDF_Dictionary* pDict = pObj->AsDictionary(); |
| 228 | 228 |
| 229 FX_POSITION pos = pDict->GetStartPos(); | 229 FX_POSITION pos = pDict->GetStartPos(); |
| 230 while (pos) { | 230 while (pos) { |
| 231 CFX_ByteString key(""); | 231 CFX_ByteString key(""); |
| 232 CPDF_Object* pNextObj = pDict->GetNextElement(pos, key); | 232 CPDF_Object* pNextObj = pDict->GetNextElement(pos, key); |
| 233 if (!FXSYS_strcmp(key, "Parent") || !FXSYS_strcmp(key, "Prev") || | 233 if (!FXSYS_strcmp(key, "Parent") || !FXSYS_strcmp(key, "Prev") || |
| (...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 412 if (!pSrcDict) | 412 if (!pSrcDict) |
| 413 return FALSE; | 413 return FALSE; |
| 414 | 414 |
| 415 CPDF_Dictionary* pDstDict = pDstDoc->GetRoot(); | 415 CPDF_Dictionary* pDstDict = pDstDoc->GetRoot(); |
| 416 if (!pDstDict) | 416 if (!pDstDict) |
| 417 return FALSE; | 417 return FALSE; |
| 418 | 418 |
| 419 pDstDict->SetAt(FX_BSTRC("ViewerPreferences"), pSrcDict->Clone(TRUE)); | 419 pDstDict->SetAt(FX_BSTRC("ViewerPreferences"), pSrcDict->Clone(TRUE)); |
| 420 return TRUE; | 420 return TRUE; |
| 421 } | 421 } |
| OLD | NEW |