| 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/fpdfapi/fpdf_parser.h" | 7 #include "../../../include/fpdfapi/fpdf_parser.h" |
| 8 const char PDF_CharType[256] = { | 8 const char PDF_CharType[256] = { |
| 9 // NUL SOH STX ETX EOT ENQ ACK BEL BS HT LF VT FF CR SO | 9 // NUL SOH STX ETX EOT ENQ ACK BEL BS HT LF VT FF CR SO |
| 10 // SI | 10 // SI |
| (...skipping 392 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 403 break; | 403 break; |
| 404 } | 404 } |
| 405 case PDFOBJ_DICTIONARY: { | 405 case PDFOBJ_DICTIONARY: { |
| 406 CPDF_Dictionary* p = (CPDF_Dictionary*)pObj; | 406 CPDF_Dictionary* p = (CPDF_Dictionary*)pObj; |
| 407 buf << FX_BSTRC("<<"); | 407 buf << FX_BSTRC("<<"); |
| 408 FX_POSITION pos = p->GetStartPos(); | 408 FX_POSITION pos = p->GetStartPos(); |
| 409 while (pos) { | 409 while (pos) { |
| 410 CFX_ByteString key; | 410 CFX_ByteString key; |
| 411 CPDF_Object* pValue = p->GetNextElement(pos, key); | 411 CPDF_Object* pValue = p->GetNextElement(pos, key); |
| 412 buf << FX_BSTRC("/") << PDF_NameEncode(key); | 412 buf << FX_BSTRC("/") << PDF_NameEncode(key); |
| 413 if (pValue->GetObjNum()) { | 413 if (pValue && pValue->GetObjNum()) { |
| 414 buf << " " << pValue->GetObjNum() << FX_BSTRC(" 0 R "); | 414 buf << " " << pValue->GetObjNum() << FX_BSTRC(" 0 R "); |
| 415 } else { | 415 } else { |
| 416 buf << pValue; | 416 buf << pValue; |
| 417 } | 417 } |
| 418 } | 418 } |
| 419 buf << FX_BSTRC(">>"); | 419 buf << FX_BSTRC(">>"); |
| 420 break; | 420 break; |
| 421 } | 421 } |
| 422 case PDFOBJ_STREAM: { | 422 case PDFOBJ_STREAM: { |
| 423 CPDF_Stream* p = (CPDF_Stream*)pObj; | 423 CPDF_Stream* p = (CPDF_Stream*)pObj; |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 475 CPDF_Object* pFound = SearchNumberNode(pKid, num); | 475 CPDF_Object* pFound = SearchNumberNode(pKid, num); |
| 476 if (pFound) { | 476 if (pFound) { |
| 477 return pFound; | 477 return pFound; |
| 478 } | 478 } |
| 479 } | 479 } |
| 480 return NULL; | 480 return NULL; |
| 481 } | 481 } |
| 482 CPDF_Object* CPDF_NumberTree::LookupValue(int num) { | 482 CPDF_Object* CPDF_NumberTree::LookupValue(int num) { |
| 483 return SearchNumberNode(m_pRoot, num); | 483 return SearchNumberNode(m_pRoot, num); |
| 484 } | 484 } |
| OLD | NEW |