| 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 <algorithm> | 9 #include <algorithm> |
| 10 #include <set> | 10 #include <set> |
| (...skipping 257 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 268 break; | 268 break; |
| 269 } | 269 } |
| 270 if (!pDefaultCS) | 270 if (!pDefaultCS) |
| 271 return pCS; | 271 return pCS; |
| 272 | 272 |
| 273 pdfium::ScopedSetInsertion<CPDF_Object*> insertion(pVisited, pCSObj); | 273 pdfium::ScopedSetInsertion<CPDF_Object*> insertion(pVisited, pCSObj); |
| 274 return GetColorSpaceImpl(pDefaultCS, nullptr, pVisited); | 274 return GetColorSpaceImpl(pDefaultCS, nullptr, pVisited); |
| 275 } | 275 } |
| 276 | 276 |
| 277 CPDF_Array* pArray = pCSObj->AsArray(); | 277 CPDF_Array* pArray = pCSObj->AsArray(); |
| 278 if (!pArray || pArray->GetCount() == 0) | 278 if (!pArray || pArray->IsEmpty()) |
| 279 return nullptr; | 279 return nullptr; |
| 280 | 280 |
| 281 if (pArray->GetCount() == 1) { | 281 if (pArray->GetCount() == 1) { |
| 282 pdfium::ScopedSetInsertion<CPDF_Object*> insertion(pVisited, pCSObj); | 282 pdfium::ScopedSetInsertion<CPDF_Object*> insertion(pVisited, pCSObj); |
| 283 return GetColorSpaceImpl(pArray->GetDirectObjectAt(0), pResources, | 283 return GetColorSpaceImpl(pArray->GetDirectObjectAt(0), pResources, |
| 284 pVisited); | 284 pVisited); |
| 285 } | 285 } |
| 286 | 286 |
| 287 CPDF_CountedColorSpace* csData = nullptr; | 287 CPDF_CountedColorSpace* csData = nullptr; |
| 288 auto it = m_ColorSpaceMap.find(pCSObj); | 288 auto it = m_ColorSpaceMap.find(pCSObj); |
| (...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 538 } | 538 } |
| 539 | 539 |
| 540 CPDF_CountedPattern* CPDF_DocPageData::FindPatternPtr( | 540 CPDF_CountedPattern* CPDF_DocPageData::FindPatternPtr( |
| 541 CPDF_Object* pPatternObj) const { | 541 CPDF_Object* pPatternObj) const { |
| 542 if (!pPatternObj) | 542 if (!pPatternObj) |
| 543 return nullptr; | 543 return nullptr; |
| 544 | 544 |
| 545 auto it = m_PatternMap.find(pPatternObj); | 545 auto it = m_PatternMap.find(pPatternObj); |
| 546 return it != m_PatternMap.end() ? it->second : nullptr; | 546 return it != m_PatternMap.end() ? it->second : nullptr; |
| 547 } | 547 } |
| OLD | NEW |