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

Side by Side Diff: core/fpdfapi/fpdf_page/fpdf_page_parser_old.cpp

Issue 1853233002: Make down-conversion explicit from CFX_ByteString to CFX_ByteStringC. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Fix CPDF_Name::GetConstString() Created 4 years, 8 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/fpdfapi/fpdf_page/fpdf_page_parser.cpp ('k') | core/fpdfapi/fpdf_parser/cpdf_name.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 "core/fpdfapi/fpdf_page/pageint.h" 7 #include "core/fpdfapi/fpdf_page/pageint.h"
8 8
9 #include <limits.h> 9 #include <limits.h>
10 10
(...skipping 409 matching lines...) Expand 10 before | Expand all | Expand 10 after
420 return nullptr; 420 return nullptr;
421 } 421 }
422 CFX_ByteString key = 422 CFX_ByteString key =
423 PDF_NameDecode(CFX_ByteStringC(m_WordBuffer + 1, m_WordSize - 1)); 423 PDF_NameDecode(CFX_ByteStringC(m_WordBuffer + 1, m_WordSize - 1));
424 CPDF_Object* pObj = ReadNextObject(TRUE); 424 CPDF_Object* pObj = ReadNextObject(TRUE);
425 if (!pObj) { 425 if (!pObj) {
426 pDict->Release(); 426 pDict->Release();
427 return nullptr; 427 return nullptr;
428 } 428 }
429 if (!key.IsEmpty()) { 429 if (!key.IsEmpty()) {
430 pDict->SetAt(key, pObj); 430 pDict->SetAt(key.AsByteStringC(), pObj);
431 } else { 431 } else {
432 pObj->Release(); 432 pObj->Release();
433 } 433 }
434 } 434 }
435 return pDict; 435 return pDict;
436 } 436 }
437 if (first_char == '[') { 437 if (first_char == '[') {
438 if (!bAllowNestedArray && bInArray) { 438 if (!bAllowNestedArray && bInArray) {
439 return NULL; 439 return NULL;
440 } 440 }
(...skipping 444 matching lines...) Expand 10 before | Expand all | Expand 10 after
885 } 885 }
886 m_Status = Done; 886 m_Status = Done;
887 return; 887 return;
888 } 888 }
889 steps++; 889 steps++;
890 if (pPause && pPause->NeedToPauseNow()) { 890 if (pPause && pPause->NeedToPauseNow()) {
891 break; 891 break;
892 } 892 }
893 } 893 }
894 } 894 }
OLDNEW
« no previous file with comments | « core/fpdfapi/fpdf_page/fpdf_page_parser.cpp ('k') | core/fpdfapi/fpdf_parser/cpdf_name.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698