summaryrefslogtreecommitdiff
path: root/core/include/fpdfapi
diff options
context:
space:
mode:
Diffstat (limited to 'core/include/fpdfapi')
-rw-r--r--core/include/fpdfapi/fpdf_objects.h4
-rw-r--r--core/include/fpdfapi/fpdf_pageobj.h2
-rw-r--r--core/include/fpdfapi/fpdf_parser.h38
-rw-r--r--core/include/fpdfapi/fpdf_render.h6
-rw-r--r--core/include/fpdfapi/fpdf_resource.h22
-rw-r--r--core/include/fpdfapi/fpdf_serial.h38
6 files changed, 55 insertions, 55 deletions
diff --git a/core/include/fpdfapi/fpdf_objects.h b/core/include/fpdfapi/fpdf_objects.h
index 0ad641a1e4..d0c76c5b0d 100644
--- a/core/include/fpdfapi/fpdf_objects.h
+++ b/core/include/fpdfapi/fpdf_objects.h
@@ -520,7 +520,7 @@ public:
void SetData(FX_LPCBYTE pData, FX_DWORD size, FX_BOOL bCompressed, FX_BOOL bKeepBuf);
- void InitStream(FX_BYTE* pData, FX_DWORD size, CPDF_Dictionary* pDict);
+ void InitStream(uint8_t* pData, FX_DWORD size, CPDF_Dictionary* pDict);
void InitStream(IFX_FileRead *pFile, CPDF_Dictionary* pDict);
@@ -657,7 +657,7 @@ protected:
FX_DWORD m_SrcOffset;
- FX_BYTE m_SrcBuffer[FPDF_FILTER_BUFFER_SIZE];
+ uint8_t m_SrcBuffer[FPDF_FILTER_BUFFER_SIZE];
friend class CPDF_Stream;
};
class CPDF_Null : public CPDF_Object
diff --git a/core/include/fpdfapi/fpdf_pageobj.h b/core/include/fpdfapi/fpdf_pageobj.h
index 1b53bdc859..e09c0456fe 100644
--- a/core/include/fpdfapi/fpdf_pageobj.h
+++ b/core/include/fpdfapi/fpdf_pageobj.h
@@ -114,7 +114,7 @@ public:
CPDF_Path* m_pPathList;
- FX_BYTE* m_pTypeList;
+ uint8_t* m_pTypeList;
int m_TextCount;
diff --git a/core/include/fpdfapi/fpdf_parser.h b/core/include/fpdfapi/fpdf_parser.h
index d18d362ec0..f0e3e2ca08 100644
--- a/core/include/fpdfapi/fpdf_parser.h
+++ b/core/include/fpdfapi/fpdf_parser.h
@@ -269,7 +269,7 @@ public:
CFX_ByteString GetKeyword();
- void GetBinary(FX_BYTE* buffer, FX_DWORD size);
+ void GetBinary(uint8_t* buffer, FX_DWORD size);
void ToNextLine();
@@ -291,18 +291,18 @@ public:
return m_pCryptoHandler != NULL;
}
- FX_BOOL GetCharAt(FX_FILESIZE pos, FX_BYTE& ch);
+ FX_BOOL GetCharAt(FX_FILESIZE pos, uint8_t& ch);
- FX_BOOL ReadBlock(FX_BYTE* pBuf, FX_DWORD size);
+ FX_BOOL ReadBlock(uint8_t* pBuf, FX_DWORD size);
CFX_ByteString GetNextWord(FX_BOOL& bIsNumber);
protected:
static const int kParserMaxRecursionDepth = 64;
static int s_CurrentRecursionDepth;
- virtual FX_BOOL GetNextChar(FX_BYTE& ch);
+ virtual FX_BOOL GetNextChar(uint8_t& ch);
- FX_BOOL GetCharAtBackward(FX_FILESIZE pos, FX_BYTE& ch);
+ FX_BOOL GetCharAtBackward(FX_FILESIZE pos, uint8_t& ch);
void GetNextWord();
@@ -326,7 +326,7 @@ protected:
FX_FILESIZE m_FileLen;
- FX_BYTE* m_pFileBuf;
+ uint8_t* m_pFileBuf;
FX_DWORD m_BufSize;
@@ -334,7 +334,7 @@ protected:
CPDF_CryptoHandler* m_pCryptoHandler;
- FX_BYTE m_WordBuffer[257];
+ uint8_t m_WordBuffer[257];
FX_DWORD m_WordSize;
@@ -458,7 +458,7 @@ public:
return m_ObjVersion[objnum];
}
- void GetIndirectBinary(FX_DWORD objnum, FX_BYTE*& pBuffer, FX_DWORD& size);
+ void GetIndirectBinary(FX_DWORD objnum, uint8_t*& pBuffer, FX_DWORD& size);
FX_BOOL GetFileStreamOption()
{
@@ -635,7 +635,7 @@ public:
FX_LPCBYTE user_pass, FX_DWORD user_size, FX_DWORD type = PDF_ENCRYPT_CONTENT);
CFX_ByteString GetUserPassword(FX_LPCBYTE owner_pass, FX_DWORD pass_size);
- CFX_ByteString GetUserPassword(FX_LPCBYTE owner_pass, FX_DWORD pass_size, FX_INT32 key_len);
+ CFX_ByteString GetUserPassword(FX_LPCBYTE owner_pass, FX_DWORD pass_size, int32_t key_len);
int GetVersion()
{
return m_Version;
@@ -661,16 +661,16 @@ private:
FX_BOOL LoadDict(CPDF_Dictionary* pEncryptDict, FX_DWORD type, int& cipher, int& key_len);
FX_BOOL CheckUserPassword(FX_LPCBYTE password, FX_DWORD pass_size,
- FX_BOOL bIgnoreEncryptMeta, FX_LPBYTE key, FX_INT32 key_len);
+ FX_BOOL bIgnoreEncryptMeta, FX_LPBYTE key, int32_t key_len);
- FX_BOOL CheckOwnerPassword(FX_LPCBYTE password, FX_DWORD pass_size, FX_LPBYTE key, FX_INT32 key_len);
+ FX_BOOL CheckOwnerPassword(FX_LPCBYTE password, FX_DWORD pass_size, FX_LPBYTE key, int32_t key_len);
FX_BOOL AES256_CheckPassword(FX_LPCBYTE password, FX_DWORD size, FX_BOOL bOwner, FX_LPBYTE key);
void AES256_SetPassword(CPDF_Dictionary* pEncryptDict, FX_LPCBYTE password, FX_DWORD size, FX_BOOL bOwner, FX_LPCBYTE key);
void AES256_SetPerms(CPDF_Dictionary* pEncryptDict, FX_DWORD permission, FX_BOOL bEncryptMetadata, FX_LPCBYTE key);
void OnCreate(CPDF_Dictionary* pEncryptDict, CPDF_Array* pIdArray,
FX_LPCBYTE user_pass, FX_DWORD user_size,
FX_LPCBYTE owner_pass, FX_DWORD owner_size, FX_BOOL bDefault, FX_DWORD type);
- FX_BOOL CheckSecurity(FX_INT32 key_len);
+ FX_BOOL CheckSecurity(int32_t key_len);
FX_BOOL m_bOwner;
@@ -678,7 +678,7 @@ private:
int m_Cipher;
- FX_BYTE m_EncryptKey[32];
+ uint8_t m_EncryptKey[32];
int m_KeyLen;
};
@@ -731,7 +731,7 @@ protected:
virtual FX_BOOL CryptStream(FX_LPVOID context, FX_LPCBYTE src_buf, FX_DWORD src_size, CFX_BinaryBuf& dest_buf, FX_BOOL bEncrypt);
virtual FX_BOOL CryptFinish(FX_LPVOID context, CFX_BinaryBuf& dest_buf, FX_BOOL bEncrypt);
- FX_BYTE m_EncryptKey[32];
+ uint8_t m_EncryptKey[32];
int m_KeyLen;
@@ -798,9 +798,9 @@ protected:
CFX_WideString FPDF_FileSpec_GetWin32Path(const CPDF_Object* pFileSpec);
void FPDF_FileSpec_SetWin32Path(CPDF_Object* pFileSpec, const CFX_WideString& fullpath);
-void FlateEncode(const FX_BYTE* src_buf, FX_DWORD src_size, FX_LPBYTE& dest_buf, FX_DWORD& dest_size);
-FX_DWORD FlateDecode(const FX_BYTE* src_buf, FX_DWORD src_size, FX_LPBYTE& dest_buf, FX_DWORD& dest_size);
-FX_DWORD RunLengthDecode(const FX_BYTE* src_buf, FX_DWORD src_size, FX_LPBYTE& dest_buf, FX_DWORD& dest_size);
+void FlateEncode(const uint8_t* src_buf, FX_DWORD src_size, FX_LPBYTE& dest_buf, FX_DWORD& dest_size);
+FX_DWORD FlateDecode(const uint8_t* src_buf, FX_DWORD src_size, FX_LPBYTE& dest_buf, FX_DWORD& dest_size);
+FX_DWORD RunLengthDecode(const uint8_t* src_buf, FX_DWORD src_size, FX_LPBYTE& dest_buf, FX_DWORD& dest_size);
class CPDF_NumberTree
{
public:
@@ -847,8 +847,8 @@ public:
virtual void SetDocument(CPDF_Document* pDoc) = 0;
virtual FX_BOOL IsPageAvail(int iPage, IFX_DownloadHints* pHints) = 0;
virtual FX_BOOL IsLinearized() = 0;
- virtual FX_INT32 IsFormAvail(IFX_DownloadHints *pHints) = 0;
- virtual FX_INT32 IsLinearizedPDF() = 0;
+ virtual int32_t IsFormAvail(IFX_DownloadHints *pHints) = 0;
+ virtual int32_t IsLinearizedPDF() = 0;
virtual void GetLinearizedMainXRefInfo(FX_FILESIZE *pPos, FX_DWORD *pSize) = 0;
protected:
diff --git a/core/include/fpdfapi/fpdf_render.h b/core/include/fpdfapi/fpdf_render.h
index 47d1b19920..2f03ae5bb7 100644
--- a/core/include/fpdfapi/fpdf_render.h
+++ b/core/include/fpdfapi/fpdf_render.h
@@ -241,7 +241,7 @@ public:
void ClearImageData();
FX_DWORD EstimateSize();
- void CacheOptimization(FX_INT32 dwLimitCacheSize);
+ void CacheOptimization(int32_t dwLimitCacheSize);
FX_DWORD GetCachedSize(CPDF_Stream* pStream) const;
FX_DWORD GetTimeCount() const
{
@@ -254,7 +254,7 @@ public:
void GetCachedBitmap(CPDF_Stream* pStream, CFX_DIBSource*& pBitmap, CFX_DIBSource*& pMask, FX_DWORD& MatteColor,
FX_BOOL bStdCS = FALSE, FX_DWORD GroupFamily = 0, FX_BOOL bLoadMask = FALSE,
- CPDF_RenderStatus* pRenderStatus = NULL, FX_INT32 downsampleWidth = 0, FX_INT32 downsampleHeight = 0);
+ CPDF_RenderStatus* pRenderStatus = NULL, int32_t downsampleWidth = 0, int32_t downsampleHeight = 0);
void ResetBitmap(CPDF_Stream* pStream, const CFX_DIBitmap* pBitmap);
void ClearImageCache(CPDF_Stream* pStream);
@@ -266,7 +266,7 @@ public:
public:
FX_BOOL StartGetCachedBitmap(CPDF_Stream* pStream, FX_BOOL bStdCS = FALSE, FX_DWORD GroupFamily = 0,
FX_BOOL bLoadMask = FALSE, CPDF_RenderStatus* pRenderStatus = NULL,
- FX_INT32 downsampleWidth = 0, FX_INT32 downsampleHeight = 0);
+ int32_t downsampleWidth = 0, int32_t downsampleHeight = 0);
FX_BOOL Continue(IFX_Pause* pPause);
CPDF_ImageCache* m_pCurImageCache;
diff --git a/core/include/fpdfapi/fpdf_resource.h b/core/include/fpdfapi/fpdf_resource.h
index f1ea6b5a23..06dcdfec44 100644
--- a/core/include/fpdfapi/fpdf_resource.h
+++ b/core/include/fpdfapi/fpdf_resource.h
@@ -160,7 +160,7 @@ public:
if (offset < 0 || nStrLen < 1) {
return 0;
}
- FX_BYTE ch = offset < nStrLen ? pString[offset++] : pString[nStrLen-1];
+ uint8_t ch = offset < nStrLen ? pString[offset++] : pString[nStrLen-1];
return static_cast<FX_DWORD>(ch);
}
@@ -326,14 +326,14 @@ public:
FX_BOOL IsIdentical(CPDF_FontEncoding* pAnother) const;
- FX_WCHAR UnicodeFromCharCode(FX_BYTE charcode) const
+ FX_WCHAR UnicodeFromCharCode(uint8_t charcode) const
{
return m_Unicodes[charcode];
}
int CharCodeFromUnicode(FX_WCHAR unicode) const;
- void SetUnicode(FX_BYTE charcode, FX_WCHAR unicode)
+ void SetUnicode(uint8_t charcode, FX_WCHAR unicode)
{
m_Unicodes[charcode] = unicode;
}
@@ -368,7 +368,7 @@ protected:
virtual void LoadGlyphMap() = 0;
virtual FX_WCHAR _UnicodeFromCharCode(FX_DWORD charcode) const
{
- return m_Encoding.UnicodeFromCharCode((FX_BYTE)charcode);
+ return m_Encoding.UnicodeFromCharCode((uint8_t)charcode);
}
virtual FX_DWORD _CharCodeFromUnicode(FX_WCHAR Unicode) const
{
@@ -831,7 +831,7 @@ public:
{
}
FX_ARGB* pMatteColor;
- FX_INT32 nQuality;
+ int32_t nQuality;
};
class CPDF_Image
{
@@ -884,12 +884,12 @@ public:
- FX_INT32 GetPixelHeight() const
+ int32_t GetPixelHeight() const
{
return m_Height;
}
- FX_INT32 GetPixelWidth() const
+ int32_t GetPixelWidth() const
{
return m_Width;
}
@@ -909,9 +909,9 @@ public:
- void SetImage(const CFX_DIBitmap* pDIBitmap, FX_INT32 iCompress, IFX_FileWrite *pFileWrite = NULL, IFX_FileRead *pFileRead = NULL, const CFX_DIBitmap* pMask = NULL, const CPDF_ImageSetParam* pParam = NULL);
+ void SetImage(const CFX_DIBitmap* pDIBitmap, int32_t iCompress, IFX_FileWrite *pFileWrite = NULL, IFX_FileRead *pFileRead = NULL, const CFX_DIBitmap* pMask = NULL, const CPDF_ImageSetParam* pParam = NULL);
- void SetJpegImage(FX_BYTE* pImageData, FX_DWORD size);
+ void SetJpegImage(uint8_t* pImageData, FX_DWORD size);
void SetJpegImage(IFX_FileRead *pFile);
@@ -931,9 +931,9 @@ private:
FX_BOOL m_bInline;
CPDF_Dictionary* m_pInlineDict;
- FX_INT32 m_Height;
+ int32_t m_Height;
- FX_INT32 m_Width;
+ int32_t m_Width;
FX_BOOL m_bIsMask;
diff --git a/core/include/fpdfapi/fpdf_serial.h b/core/include/fpdfapi/fpdf_serial.h
index fc55fa08a9..e4a0aec2e5 100644
--- a/core/include/fpdfapi/fpdf_serial.h
+++ b/core/include/fpdfapi/fpdf_serial.h
@@ -127,9 +127,9 @@ public:
FX_BOOL Create(IFX_StreamWrite* pFile, FX_DWORD flags = 0);
- FX_INT32 Continue(IFX_Pause *pPause = NULL);
+ int32_t Continue(IFX_Pause *pPause = NULL);
- FX_BOOL SetFileVersion(FX_INT32 fileVersion = 17);
+ FX_BOOL SetFileVersion(int32_t fileVersion = 17);
protected:
CPDF_Document* m_pDocument;
@@ -155,16 +155,16 @@ protected:
CPDF_XRefStream* m_pXRefStream;
- FX_INT32 m_ObjectStreamSize;
+ int32_t m_ObjectStreamSize;
FX_DWORD m_dwLastObjNum;
FX_BOOL Create(FX_DWORD flags);
void ResetStandardSecurity();
void Clear();
- FX_INT32 WriteDoc_Stage1(IFX_Pause *pPause);
- FX_INT32 WriteDoc_Stage2(IFX_Pause *pPause);
- FX_INT32 WriteDoc_Stage3(IFX_Pause *pPause);
- FX_INT32 WriteDoc_Stage4(IFX_Pause *pPause);
+ int32_t WriteDoc_Stage1(IFX_Pause *pPause);
+ int32_t WriteDoc_Stage2(IFX_Pause *pPause);
+ int32_t WriteDoc_Stage3(IFX_Pause *pPause);
+ int32_t WriteDoc_Stage4(IFX_Pause *pPause);
CFX_FileBufferArchive m_File;
@@ -172,19 +172,19 @@ protected:
void InitOldObjNumOffsets();
void InitNewObjNumOffsets();
void AppendNewObjNum(FX_DWORD objbum);
- FX_INT32 WriteOldIndirectObject(FX_DWORD objnum);
- FX_INT32 WriteOldObjs(IFX_Pause *pPause);
- FX_INT32 WriteNewObjs(FX_BOOL bIncremental, IFX_Pause *pPause);
- FX_INT32 WriteIndirectObj(const CPDF_Object* pObj);
- FX_INT32 WriteDirectObj(FX_DWORD objnum, const CPDF_Object* pObj, FX_BOOL bEncrypt = TRUE);
- FX_INT32 WriteIndirectObjectToStream(const CPDF_Object* pObj);
- FX_INT32 WriteIndirectObj(FX_DWORD objnum, const CPDF_Object* pObj);
- FX_INT32 WriteIndirectObjectToStream(FX_DWORD objnum, FX_LPCBYTE pBuffer, FX_DWORD dwSize);
- FX_INT32 AppendObjectNumberToXRef(FX_DWORD objnum);
+ int32_t WriteOldIndirectObject(FX_DWORD objnum);
+ int32_t WriteOldObjs(IFX_Pause *pPause);
+ int32_t WriteNewObjs(FX_BOOL bIncremental, IFX_Pause *pPause);
+ int32_t WriteIndirectObj(const CPDF_Object* pObj);
+ int32_t WriteDirectObj(FX_DWORD objnum, const CPDF_Object* pObj, FX_BOOL bEncrypt = TRUE);
+ int32_t WriteIndirectObjectToStream(const CPDF_Object* pObj);
+ int32_t WriteIndirectObj(FX_DWORD objnum, const CPDF_Object* pObj);
+ int32_t WriteIndirectObjectToStream(FX_DWORD objnum, FX_LPCBYTE pBuffer, FX_DWORD dwSize);
+ int32_t AppendObjectNumberToXRef(FX_DWORD objnum);
void InitID(FX_BOOL bDefault = TRUE);
- FX_INT32 WriteStream(const CPDF_Object* pStream, FX_DWORD objnum, CPDF_CryptoHandler* pCrypto);
+ int32_t WriteStream(const CPDF_Object* pStream, FX_DWORD objnum, CPDF_CryptoHandler* pCrypto);
- FX_INT32 m_iStage;
+ int32_t m_iStage;
FX_DWORD m_dwFlags;
FX_POSITION m_Pos;
FX_FILESIZE m_XrefStart;
@@ -196,7 +196,7 @@ protected:
CPDF_Array* m_pIDArray;
- FX_INT32 m_FileVersion;
+ int32_t m_FileVersion;
friend class CPDF_ObjectStream;
friend class CPDF_XRefStream;
};