| 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 "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 Loading... |
| 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->GetString(); | 329 CFX_ByteString name = pCSObj->GetString(); |
| 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.AsStringC()); | 334 pCSObj = pList->GetDirectObjectBy(name); |
| 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 Loading... |
| 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 } |
| OLD | NEW |