| 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/fpdfdoc/include/cpdf_occontext.h" |
| 8 |
| 7 #include "core/fpdfapi/fpdf_page/cpdf_contentmarkdata.h" | 9 #include "core/fpdfapi/fpdf_page/cpdf_contentmarkdata.h" |
| 8 #include "core/fpdfapi/fpdf_page/include/cpdf_pageobject.h" | 10 #include "core/fpdfapi/fpdf_page/include/cpdf_pageobject.h" |
| 9 #include "core/fpdfapi/fpdf_parser/include/cpdf_array.h" | 11 #include "core/fpdfapi/fpdf_parser/include/cpdf_array.h" |
| 10 #include "core/fpdfapi/fpdf_parser/include/cpdf_document.h" | 12 #include "core/fpdfapi/fpdf_parser/include/cpdf_document.h" |
| 11 #include "core/fpdfdoc/include/fpdf_doc.h" | |
| 12 | 13 |
| 13 namespace { | 14 namespace { |
| 14 | 15 |
| 15 int32_t FPDFDOC_OCG_FindGroup(const CPDF_Array* pArray, | 16 int32_t FPDFDOC_OCG_FindGroup(const CPDF_Array* pArray, |
| 16 const CPDF_Dictionary* pGroupDict) { | 17 const CPDF_Dictionary* pGroupDict) { |
| 17 if (!pArray || !pGroupDict) | 18 if (!pArray || !pGroupDict) |
| 18 return -1; | 19 return -1; |
| 19 | 20 |
| 20 for (size_t i = 0; i < pArray->GetCount(); i++) { | 21 for (size_t i = 0; i < pArray->GetCount(); i++) { |
| 21 if (pArray->GetDictAt(i) == pGroupDict) | 22 if (pArray->GetDictAt(i) == pGroupDict) |
| (...skipping 253 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 275 | 276 |
| 276 bool CPDF_OCContext::CheckOCGVisible(const CPDF_Dictionary* pOCGDict) { | 277 bool CPDF_OCContext::CheckOCGVisible(const CPDF_Dictionary* pOCGDict) { |
| 277 if (!pOCGDict) | 278 if (!pOCGDict) |
| 278 return true; | 279 return true; |
| 279 | 280 |
| 280 CFX_ByteString csType = pOCGDict->GetStringBy("Type", "OCG"); | 281 CFX_ByteString csType = pOCGDict->GetStringBy("Type", "OCG"); |
| 281 if (csType == "OCG") | 282 if (csType == "OCG") |
| 282 return GetOCGVisible(pOCGDict); | 283 return GetOCGVisible(pOCGDict); |
| 283 return LoadOCMDState(pOCGDict); | 284 return LoadOCMDState(pOCGDict); |
| 284 } | 285 } |
| OLD | NEW |