summaryrefslogtreecommitdiff
path: root/core/src/fpdfdoc/doc_ocg.cpp
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2015-06-09 13:24:12 -0700
committerTom Sepez <tsepez@chromium.org>2015-06-09 13:24:12 -0700
commitbfa9a824a20f37c2dd7111012b46c929cf2ed8a0 (patch)
tree4cfbe682869d89900f33751c37f6a84865beeb0a /core/src/fpdfdoc/doc_ocg.cpp
parentb116136da234afcad018bb44a3ccb64b9ad2a554 (diff)
downloadpdfium-bfa9a824a20f37c2dd7111012b46c929cf2ed8a0.tar.xz
Merge to XFA: Use stdint.h types throughout PDFium.
Near-automatic merge, plus re-running scripts to update additional usage. R=thestig@chromium.org Review URL: https://codereview.chromium.org/1172793002
Diffstat (limited to 'core/src/fpdfdoc/doc_ocg.cpp')
-rw-r--r--core/src/fpdfdoc/doc_ocg.cpp26
1 files changed, 13 insertions, 13 deletions
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) {