From bb17868d736f698d5217c30d52c5bbfed62c5936 Mon Sep 17 00:00:00 2001 From: Tom Sepez Date: Tue, 9 Jun 2015 11:30:25 -0700 Subject: Use stdint.h types throughout PDFium. It's redundant nowadays to provide our own equivalents, now that this is done for us by the system header. R=thestig@chromium.org Review URL: https://codereview.chromium.org/1177483002 --- core/src/fpdfdoc/doc_ocg.cpp | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) (limited to 'core/src/fpdfdoc/doc_ocg.cpp') diff --git a/core/src/fpdfdoc/doc_ocg.cpp b/core/src/fpdfdoc/doc_ocg.cpp index 0ca9fc0313..c2f77a58fa 100644 --- a/core/src/fpdfdoc/doc_ocg.cpp +++ b/core/src/fpdfdoc/doc_ocg.cpp @@ -5,12 +5,12 @@ // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com #include "../../include/fpdfdoc/fpdf_doc.h" -static FX_INT32 FPDFDOC_OCG_FindGroup(const CPDF_Object *pObject, const CPDF_Dictionary *pGroupDict) +static int32_t FPDFDOC_OCG_FindGroup(const CPDF_Object *pObject, const CPDF_Dictionary *pGroupDict) { if (pObject == NULL || pGroupDict == NULL) { return -1; } - FX_INT32 iType = pObject->GetType(); + int32_t iType = pObject->GetType(); if (iType == PDFOBJ_ARRAY) { FX_DWORD dwCount = ((CPDF_Array*)pObject)->GetCount(); for (FX_DWORD i = 0; i < dwCount; i++) { @@ -64,8 +64,8 @@ static CPDF_Dictionary* FPDFDOC_OCG_GetConfig(CPDF_Document *pDoc, const CPDF_Di CPDF_Array *pConfigs = pOCProperties->GetArray(FX_BSTRC("Configs")); if (pConfigs) { CPDF_Dictionary *pFind; - FX_INT32 iCount = pConfigs->GetCount(); - for (FX_INT32 i = 0; i < iCount; i ++) { + int32_t iCount = pConfigs->GetCount(); + for (int32_t i = 0; i < iCount; i ++) { pFind = pConfigs->GetDict(i); if (!pFind) { continue; @@ -124,8 +124,8 @@ FX_BOOL CPDF_OCContext::LoadOCGStateFromConfig(FX_BSTR csConfig, const CPDF_Dict pArray = pConfig->GetArray(FX_BSTRC("AS")); if (pArray) { CFX_ByteString csFind = csConfig + FX_BSTRC("State"); - FX_INT32 iCount = pArray->GetCount(); - for (FX_INT32 i = 0; i < iCount; i ++) { + int32_t iCount = pArray->GetCount(); + for (int32_t i = 0; i < iCount; i ++) { CPDF_Dictionary *pUsage = pArray->GetDict(i); if (!pUsage) { continue; @@ -181,11 +181,11 @@ FX_BOOL CPDF_OCContext::GetOCGVisible(const CPDF_Dictionary *pOCGDict) } FX_LPVOID bState = NULL; if (m_OCGStates.Lookup(pOCGDict, bState)) { - return (FX_UINTPTR)bState != 0; + return (uintptr_t)bState != 0; } - bState = (FX_LPVOID)(FX_UINTPTR)LoadOCGState(pOCGDict); + bState = (FX_LPVOID)(uintptr_t)LoadOCGState(pOCGDict); m_OCGStates.SetAt(pOCGDict, bState); - return (FX_UINTPTR)bState != 0; + return (uintptr_t)bState != 0; } FX_BOOL CPDF_OCContext::GetOCGVE(CPDF_Array *pExpression, FX_BOOL bFromConfig, int nLevel) { @@ -195,7 +195,7 @@ FX_BOOL CPDF_OCContext::GetOCGVE(CPDF_Array *pExpression, FX_BOOL bFromConfig, i if (pExpression == NULL) { return FALSE; } - FX_INT32 iCount = pExpression->GetCount(); + int32_t iCount = pExpression->GetCount(); CPDF_Object *pOCGObj; CFX_ByteString csOperator = pExpression->GetString(0); if (csOperator == FX_BSTRC("Not")) { @@ -213,7 +213,7 @@ FX_BOOL CPDF_OCContext::GetOCGVE(CPDF_Array *pExpression, FX_BOOL bFromConfig, i } if (csOperator == FX_BSTRC("Or") || csOperator == FX_BSTRC("And")) { FX_BOOL bValue = FALSE; - for (FX_INT32 i = 1; i < iCount; i ++) { + for (int32_t i = 1; i < iCount; i ++) { pOCGObj = pExpression->GetElementValue(1); if (pOCGObj == NULL) { continue; @@ -260,8 +260,8 @@ FX_BOOL CPDF_OCContext::LoadOCMDState(const CPDF_Dictionary *pOCMDDict, FX_BOOL if (csP == FX_BSTRC("AllOn") || csP == FX_BSTRC("AllOff")) { bState = TRUE; } - FX_INT32 iCount = ((CPDF_Array*)pOCGObj)->GetCount(); - for (FX_INT32 i = 0; i < iCount; i ++) { + int32_t iCount = ((CPDF_Array*)pOCGObj)->GetCount(); + for (int32_t i = 0; i < iCount; i ++) { FX_BOOL bItem = TRUE; CPDF_Dictionary* pItemDict = ((CPDF_Array*)pOCGObj)->GetDict(i); if (pItemDict) { -- cgit v1.2.3