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

Side by Side Diff: core/src/fpdfapi/fpdf_parser/fpdf_parser_utility.cpp

Issue 1417933002: Add type cast definitions for CPDF_String. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
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 | « core/src/fpdfapi/fpdf_parser/fpdf_parser_objects.cpp ('k') | core/src/fpdfdoc/doc_action.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 "../../../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 356 matching lines...) Expand 10 before | Expand all | Expand 10 after
367 switch (pObj->GetType()) { 367 switch (pObj->GetType()) {
368 case PDFOBJ_NULL: 368 case PDFOBJ_NULL:
369 buf << FX_BSTRC(" null"); 369 buf << FX_BSTRC(" null");
370 break; 370 break;
371 case PDFOBJ_BOOLEAN: 371 case PDFOBJ_BOOLEAN:
372 case PDFOBJ_NUMBER: 372 case PDFOBJ_NUMBER:
373 buf << " " << pObj->GetString(); 373 buf << " " << pObj->GetString();
374 break; 374 break;
375 case PDFOBJ_STRING: { 375 case PDFOBJ_STRING: {
376 CFX_ByteString str = pObj->GetString(); 376 CFX_ByteString str = pObj->GetString();
377 FX_BOOL bHex = ((CPDF_String*)pObj)->IsHex(); 377 FX_BOOL bHex = pObj->AsString()->IsHex();
378 buf << PDF_EncodeString(str, bHex); 378 buf << PDF_EncodeString(str, bHex);
379 break; 379 break;
380 } 380 }
381 case PDFOBJ_NAME: { 381 case PDFOBJ_NAME: {
382 CFX_ByteString str = pObj->GetString(); 382 CFX_ByteString str = pObj->GetString();
383 buf << FX_BSTRC("/") << PDF_NameEncode(str); 383 buf << FX_BSTRC("/") << PDF_NameEncode(str);
384 break; 384 break;
385 } 385 }
386 case PDFOBJ_REFERENCE: { 386 case PDFOBJ_REFERENCE: {
387 CPDF_Reference* p = (CPDF_Reference*)pObj; 387 CPDF_Reference* p = (CPDF_Reference*)pObj;
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 }
OLDNEW
« no previous file with comments | « core/src/fpdfapi/fpdf_parser/fpdf_parser_objects.cpp ('k') | core/src/fpdfdoc/doc_action.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698