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

Side by Side Diff: core/fpdfapi/fpdf_page/fpdf_page_doc.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/cpdf_allstates.cpp ('k') | core/fpdfapi/fpdf_page/fpdf_page_parser.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 "core/fdrm/crypto/include/fx_crypt.h" 9 #include "core/fdrm/crypto/include/fx_crypt.h"
10 #include "core/fpdfapi/fpdf_font/cpdf_type1font.h" 10 #include "core/fpdfapi/fpdf_font/cpdf_type1font.h"
(...skipping 313 matching lines...) Expand 10 before | Expand all | Expand 10 after
324 const CPDF_Dictionary* pResources) { 324 const CPDF_Dictionary* pResources) {
325 if (!pCSObj) 325 if (!pCSObj)
326 return nullptr; 326 return nullptr;
327 327
328 if (pCSObj->IsName()) { 328 if (pCSObj->IsName()) {
329 CFX_ByteString name = pCSObj->GetConstString(); 329 CFX_ByteString name = pCSObj->GetConstString();
330 CPDF_ColorSpace* pCS = CPDF_ColorSpace::ColorspaceFromName(name); 330 CPDF_ColorSpace* pCS = CPDF_ColorSpace::ColorspaceFromName(name);
331 if (!pCS && pResources) { 331 if (!pCS && pResources) {
332 CPDF_Dictionary* pList = pResources->GetDictBy("ColorSpace"); 332 CPDF_Dictionary* pList = pResources->GetDictBy("ColorSpace");
333 if (pList) { 333 if (pList) {
334 pCSObj = pList->GetDirectObjectBy(name); 334 pCSObj = pList->GetDirectObjectBy(name.AsByteStringC());
335 return GetColorSpace(pCSObj, nullptr); 335 return GetColorSpace(pCSObj, nullptr);
336 } 336 }
337 } 337 }
338 if (!pCS || !pResources) 338 if (!pCS || !pResources)
339 return pCS; 339 return pCS;
340 340
341 CPDF_Dictionary* pColorSpaces = pResources->GetDictBy("ColorSpace"); 341 CPDF_Dictionary* pColorSpaces = pResources->GetDictBy("ColorSpace");
342 if (!pColorSpaces) 342 if (!pColorSpaces)
343 return pCS; 343 return pCS;
344 344
(...skipping 265 matching lines...) Expand 10 before | Expand all | Expand 10 after
610 } 610 }
611 611
612 CPDF_CountedPattern* CPDF_DocPageData::FindPatternPtr( 612 CPDF_CountedPattern* CPDF_DocPageData::FindPatternPtr(
613 CPDF_Object* pPatternObj) const { 613 CPDF_Object* pPatternObj) const {
614 if (!pPatternObj) 614 if (!pPatternObj)
615 return nullptr; 615 return nullptr;
616 616
617 auto it = m_PatternMap.find(pPatternObj); 617 auto it = m_PatternMap.find(pPatternObj);
618 return it != m_PatternMap.end() ? it->second : nullptr; 618 return it != m_PatternMap.end() ? it->second : nullptr;
619 } 619 }
OLDNEW
« no previous file with comments | « core/fpdfapi/fpdf_page/cpdf_allstates.cpp ('k') | core/fpdfapi/fpdf_page/fpdf_page_parser.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698