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

Side by Side Diff: core/src/fpdfapi/fpdf_render/fpdf_render.cpp

Issue 1417893003: Add type cast definitions for CPDF_Array. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Created 5 years, 2 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
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 "../../../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 1206 matching lines...) Expand 10 before | Expand all | Expand 10 after
1217 1217
1218 auto it = m_TransferFuncMap.find(pObj); 1218 auto it = m_TransferFuncMap.find(pObj);
1219 if (it != m_TransferFuncMap.end()) { 1219 if (it != m_TransferFuncMap.end()) {
1220 CPDF_CountedObject<CPDF_TransferFunc>* pTransferCounter = it->second; 1220 CPDF_CountedObject<CPDF_TransferFunc>* pTransferCounter = it->second;
1221 return pTransferCounter->AddRef(); 1221 return pTransferCounter->AddRef();
1222 } 1222 }
1223 1223
1224 CPDF_Function* pFuncs[3] = {nullptr, nullptr, nullptr}; 1224 CPDF_Function* pFuncs[3] = {nullptr, nullptr, nullptr};
1225 FX_BOOL bUniTransfer = TRUE; 1225 FX_BOOL bUniTransfer = TRUE;
1226 FX_BOOL bIdentity = TRUE; 1226 FX_BOOL bIdentity = TRUE;
1227 if (pObj->GetType() == PDFOBJ_ARRAY) { 1227 if (CPDF_Array* pArray = pObj->AsArray()) {
1228 bUniTransfer = FALSE; 1228 bUniTransfer = FALSE;
1229 CPDF_Array* pArray = (CPDF_Array*)pObj;
1230 if (pArray->GetCount() < 3) 1229 if (pArray->GetCount() < 3)
1231 return nullptr; 1230 return nullptr;
1232 1231
1233 for (FX_DWORD i = 0; i < 3; ++i) { 1232 for (FX_DWORD i = 0; i < 3; ++i) {
1234 pFuncs[2 - i] = CPDF_Function::Load(pArray->GetElementValue(i)); 1233 pFuncs[2 - i] = CPDF_Function::Load(pArray->GetElementValue(i));
1235 if (!pFuncs[2 - i]) { 1234 if (!pFuncs[2 - i]) {
1236 return nullptr; 1235 return nullptr;
1237 } 1236 }
1238 } 1237 }
1239 } else { 1238 } else {
(...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after
1439 item.GetParamType() == CPDF_ContentMarkItem::PropertiesDict) { 1438 item.GetParamType() == CPDF_ContentMarkItem::PropertiesDict) {
1440 CPDF_Dictionary* pOCG = 1439 CPDF_Dictionary* pOCG =
1441 ToDictionary(static_cast<CPDF_Object*>(item.GetParam())); 1440 ToDictionary(static_cast<CPDF_Object*>(item.GetParam()));
1442 if (!CheckOCGVisible(pOCG)) { 1441 if (!CheckOCGVisible(pOCG)) {
1443 return FALSE; 1442 return FALSE;
1444 } 1443 }
1445 } 1444 }
1446 } 1445 }
1447 return TRUE; 1446 return TRUE;
1448 } 1447 }
OLDNEW
« no previous file with comments | « core/src/fpdfapi/fpdf_parser/fpdf_parser_utility.cpp ('k') | core/src/fpdfapi/fpdf_render/fpdf_render_image.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698