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 "../../../include/fpdfapi/fpdf_module.h" | 7 #include "../../../include/fpdfapi/fpdf_module.h" |
8 #include "../../../include/fpdfapi/fpdf_render.h" | 8 #include "../../../include/fpdfapi/fpdf_render.h" |
9 #include "../../../include/fxge/fx_ge.h" | 9 #include "../../../include/fxge/fx_ge.h" |
10 #include "../fpdf_page/pageint.h" | 10 #include "../fpdf_page/pageint.h" |
(...skipping 1207 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1218 | 1218 |
1219 auto it = m_TransferFuncMap.find(pObj); | 1219 auto it = m_TransferFuncMap.find(pObj); |
1220 if (it != m_TransferFuncMap.end()) { | 1220 if (it != m_TransferFuncMap.end()) { |
1221 CPDF_CountedObject<CPDF_TransferFunc>* pTransferCounter = it->second; | 1221 CPDF_CountedObject<CPDF_TransferFunc>* pTransferCounter = it->second; |
1222 return pTransferCounter->AddRef(); | 1222 return pTransferCounter->AddRef(); |
1223 } | 1223 } |
1224 | 1224 |
1225 CPDF_Function* pFuncs[3] = {nullptr, nullptr, nullptr}; | 1225 CPDF_Function* pFuncs[3] = {nullptr, nullptr, nullptr}; |
1226 FX_BOOL bUniTransfer = TRUE; | 1226 FX_BOOL bUniTransfer = TRUE; |
1227 FX_BOOL bIdentity = TRUE; | 1227 FX_BOOL bIdentity = TRUE; |
1228 if (pObj->GetType() == PDFOBJ_ARRAY) { | 1228 if (CPDF_Array* pArray = pObj->AsArray()) { |
1229 bUniTransfer = FALSE; | 1229 bUniTransfer = FALSE; |
1230 CPDF_Array* pArray = (CPDF_Array*)pObj; | |
1231 if (pArray->GetCount() < 3) | 1230 if (pArray->GetCount() < 3) |
1232 return nullptr; | 1231 return nullptr; |
1233 | 1232 |
1234 for (FX_DWORD i = 0; i < 3; ++i) { | 1233 for (FX_DWORD i = 0; i < 3; ++i) { |
1235 pFuncs[2 - i] = CPDF_Function::Load(pArray->GetElementValue(i)); | 1234 pFuncs[2 - i] = CPDF_Function::Load(pArray->GetElementValue(i)); |
1236 if (!pFuncs[2 - i]) { | 1235 if (!pFuncs[2 - i]) { |
1237 return nullptr; | 1236 return nullptr; |
1238 } | 1237 } |
1239 } | 1238 } |
1240 } else { | 1239 } else { |
(...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1440 item.GetParamType() == CPDF_ContentMarkItem::PropertiesDict) { | 1439 item.GetParamType() == CPDF_ContentMarkItem::PropertiesDict) { |
1441 CPDF_Dictionary* pOCG = | 1440 CPDF_Dictionary* pOCG = |
1442 ToDictionary(static_cast<CPDF_Object*>(item.GetParam())); | 1441 ToDictionary(static_cast<CPDF_Object*>(item.GetParam())); |
1443 if (!CheckOCGVisible(pOCG)) { | 1442 if (!CheckOCGVisible(pOCG)) { |
1444 return FALSE; | 1443 return FALSE; |
1445 } | 1444 } |
1446 } | 1445 } |
1447 } | 1446 } |
1448 return TRUE; | 1447 return TRUE; |
1449 } | 1448 } |
OLD | NEW |