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

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

Issue 1422513004: Merge to XFA: Add type cast definitions for CPDF_Stream. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@xfa
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 "../../../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 399 matching lines...) Expand 10 before | Expand all | Expand 10 after
410 if (pValue && pValue->GetObjNum()) { 410 if (pValue && pValue->GetObjNum()) {
411 buf << " " << pValue->GetObjNum() << FX_BSTRC(" 0 R "); 411 buf << " " << pValue->GetObjNum() << FX_BSTRC(" 0 R ");
412 } else { 412 } else {
413 buf << pValue; 413 buf << pValue;
414 } 414 }
415 } 415 }
416 buf << FX_BSTRC(">>"); 416 buf << FX_BSTRC(">>");
417 break; 417 break;
418 } 418 }
419 case PDFOBJ_STREAM: { 419 case PDFOBJ_STREAM: {
420 CPDF_Stream* p = (CPDF_Stream*)pObj; 420 const CPDF_Stream* p = pObj->AsStream();
421 buf << p->GetDict() << FX_BSTRC("stream\r\n"); 421 buf << p->GetDict() << FX_BSTRC("stream\r\n");
422 CPDF_StreamAcc acc; 422 CPDF_StreamAcc acc;
423 acc.LoadAllData(p, TRUE); 423 acc.LoadAllData(p, TRUE);
424 buf.AppendBlock(acc.GetData(), acc.GetSize()); 424 buf.AppendBlock(acc.GetData(), acc.GetSize());
425 buf << FX_BSTRC("\r\nendstream"); 425 buf << FX_BSTRC("\r\nendstream");
426 break; 426 break;
427 } 427 }
428 default: 428 default:
429 ASSERT(FALSE); 429 ASSERT(FALSE);
430 break; 430 break;
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
472 CPDF_Object* pFound = SearchNumberNode(pKid, num); 472 CPDF_Object* pFound = SearchNumberNode(pKid, num);
473 if (pFound) { 473 if (pFound) {
474 return pFound; 474 return pFound;
475 } 475 }
476 } 476 }
477 return NULL; 477 return NULL;
478 } 478 }
479 CPDF_Object* CPDF_NumberTree::LookupValue(int num) { 479 CPDF_Object* CPDF_NumberTree::LookupValue(int num) {
480 return SearchNumberNode(m_pRoot, num); 480 return SearchNumberNode(m_pRoot, num);
481 } 481 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698