summaryrefslogtreecommitdiff
path: root/core/fpdfapi/fpdf_parser/include
diff options
context:
space:
mode:
authortsepez <tsepez@chromium.org>2016-03-25 15:18:35 -0700
committerCommit bot <commit-bot@chromium.org>2016-03-25 15:18:36 -0700
commitb5e8f14e3eefc5da995b332788d3203cee204883 (patch)
tree34fc80504d2034013b18f30df1b0f6f1a94e2d70 /core/fpdfapi/fpdf_parser/include
parent6d18bd3b8ec82ae3c24a439f5c7925786a0e2d8b (diff)
downloadpdfium-b5e8f14e3eefc5da995b332788d3203cee204883.tar.xz
Remove FX_DWORD from core/ and delete definitionchromium/2695chromium/2694chromium/2693chromium/2692
Review URL: https://codereview.chromium.org/1832173003
Diffstat (limited to 'core/fpdfapi/fpdf_parser/include')
-rw-r--r--core/fpdfapi/fpdf_parser/include/cfdf_document.h2
-rw-r--r--core/fpdfapi/fpdf_parser/include/cpdf_array.h30
-rw-r--r--core/fpdfapi/fpdf_parser/include/cpdf_dictionary.h4
-rw-r--r--core/fpdfapi/fpdf_parser/include/cpdf_document.h16
-rw-r--r--core/fpdfapi/fpdf_parser/include/cpdf_indirect_object_holder.h18
-rw-r--r--core/fpdfapi/fpdf_parser/include/cpdf_object.h8
-rw-r--r--core/fpdfapi/fpdf_parser/include/cpdf_parser.h56
-rw-r--r--core/fpdfapi/fpdf_parser/include/cpdf_reference.h6
-rw-r--r--core/fpdfapi/fpdf_parser/include/cpdf_simple_parser.h10
-rw-r--r--core/fpdfapi/fpdf_parser/include/cpdf_stream.h16
-rw-r--r--core/fpdfapi/fpdf_parser/include/cpdf_stream_acc.h6
-rw-r--r--core/fpdfapi/fpdf_parser/include/fpdf_parser_decode.h48
-rw-r--r--core/fpdfapi/fpdf_parser/include/ipdf_data_avail.h6
13 files changed, 113 insertions, 113 deletions
diff --git a/core/fpdfapi/fpdf_parser/include/cfdf_document.h b/core/fpdfapi/fpdf_parser/include/cfdf_document.h
index f01039cd4e..18b9442fa9 100644
--- a/core/fpdfapi/fpdf_parser/include/cfdf_document.h
+++ b/core/fpdfapi/fpdf_parser/include/cfdf_document.h
@@ -18,7 +18,7 @@ class CFDF_Document : public CPDF_IndirectObjectHolder {
static CFDF_Document* CreateNewDoc();
static CFDF_Document* ParseFile(IFX_FileRead* pFile,
FX_BOOL bOwnFile = FALSE);
- static CFDF_Document* ParseMemory(const uint8_t* pData, FX_DWORD size);
+ static CFDF_Document* ParseMemory(const uint8_t* pData, uint32_t size);
~CFDF_Document();
FX_BOOL WriteBuf(CFX_ByteTextBuf& buf) const;
diff --git a/core/fpdfapi/fpdf_parser/include/cpdf_array.h b/core/fpdfapi/fpdf_parser/include/cpdf_array.h
index 2ee7760a77..3efa03e0d5 100644
--- a/core/fpdfapi/fpdf_parser/include/cpdf_array.h
+++ b/core/fpdfapi/fpdf_parser/include/cpdf_array.h
@@ -24,34 +24,34 @@ class CPDF_Array : public CPDF_Object {
CPDF_Array* AsArray() override;
const CPDF_Array* AsArray() const override;
- FX_DWORD GetCount() const { return m_Objects.GetSize(); }
- CPDF_Object* GetElement(FX_DWORD index) const;
- CPDF_Object* GetElementValue(FX_DWORD index) const;
+ uint32_t GetCount() const { return m_Objects.GetSize(); }
+ CPDF_Object* GetElement(uint32_t index) const;
+ CPDF_Object* GetElementValue(uint32_t index) const;
CFX_Matrix GetMatrix();
CFX_FloatRect GetRect();
- CFX_ByteString GetStringAt(FX_DWORD index) const;
- CFX_ByteStringC GetConstStringAt(FX_DWORD index) const;
- int GetIntegerAt(FX_DWORD index) const;
- FX_FLOAT GetNumberAt(FX_DWORD index) const;
- CPDF_Dictionary* GetDictAt(FX_DWORD index) const;
- CPDF_Stream* GetStreamAt(FX_DWORD index) const;
- CPDF_Array* GetArrayAt(FX_DWORD index) const;
- FX_FLOAT GetFloatAt(FX_DWORD index) const { return GetNumberAt(index); }
+ CFX_ByteString GetStringAt(uint32_t index) const;
+ CFX_ByteStringC GetConstStringAt(uint32_t index) const;
+ int GetIntegerAt(uint32_t index) const;
+ FX_FLOAT GetNumberAt(uint32_t index) const;
+ CPDF_Dictionary* GetDictAt(uint32_t index) const;
+ CPDF_Stream* GetStreamAt(uint32_t index) const;
+ CPDF_Array* GetArrayAt(uint32_t index) const;
+ FX_FLOAT GetFloatAt(uint32_t index) const { return GetNumberAt(index); }
- void SetAt(FX_DWORD index,
+ void SetAt(uint32_t index,
CPDF_Object* pObj,
CPDF_IndirectObjectHolder* pObjs = nullptr);
- void InsertAt(FX_DWORD index,
+ void InsertAt(uint32_t index,
CPDF_Object* pObj,
CPDF_IndirectObjectHolder* pObjs = nullptr);
- void RemoveAt(FX_DWORD index, int nCount = 1);
+ void RemoveAt(uint32_t index, int nCount = 1);
void Add(CPDF_Object* pObj, CPDF_IndirectObjectHolder* pObjs = nullptr);
void AddNumber(FX_FLOAT f);
void AddInteger(int i);
void AddString(const CFX_ByteString& str);
void AddName(const CFX_ByteString& str);
- void AddReference(CPDF_IndirectObjectHolder* pDoc, FX_DWORD objnum);
+ void AddReference(CPDF_IndirectObjectHolder* pDoc, uint32_t objnum);
void AddReference(CPDF_IndirectObjectHolder* pDoc, CPDF_Object* obj) {
AddReference(pDoc, obj->GetObjNum());
}
diff --git a/core/fpdfapi/fpdf_parser/include/cpdf_dictionary.h b/core/fpdfapi/fpdf_parser/include/cpdf_dictionary.h
index ebc5cee90a..73eabf9368 100644
--- a/core/fpdfapi/fpdf_parser/include/cpdf_dictionary.h
+++ b/core/fpdfapi/fpdf_parser/include/cpdf_dictionary.h
@@ -65,7 +65,7 @@ class CPDF_Dictionary : public CPDF_Object {
void SetAtNumber(const CFX_ByteStringC& key, FX_FLOAT f);
void SetAtReference(const CFX_ByteStringC& key,
CPDF_IndirectObjectHolder* pDoc,
- FX_DWORD objnum);
+ uint32_t objnum);
void SetAtReference(const CFX_ByteStringC& key,
CPDF_IndirectObjectHolder* pDoc,
CPDF_Object* obj) {
@@ -77,7 +77,7 @@ class CPDF_Dictionary : public CPDF_Object {
void AddReference(const CFX_ByteStringC& key,
CPDF_IndirectObjectHolder* pDoc,
- FX_DWORD objnum);
+ uint32_t objnum);
// Invalidates iterators for the element with the key |key|.
void RemoveAt(const CFX_ByteStringC& key);
diff --git a/core/fpdfapi/fpdf_parser/include/cpdf_document.h b/core/fpdfapi/fpdf_parser/include/cpdf_document.h
index 21b9d250fd..bbccf59361 100644
--- a/core/fpdfapi/fpdf_parser/include/cpdf_document.h
+++ b/core/fpdfapi/fpdf_parser/include/cpdf_document.h
@@ -50,8 +50,8 @@ class CPDF_Document : public CFX_PrivateData, public CPDF_IndirectObjectHolder {
int GetPageCount() const;
CPDF_Dictionary* GetPage(int iPage);
- int GetPageIndex(FX_DWORD objnum);
- FX_DWORD GetUserPermissions(FX_BOOL bCheckRevision = FALSE) const;
+ int GetPageIndex(uint32_t objnum);
+ uint32_t GetUserPermissions(FX_BOOL bCheckRevision = FALSE) const;
CPDF_DocPageData* GetPageData() { return GetValidatePageData(); }
void ClearPageData();
void RemoveColorSpaceFromPageData(CPDF_Object* pObject);
@@ -60,7 +60,7 @@ class CPDF_Document : public CFX_PrivateData, public CPDF_IndirectObjectHolder {
void ClearRenderData();
void ClearRenderFont();
- FX_BOOL IsFormStream(FX_DWORD objnum, FX_BOOL& bForm) const;
+ FX_BOOL IsFormStream(uint32_t objnum, FX_BOOL& bForm) const;
// |pFontDict| must not be null.
CPDF_Font* LoadFont(CPDF_Dictionary* pFontDict);
@@ -110,8 +110,8 @@ class CPDF_Document : public CFX_PrivateData, public CPDF_IndirectObjectHolder {
int nPagesToGo,
int level);
int _FindPageIndex(CPDF_Dictionary* pNode,
- FX_DWORD& skip_count,
- FX_DWORD objnum,
+ uint32_t& skip_count,
+ uint32_t objnum,
int& index,
int level = 0);
FX_BOOL CheckOCGVisible(CPDF_Dictionary* pOCG, FX_BOOL bPrinting);
@@ -127,9 +127,9 @@ class CPDF_Document : public CFX_PrivateData, public CPDF_IndirectObjectHolder {
CFX_ByteString m_ID1;
CFX_ByteString m_ID2;
FX_BOOL m_bLinearized;
- FX_DWORD m_dwFirstPageNo;
- FX_DWORD m_dwFirstPageObjNum;
- CFX_ArrayTemplate<FX_DWORD> m_PageList;
+ uint32_t m_dwFirstPageNo;
+ uint32_t m_dwFirstPageObjNum;
+ CFX_ArrayTemplate<uint32_t> m_PageList;
CPDF_DocPageData* m_pDocPage;
CPDF_DocRenderData* m_pDocRender;
};
diff --git a/core/fpdfapi/fpdf_parser/include/cpdf_indirect_object_holder.h b/core/fpdfapi/fpdf_parser/include/cpdf_indirect_object_holder.h
index 373159d060..a219181179 100644
--- a/core/fpdfapi/fpdf_parser/include/cpdf_indirect_object_holder.h
+++ b/core/fpdfapi/fpdf_parser/include/cpdf_indirect_object_holder.h
@@ -16,20 +16,20 @@ class CPDF_Parser;
class CPDF_IndirectObjectHolder {
public:
- using iterator = std::map<FX_DWORD, CPDF_Object*>::iterator;
- using const_iterator = std::map<FX_DWORD, CPDF_Object*>::const_iterator;
+ using iterator = std::map<uint32_t, CPDF_Object*>::iterator;
+ using const_iterator = std::map<uint32_t, CPDF_Object*>::const_iterator;
explicit CPDF_IndirectObjectHolder(CPDF_Parser* pParser);
~CPDF_IndirectObjectHolder();
- CPDF_Object* GetIndirectObject(FX_DWORD objnum);
- FX_DWORD AddIndirectObject(CPDF_Object* pObj);
- void ReleaseIndirectObject(FX_DWORD objnum);
+ CPDF_Object* GetIndirectObject(uint32_t objnum);
+ uint32_t AddIndirectObject(CPDF_Object* pObj);
+ void ReleaseIndirectObject(uint32_t objnum);
// Takes ownership of |pObj|.
- FX_BOOL InsertIndirectObject(FX_DWORD objnum, CPDF_Object* pObj);
+ FX_BOOL InsertIndirectObject(uint32_t objnum, CPDF_Object* pObj);
- FX_DWORD GetLastObjNum() const { return m_LastObjNum; }
+ uint32_t GetLastObjNum() const { return m_LastObjNum; }
iterator begin() { return m_IndirectObjs.begin(); }
const_iterator begin() const { return m_IndirectObjs.begin(); }
iterator end() { return m_IndirectObjs.end(); }
@@ -37,8 +37,8 @@ class CPDF_IndirectObjectHolder {
protected:
CPDF_Parser* m_pParser;
- FX_DWORD m_LastObjNum;
- std::map<FX_DWORD, CPDF_Object*> m_IndirectObjs;
+ uint32_t m_LastObjNum;
+ std::map<uint32_t, CPDF_Object*> m_IndirectObjs;
};
#endif // CORE_FPDFAPI_FPDF_PARSER_INCLUDE_CPDF_INDIRECT_OBJECT_HOLDER_H_
diff --git a/core/fpdfapi/fpdf_parser/include/cpdf_object.h b/core/fpdfapi/fpdf_parser/include/cpdf_object.h
index cc461d6218..1ba38a946e 100644
--- a/core/fpdfapi/fpdf_parser/include/cpdf_object.h
+++ b/core/fpdfapi/fpdf_parser/include/cpdf_object.h
@@ -35,8 +35,8 @@ class CPDF_Object {
};
virtual Type GetType() const = 0;
- FX_DWORD GetObjNum() const { return m_ObjNum; }
- FX_DWORD GetGenNum() const { return m_GenNum; }
+ uint32_t GetObjNum() const { return m_ObjNum; }
+ uint32_t GetGenNum() const { return m_GenNum; }
virtual CPDF_Object* Clone(FX_BOOL bDirect = FALSE) const = 0;
virtual CPDF_Object* GetDirect() const;
@@ -85,8 +85,8 @@ class CPDF_Object {
virtual ~CPDF_Object();
void Destroy() { delete this; }
- FX_DWORD m_ObjNum;
- FX_DWORD m_GenNum;
+ uint32_t m_ObjNum;
+ uint32_t m_GenNum;
friend class CPDF_IndirectObjectHolder;
friend class CPDF_Parser;
diff --git a/core/fpdfapi/fpdf_parser/include/cpdf_parser.h b/core/fpdfapi/fpdf_parser/include/cpdf_parser.h
index 933ab1c7fa..45aca8f21a 100644
--- a/core/fpdfapi/fpdf_parser/include/cpdf_parser.h
+++ b/core/fpdfapi/fpdf_parser/include/cpdf_parser.h
@@ -38,7 +38,7 @@ class CPDF_Parser {
~CPDF_Parser();
Error StartParse(IFX_FileRead* pFile);
- FX_DWORD GetPermissions(FX_BOOL bCheckRevision = FALSE);
+ uint32_t GetPermissions(FX_BOOL bCheckRevision = FALSE);
void SetPassword(const FX_CHAR* password) { m_Password = password; }
CFX_ByteString GetPassword() { return m_Password; }
@@ -46,46 +46,46 @@ class CPDF_Parser {
FX_FILESIZE GetLastXRefOffset() const { return m_LastXRefOffset; }
CPDF_Document* GetDocument() const { return m_pDocument; }
- FX_DWORD GetRootObjNum();
- FX_DWORD GetInfoObjNum();
+ uint32_t GetRootObjNum();
+ uint32_t GetInfoObjNum();
CPDF_Array* GetIDArray();
CPDF_Dictionary* GetEncryptDict() const { return m_pEncryptDict; }
CPDF_Object* ParseIndirectObject(CPDF_IndirectObjectHolder* pObjList,
- FX_DWORD objnum);
+ uint32_t objnum);
- FX_DWORD GetLastObjNum() const;
- bool IsValidObjectNumber(FX_DWORD objnum) const;
- FX_FILESIZE GetObjectPositionOrZero(FX_DWORD objnum) const;
- uint8_t GetObjectType(FX_DWORD objnum) const;
- uint16_t GetObjectGenNum(FX_DWORD objnum) const;
+ uint32_t GetLastObjNum() const;
+ bool IsValidObjectNumber(uint32_t objnum) const;
+ FX_FILESIZE GetObjectPositionOrZero(uint32_t objnum) const;
+ uint8_t GetObjectType(uint32_t objnum) const;
+ uint16_t GetObjectGenNum(uint32_t objnum) const;
bool IsVersionUpdated() const { return m_bVersionUpdated; }
- bool IsObjectFreeOrNull(FX_DWORD objnum) const;
- FX_BOOL IsFormStream(FX_DWORD objnum, FX_BOOL& bForm);
+ bool IsObjectFreeOrNull(uint32_t objnum) const;
+ FX_BOOL IsFormStream(uint32_t objnum, FX_BOOL& bForm);
IPDF_CryptoHandler* GetCryptoHandler();
IFX_FileRead* GetFileAccess() const;
- FX_FILESIZE GetObjectOffset(FX_DWORD objnum) const;
- FX_FILESIZE GetObjectSize(FX_DWORD objnum) const;
+ FX_FILESIZE GetObjectOffset(uint32_t objnum) const;
+ FX_FILESIZE GetObjectSize(uint32_t objnum) const;
- void GetIndirectBinary(FX_DWORD objnum, uint8_t*& pBuffer, FX_DWORD& size);
+ void GetIndirectBinary(uint32_t objnum, uint8_t*& pBuffer, uint32_t& size);
int GetFileVersion() const { return m_FileVersion; }
FX_BOOL IsXRefStream() const { return m_bXRefStream; }
CPDF_Object* ParseIndirectObjectAt(CPDF_IndirectObjectHolder* pObjList,
FX_FILESIZE pos,
- FX_DWORD objnum);
+ uint32_t objnum);
CPDF_Object* ParseIndirectObjectAtByStrict(
CPDF_IndirectObjectHolder* pObjList,
FX_FILESIZE pos,
- FX_DWORD objnum,
+ uint32_t objnum,
FX_FILESIZE* pResultPos);
Error StartAsyncParse(IFX_FileRead* pFile);
- FX_DWORD GetFirstPageNo() const { return m_dwFirstPageNo; }
+ uint32_t GetFirstPageNo() const { return m_dwFirstPageNo; }
protected:
struct ObjectInfo {
@@ -106,14 +106,14 @@ class CPDF_Parser {
FX_BOOL RebuildCrossRef();
Error SetEncryptHandler();
void ReleaseEncryptHandler();
- FX_BOOL LoadLinearizedAllCrossRefV4(FX_FILESIZE pos, FX_DWORD dwObjCount);
- FX_BOOL LoadLinearizedCrossRefV4(FX_FILESIZE pos, FX_DWORD dwObjCount);
+ FX_BOOL LoadLinearizedAllCrossRefV4(FX_FILESIZE pos, uint32_t dwObjCount);
+ FX_BOOL LoadLinearizedCrossRefV4(FX_FILESIZE pos, uint32_t dwObjCount);
FX_BOOL LoadLinearizedAllCrossRefV5(FX_FILESIZE pos);
Error LoadLinearizedMainXRefTable();
- CPDF_StreamAcc* GetObjectStream(FX_DWORD number);
- FX_BOOL IsLinearizedFile(IFX_FileRead* pFileAccess, FX_DWORD offset);
+ CPDF_StreamAcc* GetObjectStream(uint32_t number);
+ FX_BOOL IsLinearizedFile(IFX_FileRead* pFileAccess, uint32_t offset);
void SetEncryptDictionary(CPDF_Dictionary* pDict);
- void ShrinkObjectMap(FX_DWORD size);
+ void ShrinkObjectMap(uint32_t size);
CPDF_Document* m_pDocument;
std::unique_ptr<CPDF_SyntaxParser> m_pSyntax;
@@ -127,27 +127,27 @@ class CPDF_Parser {
CFX_ByteString m_bsRecipient;
CFX_ByteString m_FilePath;
CFX_ByteString m_Password;
- std::map<FX_DWORD, ObjectInfo> m_ObjectInfo;
+ std::map<uint32_t, ObjectInfo> m_ObjectInfo;
std::set<FX_FILESIZE> m_SortedOffset;
CFX_ArrayTemplate<CPDF_Dictionary*> m_Trailers;
bool m_bVersionUpdated;
CPDF_Object* m_pLinearized;
- FX_DWORD m_dwFirstPageNo;
- FX_DWORD m_dwXrefStartObjNum;
+ uint32_t m_dwFirstPageNo;
+ uint32_t m_dwXrefStartObjNum;
// A map of object numbers to indirect streams. Map owns the streams.
- std::map<FX_DWORD, std::unique_ptr<CPDF_StreamAcc>> m_ObjectStreamMap;
+ std::map<uint32_t, std::unique_ptr<CPDF_StreamAcc>> m_ObjectStreamMap;
// Mapping of object numbers to offsets. The offsets are relative to the first
// object in the stream.
- using StreamObjectCache = std::map<FX_DWORD, FX_DWORD>;
+ using StreamObjectCache = std::map<uint32_t, uint32_t>;
// Mapping of streams to their object caches. This is valid as long as the
// streams in |m_ObjectStreamMap| are valid.
std::map<CPDF_StreamAcc*, StreamObjectCache> m_ObjCache;
// All indirect object numbers that are being parsed.
- std::set<FX_DWORD> m_ParsingObjNums;
+ std::set<uint32_t> m_ParsingObjNums;
friend class CPDF_DataAvail;
diff --git a/core/fpdfapi/fpdf_parser/include/cpdf_reference.h b/core/fpdfapi/fpdf_parser/include/cpdf_reference.h
index f44f1e437b..b7d826902b 100644
--- a/core/fpdfapi/fpdf_parser/include/cpdf_reference.h
+++ b/core/fpdfapi/fpdf_parser/include/cpdf_reference.h
@@ -31,9 +31,9 @@ class CPDF_Reference : public CPDF_Object {
const CPDF_Reference* AsReference() const override;
CPDF_IndirectObjectHolder* GetObjList() const { return m_pObjList; }
- FX_DWORD GetRefObjNum() const { return m_RefObjNum; }
+ uint32_t GetRefObjNum() const { return m_RefObjNum; }
- void SetRef(CPDF_IndirectObjectHolder* pDoc, FX_DWORD objnum);
+ void SetRef(CPDF_IndirectObjectHolder* pDoc, uint32_t objnum);
protected:
~CPDF_Reference() override;
@@ -45,7 +45,7 @@ class CPDF_Reference : public CPDF_Object {
}
CPDF_IndirectObjectHolder* m_pObjList;
- FX_DWORD m_RefObjNum;
+ uint32_t m_RefObjNum;
};
#endif // CORE_FPDFAPI_FPDF_PARSER_INCLUDE_CPDF_REFERENCE_H_
diff --git a/core/fpdfapi/fpdf_parser/include/cpdf_simple_parser.h b/core/fpdfapi/fpdf_parser/include/cpdf_simple_parser.h
index 0bd3b8daac..c9aa12eaa9 100644
--- a/core/fpdfapi/fpdf_parser/include/cpdf_simple_parser.h
+++ b/core/fpdfapi/fpdf_parser/include/cpdf_simple_parser.h
@@ -12,7 +12,7 @@
class CPDF_SimpleParser {
public:
- CPDF_SimpleParser(const uint8_t* pData, FX_DWORD dwSize);
+ CPDF_SimpleParser(const uint8_t* pData, uint32_t dwSize);
CPDF_SimpleParser(const CFX_ByteStringC& str);
CFX_ByteStringC GetWord();
@@ -22,14 +22,14 @@ class CPDF_SimpleParser {
bool FindTagParamFromStart(const CFX_ByteStringC& token, int nParams);
// For testing only.
- FX_DWORD GetCurPos() const { return m_dwCurPos; }
+ uint32_t GetCurPos() const { return m_dwCurPos; }
private:
- void ParseWord(const uint8_t*& pStart, FX_DWORD& dwSize);
+ void ParseWord(const uint8_t*& pStart, uint32_t& dwSize);
const uint8_t* m_pData;
- FX_DWORD m_dwSize;
- FX_DWORD m_dwCurPos;
+ uint32_t m_dwSize;
+ uint32_t m_dwCurPos;
};
#endif // CORE_FPDFAPI_FPDF_PARSER_INCLUDE_CPDF_SIMPLE_PARSER_H_
diff --git a/core/fpdfapi/fpdf_parser/include/cpdf_stream.h b/core/fpdfapi/fpdf_parser/include/cpdf_stream.h
index 20045d7aa2..0010a1528e 100644
--- a/core/fpdfapi/fpdf_parser/include/cpdf_stream.h
+++ b/core/fpdfapi/fpdf_parser/include/cpdf_stream.h
@@ -13,7 +13,7 @@
class CPDF_Stream : public CPDF_Object {
public:
- CPDF_Stream(uint8_t* pData, FX_DWORD size, CPDF_Dictionary* pDict);
+ CPDF_Stream(uint8_t* pData, uint32_t size, CPDF_Dictionary* pDict);
// CPDF_Object.
Type GetType() const override;
@@ -24,33 +24,33 @@ class CPDF_Stream : public CPDF_Object {
CPDF_Stream* AsStream() override;
const CPDF_Stream* AsStream() const override;
- FX_DWORD GetRawSize() const { return m_dwSize; }
+ uint32_t GetRawSize() const { return m_dwSize; }
uint8_t* GetRawData() const { return m_pDataBuf; }
void SetData(const uint8_t* pData,
- FX_DWORD size,
+ uint32_t size,
FX_BOOL bCompressed,
FX_BOOL bKeepBuf);
- void InitStream(uint8_t* pData, FX_DWORD size, CPDF_Dictionary* pDict);
+ void InitStream(uint8_t* pData, uint32_t size, CPDF_Dictionary* pDict);
void InitStreamFromFile(IFX_FileRead* pFile, CPDF_Dictionary* pDict);
FX_BOOL ReadRawData(FX_FILESIZE start_pos,
uint8_t* pBuf,
- FX_DWORD buf_size) const;
+ uint32_t buf_size) const;
bool IsMemoryBased() const { return m_GenNum == kMemoryBasedGenNum; }
protected:
- static const FX_DWORD kMemoryBasedGenNum = (FX_DWORD)-1;
+ static const uint32_t kMemoryBasedGenNum = (uint32_t)-1;
~CPDF_Stream() override;
void InitStreamInternal(CPDF_Dictionary* pDict);
CPDF_Dictionary* m_pDict;
- FX_DWORD m_dwSize;
- FX_DWORD m_GenNum;
+ uint32_t m_dwSize;
+ uint32_t m_GenNum;
union {
uint8_t* m_pDataBuf;
diff --git a/core/fpdfapi/fpdf_parser/include/cpdf_stream_acc.h b/core/fpdfapi/fpdf_parser/include/cpdf_stream_acc.h
index 8fad265a75..6176753deb 100644
--- a/core/fpdfapi/fpdf_parser/include/cpdf_stream_acc.h
+++ b/core/fpdfapi/fpdf_parser/include/cpdf_stream_acc.h
@@ -19,7 +19,7 @@ class CPDF_StreamAcc {
void LoadAllData(const CPDF_Stream* pStream,
FX_BOOL bRawAccess = FALSE,
- FX_DWORD estimated_size = 0,
+ uint32_t estimated_size = 0,
FX_BOOL bImageAcc = FALSE);
const CPDF_Stream* GetStream() const { return m_pStream; }
@@ -28,14 +28,14 @@ class CPDF_StreamAcc {
}
const uint8_t* GetData() const;
- FX_DWORD GetSize() const;
+ uint32_t GetSize() const;
const CFX_ByteString& GetImageDecoder() const { return m_ImageDecoder; }
const CPDF_Dictionary* GetImageParam() const { return m_pImageParam; }
uint8_t* DetachData();
protected:
uint8_t* m_pData;
- FX_DWORD m_dwSize;
+ uint32_t m_dwSize;
FX_BOOL m_bNewBuf;
CFX_ByteString m_ImageDecoder;
CPDF_Dictionary* m_pImageParam;
diff --git a/core/fpdfapi/fpdf_parser/include/fpdf_parser_decode.h b/core/fpdfapi/fpdf_parser/include/fpdf_parser_decode.h
index 4a1d66cabb..1f1095b396 100644
--- a/core/fpdfapi/fpdf_parser/include/fpdf_parser_decode.h
+++ b/core/fpdfapi/fpdf_parser/include/fpdf_parser_decode.h
@@ -19,58 +19,58 @@ CFX_ByteString PDF_NameDecode(const CFX_ByteString& orig);
CFX_ByteString PDF_NameEncode(const CFX_ByteString& orig);
CFX_ByteString PDF_EncodeString(const CFX_ByteString& src,
FX_BOOL bHex = FALSE);
-CFX_WideString PDF_DecodeText(const uint8_t* pData, FX_DWORD size);
+CFX_WideString PDF_DecodeText(const uint8_t* pData, uint32_t size);
CFX_WideString PDF_DecodeText(const CFX_ByteString& bstr);
CFX_ByteString PDF_EncodeText(const FX_WCHAR* pString, int len = -1);
CFX_ByteString PDF_EncodeText(const CFX_WideString& str);
void FlateEncode(const uint8_t* src_buf,
- FX_DWORD src_size,
+ uint32_t src_size,
uint8_t*& dest_buf,
- FX_DWORD& dest_size);
+ uint32_t& dest_size);
void FlateEncode(const uint8_t* src_buf,
- FX_DWORD src_size,
+ uint32_t src_size,
int predictor,
int Colors,
int BitsPerComponent,
int Columns,
uint8_t*& dest_buf,
- FX_DWORD& dest_size);
-FX_DWORD FlateDecode(const uint8_t* src_buf,
- FX_DWORD src_size,
+ uint32_t& dest_size);
+uint32_t FlateDecode(const uint8_t* src_buf,
+ uint32_t src_size,
uint8_t*& dest_buf,
- FX_DWORD& dest_size);
-FX_DWORD RunLengthDecode(const uint8_t* src_buf,
- FX_DWORD src_size,
+ uint32_t& dest_size);
+uint32_t RunLengthDecode(const uint8_t* src_buf,
+ uint32_t src_size,
uint8_t*& dest_buf,
- FX_DWORD& dest_size);
+ uint32_t& dest_size);
// Public for testing.
-FX_DWORD A85Decode(const uint8_t* src_buf,
- FX_DWORD src_size,
+uint32_t A85Decode(const uint8_t* src_buf,
+ uint32_t src_size,
uint8_t*& dest_buf,
- FX_DWORD& dest_size);
+ uint32_t& dest_size);
// Public for testing.
-FX_DWORD HexDecode(const uint8_t* src_buf,
- FX_DWORD src_size,
+uint32_t HexDecode(const uint8_t* src_buf,
+ uint32_t src_size,
uint8_t*& dest_buf,
- FX_DWORD& dest_size);
+ uint32_t& dest_size);
// Public for testing.
-FX_DWORD FPDFAPI_FlateOrLZWDecode(FX_BOOL bLZW,
+uint32_t FPDFAPI_FlateOrLZWDecode(FX_BOOL bLZW,
const uint8_t* src_buf,
- FX_DWORD src_size,
+ uint32_t src_size,
CPDF_Dictionary* pParams,
- FX_DWORD estimated_size,
+ uint32_t estimated_size,
uint8_t*& dest_buf,
- FX_DWORD& dest_size);
+ uint32_t& dest_size);
FX_BOOL PDF_DataDecode(const uint8_t* src_buf,
- FX_DWORD src_size,
+ uint32_t src_size,
const CPDF_Dictionary* pDict,
uint8_t*& dest_buf,
- FX_DWORD& dest_size,
+ uint32_t& dest_size,
CFX_ByteString& ImageEncoding,
CPDF_Dictionary*& pImageParms,
- FX_DWORD estimated_size,
+ uint32_t estimated_size,
FX_BOOL bImageAcc);
#endif // CORE_FPDFAPI_FPDF_PARSER_INCLUDE_FPDF_PARSER_DECODE_H_
diff --git a/core/fpdfapi/fpdf_parser/include/ipdf_data_avail.h b/core/fpdfapi/fpdf_parser/include/ipdf_data_avail.h
index d92c06d0cd..e34761ae78 100644
--- a/core/fpdfapi/fpdf_parser/include/ipdf_data_avail.h
+++ b/core/fpdfapi/fpdf_parser/include/ipdf_data_avail.h
@@ -46,13 +46,13 @@ class IPDF_DataAvail {
class FileAvail {
public:
virtual ~FileAvail();
- virtual FX_BOOL IsDataAvail(FX_FILESIZE offset, FX_DWORD size) = 0;
+ virtual FX_BOOL IsDataAvail(FX_FILESIZE offset, uint32_t size) = 0;
};
class DownloadHints {
public:
virtual ~DownloadHints();
- virtual void AddSegment(FX_FILESIZE offset, FX_DWORD size) = 0;
+ virtual void AddSegment(FX_FILESIZE offset, uint32_t size) = 0;
};
static IPDF_DataAvail* Create(FileAvail* pFileAvail, IFX_FileRead* pFileRead);
@@ -68,7 +68,7 @@ class IPDF_DataAvail {
virtual DocFormStatus IsFormAvail(DownloadHints* pHints) = 0;
virtual DocLinearizationStatus IsLinearizedPDF() = 0;
virtual void GetLinearizedMainXRefInfo(FX_FILESIZE* pPos,
- FX_DWORD* pSize) = 0;
+ uint32_t* pSize) = 0;
protected:
IPDF_DataAvail(FileAvail* pFileAvail, IFX_FileRead* pFileRead);