summaryrefslogtreecommitdiff
path: root/core/fpdfdoc
diff options
context:
space:
mode:
Diffstat (limited to 'core/fpdfdoc')
-rw-r--r--core/fpdfdoc/doc_action.cpp12
-rw-r--r--core/fpdfdoc/doc_annot.cpp18
-rw-r--r--core/fpdfdoc/doc_ap.cpp12
-rw-r--r--core/fpdfdoc/doc_basic.cpp12
-rw-r--r--core/fpdfdoc/doc_bookmark.cpp4
-rw-r--r--core/fpdfdoc/doc_form.cpp34
-rw-r--r--core/fpdfdoc/doc_formcontrol.cpp4
-rw-r--r--core/fpdfdoc/doc_formfield.cpp8
-rw-r--r--core/fpdfdoc/doc_link.cpp4
-rw-r--r--core/fpdfdoc/doc_ocg.cpp8
-rw-r--r--core/fpdfdoc/doc_tagged.cpp18
-rw-r--r--core/fpdfdoc/doc_utils.cpp18
-rw-r--r--core/fpdfdoc/doc_utils.h4
-rw-r--r--core/fpdfdoc/doc_vt.cpp10
-rw-r--r--core/fpdfdoc/tagged_int.h2
15 files changed, 84 insertions, 84 deletions
diff --git a/core/fpdfdoc/doc_action.cpp b/core/fpdfdoc/doc_action.cpp
index d0deb19a8c..ce37e1e9c9 100644
--- a/core/fpdfdoc/doc_action.cpp
+++ b/core/fpdfdoc/doc_action.cpp
@@ -100,7 +100,7 @@ CFX_ByteString CPDF_Action::GetURI(CPDF_Document* pDoc) const {
}
return csURI;
}
-FX_DWORD CPDF_ActionFields::GetFieldsCount() const {
+uint32_t CPDF_ActionFields::GetFieldsCount() const {
if (!m_pAction) {
return 0;
}
@@ -147,8 +147,8 @@ std::vector<CPDF_Object*> CPDF_ActionFields::GetAllFields() const {
if (pFields->IsDictionary() || pFields->IsString()) {
fields.push_back(pFields);
} else if (CPDF_Array* pArray = pFields->AsArray()) {
- FX_DWORD iCount = pArray->GetCount();
- for (FX_DWORD i = 0; i < iCount; ++i) {
+ uint32_t iCount = pArray->GetCount();
+ for (uint32_t i = 0; i < iCount; ++i) {
CPDF_Object* pObj = pArray->GetElementValue(i);
if (pObj) {
fields.push_back(pObj);
@@ -158,7 +158,7 @@ std::vector<CPDF_Object*> CPDF_ActionFields::GetAllFields() const {
return fields;
}
-CPDF_Object* CPDF_ActionFields::GetField(FX_DWORD iIndex) const {
+CPDF_Object* CPDF_ActionFields::GetField(uint32_t iIndex) const {
if (!m_pAction) {
return NULL;
}
@@ -232,7 +232,7 @@ int32_t CPDF_Action::GetOperationType() const {
}
return 0;
}
-FX_DWORD CPDF_Action::GetSubActionsCount() const {
+uint32_t CPDF_Action::GetSubActionsCount() const {
if (!m_pDict || !m_pDict->KeyExist("Next"))
return 0;
@@ -245,7 +245,7 @@ FX_DWORD CPDF_Action::GetSubActionsCount() const {
return pArray->GetCount();
return 0;
}
-CPDF_Action CPDF_Action::GetSubAction(FX_DWORD iIndex) const {
+CPDF_Action CPDF_Action::GetSubAction(uint32_t iIndex) const {
if (!m_pDict || !m_pDict->KeyExist("Next")) {
return CPDF_Action();
}
diff --git a/core/fpdfdoc/doc_annot.cpp b/core/fpdfdoc/doc_annot.cpp
index 9a407482f1..e6e441f237 100644
--- a/core/fpdfdoc/doc_annot.cpp
+++ b/core/fpdfdoc/doc_annot.cpp
@@ -28,12 +28,12 @@ CPDF_AnnotList::CPDF_AnnotList(CPDF_Page* pPage)
CPDF_Dictionary* pAcroForm = pRoot->GetDictBy("AcroForm");
FX_BOOL bRegenerateAP =
pAcroForm && pAcroForm->GetBooleanBy("NeedAppearances");
- for (FX_DWORD i = 0; i < pAnnots->GetCount(); ++i) {
+ for (uint32_t i = 0; i < pAnnots->GetCount(); ++i) {
CPDF_Dictionary* pDict = ToDictionary(pAnnots->GetElementValue(i));
if (!pDict)
continue;
- FX_DWORD dwObjNum = pDict->GetObjNum();
+ uint32_t dwObjNum = pDict->GetObjNum();
if (dwObjNum == 0) {
dwObjNum = m_pDocument->AddIndirectObject(pDict);
CPDF_Reference* pAction = new CPDF_Reference(m_pDocument, dwObjNum);
@@ -67,7 +67,7 @@ void CPDF_AnnotList::DisplayPass(CPDF_Page* pPage,
if ((bWidgetPass && !bWidget) || (!bWidgetPass && bWidget))
continue;
- FX_DWORD annot_flags = pAnnot->GetFlags();
+ uint32_t annot_flags = pAnnot->GetFlags();
if (annot_flags & ANNOTFLAG_HIDDEN)
continue;
@@ -110,7 +110,7 @@ void CPDF_AnnotList::DisplayAnnots(CPDF_Page* pPage,
CPDF_RenderContext* pContext,
FX_BOOL bPrinting,
CFX_Matrix* pUser2Device,
- FX_DWORD dwAnnotFlags,
+ uint32_t dwAnnotFlags,
CPDF_RenderOptions* pOptions,
FX_RECT* pClipRect) {
if (dwAnnotFlags & 0x01) {
@@ -148,7 +148,7 @@ void CPDF_Annot::GetRect(CFX_FloatRect& rect) const {
rect.Normalize();
}
-FX_DWORD CPDF_Annot::GetFlags() const {
+uint32_t CPDF_Annot::GetFlags() const {
return m_pAnnotDict->GetIntegerBy("F");
}
@@ -259,7 +259,7 @@ void CPDF_Annot::DrawBorder(CFX_RenderDevice* pDevice,
if (GetSubType() == "Popup") {
return;
}
- FX_DWORD annot_flags = GetFlags();
+ uint32_t annot_flags = GetFlags();
if (annot_flags & ANNOTFLAG_HIDDEN) {
return;
}
@@ -311,7 +311,7 @@ void CPDF_Annot::DrawBorder(CFX_RenderDevice* pDevice,
return;
}
CPDF_Array* pColor = m_pAnnotDict->GetArrayBy("C");
- FX_DWORD argb = 0xff000000;
+ uint32_t argb = 0xff000000;
if (pColor) {
int R = (int32_t)(pColor->GetNumberAt(0) * 255);
int G = (int32_t)(pColor->GetNumberAt(1) * 255);
@@ -322,13 +322,13 @@ void CPDF_Annot::DrawBorder(CFX_RenderDevice* pDevice,
graph_state.m_LineWidth = width;
if (style_char == 'D') {
if (pDashArray) {
- FX_DWORD dash_count = pDashArray->GetCount();
+ uint32_t dash_count = pDashArray->GetCount();
if (dash_count % 2) {
dash_count++;
}
graph_state.m_DashArray = FX_Alloc(FX_FLOAT, dash_count);
graph_state.m_DashCount = dash_count;
- FX_DWORD i;
+ uint32_t i;
for (i = 0; i < pDashArray->GetCount(); ++i) {
graph_state.m_DashArray[i] = pDashArray->GetNumberAt(i);
}
diff --git a/core/fpdfdoc/doc_ap.cpp b/core/fpdfdoc/doc_ap.cpp
index 06e9da8c41..87edcd9836 100644
--- a/core/fpdfdoc/doc_ap.cpp
+++ b/core/fpdfdoc/doc_ap.cpp
@@ -26,7 +26,7 @@ FX_BOOL FPDF_GenerateAP(CPDF_Document* pDoc, CPDF_Dictionary* pAnnotDict) {
return FALSE;
}
CFX_ByteString field_type = FPDF_GetFieldAttr(pAnnotDict, "FT")->GetString();
- FX_DWORD flags = FPDF_GetFieldAttr(pAnnotDict, "Ff")
+ uint32_t flags = FPDF_GetFieldAttr(pAnnotDict, "Ff")
? FPDF_GetFieldAttr(pAnnotDict, "Ff")->GetInteger()
: 0;
if (field_type == "Tx") {
@@ -141,7 +141,7 @@ int32_t CPVT_Provider::GetCharWidth(int32_t nFontIndex,
uint16_t word,
int32_t nWordStyle) {
if (CPDF_Font* pPDFFont = m_pFontMap->GetPDFFont(nFontIndex)) {
- FX_DWORD charcode = pPDFFont->CharCodeFromUnicode(word);
+ uint32_t charcode = pPDFFont->CharCodeFromUnicode(word);
if (charcode != CPDF_Font::kInvalidCharCode) {
return pPDFFont->GetCharWidthF(charcode);
}
@@ -204,7 +204,7 @@ static CFX_ByteString GetPDFWordString(IPVT_FontMap* pFontMap,
pPDFFont->GetBaseFont().Compare("ZapfDingbats") == 0) {
sWord.Format("%c", Word);
} else {
- FX_DWORD dwCharCode = pPDFFont->CharCodeFromUnicode(Word);
+ uint32_t dwCharCode = pPDFFont->CharCodeFromUnicode(Word);
if (dwCharCode != CPDF_Font::kInvalidCharCode) {
pPDFFont->AppendChar(sWord, dwCharCode);
}
@@ -462,10 +462,10 @@ static FX_BOOL GenerateWidgetAP(CPDF_Document* pDoc,
int32_t nAlign = FPDF_GetFieldAttr(pAnnotDict, "Q")
? FPDF_GetFieldAttr(pAnnotDict, "Q")->GetInteger()
: 0;
- FX_DWORD dwFlags = FPDF_GetFieldAttr(pAnnotDict, "Ff")
+ uint32_t dwFlags = FPDF_GetFieldAttr(pAnnotDict, "Ff")
? FPDF_GetFieldAttr(pAnnotDict, "Ff")->GetInteger()
: 0;
- FX_DWORD dwMaxLen =
+ uint32_t dwMaxLen =
FPDF_GetFieldAttr(pAnnotDict, "MaxLen")
? FPDF_GetFieldAttr(pAnnotDict, "MaxLen")->GetInteger()
: 0;
@@ -625,7 +625,7 @@ static FX_BOOL GenerateWidgetAP(CPDF_Document* pDoc,
FX_BOOL bSelected = FALSE;
if (pSels) {
- for (FX_DWORD s = 0, ssz = pSels->GetCount(); s < ssz; s++) {
+ for (uint32_t s = 0, ssz = pSels->GetCount(); s < ssz; s++) {
if (i == pSels->GetIntegerAt(s)) {
bSelected = TRUE;
break;
diff --git a/core/fpdfdoc/doc_basic.cpp b/core/fpdfdoc/doc_basic.cpp
index cd2afab408..08d07e6c66 100644
--- a/core/fpdfdoc/doc_basic.cpp
+++ b/core/fpdfdoc/doc_basic.cpp
@@ -31,7 +31,7 @@ int CPDF_Dest::GetPageIndex(CPDF_Document* pDoc) {
return 0;
return pDoc->GetPageIndex(pPage->GetObjNum());
}
-FX_DWORD CPDF_Dest::GetPageObjNum() {
+uint32_t CPDF_Dest::GetPageObjNum() {
CPDF_Array* pArray = ToArray(m_pObj);
if (!pArray)
return 0;
@@ -101,8 +101,8 @@ static CPDF_Object* SearchNameNode(CPDF_Dictionary* pNode,
}
CPDF_Array* pNames = pNode->GetArrayBy("Names");
if (pNames) {
- FX_DWORD dwCount = pNames->GetCount() / 2;
- for (FX_DWORD i = 0; i < dwCount; i++) {
+ uint32_t dwCount = pNames->GetCount() / 2;
+ for (uint32_t i = 0; i < dwCount; i++) {
CFX_ByteString csValue = pNames->GetStringAt(i * 2);
int32_t iCompare = csValue.Compare(csName);
if (iCompare <= 0) {
@@ -125,7 +125,7 @@ static CPDF_Object* SearchNameNode(CPDF_Dictionary* pNode,
if (!pKids) {
return NULL;
}
- for (FX_DWORD i = 0; i < pKids->GetCount(); i++) {
+ for (uint32_t i = 0; i < pKids->GetCount(); i++) {
CPDF_Dictionary* pKid = pKids->GetDictAt(i);
if (!pKid) {
continue;
@@ -164,7 +164,7 @@ static CPDF_Object* SearchNameNode(CPDF_Dictionary* pNode,
if (!pKids) {
return NULL;
}
- for (FX_DWORD i = 0; i < pKids->GetCount(); i++) {
+ for (uint32_t i = 0; i < pKids->GetCount(); i++) {
CPDF_Dictionary* pKid = pKids->GetDictAt(i);
if (!pKid) {
continue;
@@ -190,7 +190,7 @@ static int CountNames(CPDF_Dictionary* pNode, int nLevel = 0) {
return 0;
}
int nCount = 0;
- for (FX_DWORD i = 0; i < pKids->GetCount(); i++) {
+ for (uint32_t i = 0; i < pKids->GetCount(); i++) {
CPDF_Dictionary* pKid = pKids->GetDictAt(i);
if (!pKid) {
continue;
diff --git a/core/fpdfdoc/doc_bookmark.cpp b/core/fpdfdoc/doc_bookmark.cpp
index 6acd247df8..0ad7b5b70d 100644
--- a/core/fpdfdoc/doc_bookmark.cpp
+++ b/core/fpdfdoc/doc_bookmark.cpp
@@ -32,7 +32,7 @@ CPDF_Bookmark CPDF_BookmarkTree::GetNextSibling(
return pNext == bookmark.GetDict() ? CPDF_Bookmark() : CPDF_Bookmark(pNext);
}
-FX_DWORD CPDF_Bookmark::GetColorRef() const {
+uint32_t CPDF_Bookmark::GetColorRef() const {
if (!m_pDict) {
return 0;
}
@@ -45,7 +45,7 @@ FX_DWORD CPDF_Bookmark::GetColorRef() const {
int b = FXSYS_round(pColor->GetNumberAt(2) * 255);
return FXSYS_RGB(r, g, b);
}
-FX_DWORD CPDF_Bookmark::GetFontStyle() const {
+uint32_t CPDF_Bookmark::GetFontStyle() const {
if (!m_pDict) {
return 0;
}
diff --git a/core/fpdfdoc/doc_form.cpp b/core/fpdfdoc/doc_form.cpp
index eb70e2b38a..7642fac6bf 100644
--- a/core/fpdfdoc/doc_form.cpp
+++ b/core/fpdfdoc/doc_form.cpp
@@ -570,8 +570,8 @@ FX_BOOL CPDF_InterForm::ValidateFieldName(
break;
}
}
- FX_DWORD dwCount = m_pFieldTree->m_Root.CountFields();
- for (FX_DWORD m = 0; m < dwCount; m++) {
+ uint32_t dwCount = m_pFieldTree->m_Root.CountFields();
+ for (uint32_t m = 0; m < dwCount; m++) {
CPDF_FormField* pField = m_pFieldTree->m_Root.GetField(m);
if (!pField) {
continue;
@@ -669,14 +669,14 @@ int CPDF_InterForm::CompareFieldName(const CFX_WideString& name1,
}
return 0;
}
-FX_DWORD CPDF_InterForm::CountFields(const CFX_WideString& csFieldName) {
+uint32_t CPDF_InterForm::CountFields(const CFX_WideString& csFieldName) {
if (csFieldName.IsEmpty()) {
- return (FX_DWORD)m_pFieldTree->m_Root.CountFields();
+ return (uint32_t)m_pFieldTree->m_Root.CountFields();
}
CFieldTree::_Node* pNode = m_pFieldTree->FindNode(csFieldName);
return pNode ? pNode->CountFields() : 0;
}
-CPDF_FormField* CPDF_InterForm::GetField(FX_DWORD index,
+CPDF_FormField* CPDF_InterForm::GetField(uint32_t index,
const CFX_WideString& csFieldName) {
if (csFieldName == L"") {
return m_pFieldTree->m_Root.GetField(index);
@@ -702,8 +702,8 @@ CPDF_FormControl* CPDF_InterForm::GetControlAtPoint(CPDF_Page* pPage,
if (!pAnnotList)
return nullptr;
- for (FX_DWORD i = pAnnotList->GetCount(); i > 0; --i) {
- FX_DWORD annot_index = i - 1;
+ for (uint32_t i = pAnnotList->GetCount(); i > 0; --i) {
+ uint32_t annot_index = i - 1;
CPDF_Dictionary* pAnnot = pAnnotList->GetDictAt(annot_index);
if (!pAnnot)
continue;
@@ -769,7 +769,7 @@ int CPDF_InterForm::FindFieldInCalculationOrder(const CPDF_FormField* pField) {
if (!pArray) {
return -1;
}
- for (FX_DWORD i = 0; i < pArray->GetCount(); i++) {
+ for (uint32_t i = 0; i < pArray->GetCount(); i++) {
CPDF_Object* pElement = pArray->GetElementValue(i);
if (pElement == pField->m_pDict) {
return i;
@@ -777,10 +777,10 @@ int CPDF_InterForm::FindFieldInCalculationOrder(const CPDF_FormField* pField) {
}
return -1;
}
-FX_DWORD CPDF_InterForm::CountFormFonts() {
+uint32_t CPDF_InterForm::CountFormFonts() {
return CountInterFormFonts(m_pFormDict);
}
-CPDF_Font* CPDF_InterForm::GetFormFont(FX_DWORD index,
+CPDF_Font* CPDF_InterForm::GetFormFont(uint32_t index,
CFX_ByteString& csNameTag) {
return GetInterFormFont(m_pFormDict, m_pDocument, index, csNameTag);
}
@@ -888,7 +888,7 @@ void CPDF_InterForm::LoadField(CPDF_Dictionary* pFieldDict, int nLevel) {
if (!pFieldDict) {
return;
}
- FX_DWORD dwParentObjNum = pFieldDict->GetObjNum();
+ uint32_t dwParentObjNum = pFieldDict->GetObjNum();
CPDF_Array* pKids = pFieldDict->GetArrayBy("Kids");
if (!pKids) {
AddTerminalField(pFieldDict);
@@ -899,7 +899,7 @@ void CPDF_InterForm::LoadField(CPDF_Dictionary* pFieldDict, int nLevel) {
return;
}
if (pFirstKid->KeyExist("T") || pFirstKid->KeyExist("Kids")) {
- for (FX_DWORD i = 0; i < pKids->GetCount(); i++) {
+ for (uint32_t i = 0; i < pKids->GetCount(); i++) {
CPDF_Dictionary* pChildDict = pKids->GetDictAt(i);
if (pChildDict) {
if (pChildDict->GetObjNum() != dwParentObjNum) {
@@ -982,7 +982,7 @@ CPDF_FormField* CPDF_InterForm::AddTerminalField(CPDF_Dictionary* pFieldDict) {
AddControl(pField, pFieldDict);
}
} else {
- for (FX_DWORD i = 0; i < pKids->GetCount(); i++) {
+ for (uint32_t i = 0; i < pKids->GetCount(); i++) {
CPDF_Dictionary* pKid = pKids->GetDictAt(i);
if (!pKid) {
continue;
@@ -1022,7 +1022,7 @@ CPDF_FormField* CPDF_InterForm::CheckRequiredFields(
iType == CPDF_FormField::CheckBox || iType == CPDF_FormField::ListBox) {
continue;
}
- FX_DWORD dwFlags = pField->GetFieldFlags();
+ uint32_t dwFlags = pField->GetFieldFlags();
// TODO(thestig): Look up these magic numbers and add constants for them.
if (dwFlags & 0x04)
continue;
@@ -1078,7 +1078,7 @@ CFDF_Document* CPDF_InterForm::ExportToFDF(
if (!pField || pField->GetType() == CPDF_FormField::PushButton) {
continue;
}
- FX_DWORD dwFlags = pField->GetFieldFlags();
+ uint32_t dwFlags = pField->GetFieldFlags();
if (dwFlags & 0x04)
continue;
@@ -1120,7 +1120,7 @@ void CPDF_InterForm::FDF_ImportField(CPDF_Dictionary* pFieldDict,
name += pFieldDict->GetUnicodeTextBy("T");
CPDF_Array* pKids = pFieldDict->GetArrayBy("Kids");
if (pKids) {
- for (FX_DWORD i = 0; i < pKids->GetCount(); i++) {
+ for (uint32_t i = 0; i < pKids->GetCount(); i++) {
CPDF_Dictionary* pKid = pKids->GetDictAt(i);
if (!pKid) {
continue;
@@ -1192,7 +1192,7 @@ FX_BOOL CPDF_InterForm::ImportFromFDF(const CFDF_Document* pFDF,
return FALSE;
}
}
- for (FX_DWORD i = 0; i < pFields->GetCount(); i++) {
+ for (uint32_t i = 0; i < pFields->GetCount(); i++) {
CPDF_Dictionary* pField = pFields->GetDictAt(i);
if (!pField) {
continue;
diff --git a/core/fpdfdoc/doc_formcontrol.cpp b/core/fpdfdoc/doc_formcontrol.cpp
index 425c3a1ac3..255b5e9a70 100644
--- a/core/fpdfdoc/doc_formcontrol.cpp
+++ b/core/fpdfdoc/doc_formcontrol.cpp
@@ -349,7 +349,7 @@ FX_ARGB CPDF_ApSettings::GetColor(int& iColorType,
return 0;
FX_ARGB color = 0;
- FX_DWORD dwCount = pEntry->GetCount();
+ uint32_t dwCount = pEntry->GetCount();
if (dwCount == 1) {
iColorType = COLORTYPE_GRAY;
FX_FLOAT g = pEntry->GetNumberAt(0) * 255;
@@ -398,7 +398,7 @@ void CPDF_ApSettings::GetOriginalColor(int& iColorType,
if (!pEntry) {
return;
}
- FX_DWORD dwCount = pEntry->GetCount();
+ uint32_t dwCount = pEntry->GetCount();
if (dwCount == 1) {
iColorType = COLORTYPE_GRAY;
fc[0] = pEntry->GetNumberAt(0);
diff --git a/core/fpdfdoc/doc_formfield.cpp b/core/fpdfdoc/doc_formfield.cpp
index 6c3afad1ee..88d35d8a11 100644
--- a/core/fpdfdoc/doc_formfield.cpp
+++ b/core/fpdfdoc/doc_formfield.cpp
@@ -18,7 +18,7 @@ FX_BOOL PDF_FormField_IsUnison(CPDF_FormField* pField) {
if (pField->GetType() == CPDF_FormField::CheckBox) {
bUnison = TRUE;
} else {
- FX_DWORD dwFlags = pField->GetFieldFlags();
+ uint32_t dwFlags = pField->GetFieldFlags();
bUnison = ((dwFlags & 0x2000000) != 0);
}
return bUnison;
@@ -36,7 +36,7 @@ void CPDF_FormField::SyncFieldFlags() {
CFX_ByteString type_name = FPDF_GetFieldAttr(m_pDict, "FT")
? FPDF_GetFieldAttr(m_pDict, "FT")->GetString()
: CFX_ByteString();
- FX_DWORD flags = FPDF_GetFieldAttr(m_pDict, "Ff")
+ uint32_t flags = FPDF_GetFieldAttr(m_pDict, "Ff")
? FPDF_GetFieldAttr(m_pDict, "Ff")->GetInteger()
: 0;
m_Flags = 0;
@@ -261,7 +261,7 @@ CFX_WideString CPDF_FormField::GetMappingName() {
}
return pObj->GetUnicodeText();
}
-FX_DWORD CPDF_FormField::GetFieldFlags() {
+uint32_t CPDF_FormField::GetFieldFlags() {
CPDF_Object* pObj = FPDF_GetFieldAttr(m_pDict, "Ff");
if (!pObj) {
return 0;
@@ -537,7 +537,7 @@ FX_BOOL CPDF_FormField::IsItemSelected(int index) {
break;
}
}
- for (FX_DWORD i = 0; i < pArray->GetCount(); i++)
+ for (uint32_t i = 0; i < pArray->GetCount(); i++)
if (pArray->GetElementValue(i)->GetUnicodeText() == opt_value &&
(int)i == iPos) {
return TRUE;
diff --git a/core/fpdfdoc/doc_link.cpp b/core/fpdfdoc/doc_link.cpp
index b1a6a732ff..3f97024237 100644
--- a/core/fpdfdoc/doc_link.cpp
+++ b/core/fpdfdoc/doc_link.cpp
@@ -17,7 +17,7 @@ CPDF_LinkList::~CPDF_LinkList() {}
const std::vector<CPDF_Dictionary*>* CPDF_LinkList::GetPageLinks(
CPDF_Page* pPage) {
- FX_DWORD objnum = pPage->m_pFormDict->GetObjNum();
+ uint32_t objnum = pPage->m_pFormDict->GetObjNum();
if (objnum == 0)
return nullptr;
@@ -63,7 +63,7 @@ void CPDF_LinkList::LoadPageLinks(CPDF_Page* pPage,
if (!pAnnotList)
return;
- for (FX_DWORD i = 0; i < pAnnotList->GetCount(); ++i) {
+ for (uint32_t i = 0; i < pAnnotList->GetCount(); ++i) {
CPDF_Dictionary* pAnnot = pAnnotList->GetDictAt(i);
bool add_link = (pAnnot && pAnnot->GetStringBy("Subtype") == "Link");
// Add non-links as nullptrs to preserve z-order.
diff --git a/core/fpdfdoc/doc_ocg.cpp b/core/fpdfdoc/doc_ocg.cpp
index 8148b31a56..43ccc3fd8d 100644
--- a/core/fpdfdoc/doc_ocg.cpp
+++ b/core/fpdfdoc/doc_ocg.cpp
@@ -14,8 +14,8 @@ static int32_t FPDFDOC_OCG_FindGroup(const CPDF_Object* pObject,
return -1;
if (const CPDF_Array* pArray = pObject->AsArray()) {
- FX_DWORD dwCount = pArray->GetCount();
- for (FX_DWORD i = 0; i < dwCount; i++) {
+ uint32_t dwCount = pArray->GetCount();
+ for (uint32_t i = 0; i < dwCount; i++) {
if (pArray->GetDictAt(i) == pGroupDict)
return i;
}
@@ -32,8 +32,8 @@ static FX_BOOL FPDFDOC_OCG_HasIntent(const CPDF_Dictionary* pDict,
}
CFX_ByteString bsIntent;
if (CPDF_Array* pArray = pIntent->AsArray()) {
- FX_DWORD dwCount = pArray->GetCount();
- for (FX_DWORD i = 0; i < dwCount; i++) {
+ uint32_t dwCount = pArray->GetCount();
+ for (uint32_t i = 0; i < dwCount; i++) {
bsIntent = pArray->GetStringAt(i);
if (bsIntent == "All" || bsIntent == csElement)
return TRUE;
diff --git a/core/fpdfdoc/doc_tagged.cpp b/core/fpdfdoc/doc_tagged.cpp
index 1664aff761..868031401d 100644
--- a/core/fpdfdoc/doc_tagged.cpp
+++ b/core/fpdfdoc/doc_tagged.cpp
@@ -70,7 +70,7 @@ void CPDF_StructTreeImpl::LoadDocTree() {
if (!pArray)
return;
- for (FX_DWORD i = 0; i < pArray->GetCount(); i++) {
+ for (uint32_t i = 0; i < pArray->GetCount(); i++) {
CPDF_Dictionary* pKid = pArray->GetDictAt(i);
CPDF_StructElementImpl* pStructElementImpl =
new CPDF_StructElementImpl(this, nullptr, pKid);
@@ -86,7 +86,7 @@ void CPDF_StructTreeImpl::LoadPageTree(const CPDF_Dictionary* pPageDict) {
if (!pKids)
return;
- FX_DWORD dwKids = 0;
+ uint32_t dwKids = 0;
if (pKids->IsDictionary())
dwKids = 1;
else if (CPDF_Array* pArray = pKids->AsArray())
@@ -94,7 +94,7 @@ void CPDF_StructTreeImpl::LoadPageTree(const CPDF_Dictionary* pPageDict) {
else
return;
- FX_DWORD i;
+ uint32_t i;
m_Kids.SetSize(dwKids);
for (i = 0; i < dwKids; i++) {
m_Kids[i] = NULL;
@@ -178,7 +178,7 @@ FX_BOOL CPDF_StructTreeImpl::AddTopLevelNode(CPDF_Dictionary* pDict,
}
}
if (CPDF_Array* pTopKids = pObj->AsArray()) {
- FX_DWORD i;
+ uint32_t i;
FX_BOOL bSave = FALSE;
for (i = 0; i < pTopKids->GetCount(); i++) {
CPDF_Reference* pKidRef = ToReference(pTopKids->GetElement(i));
@@ -232,7 +232,7 @@ void CPDF_StructElementImpl::Release() {
}
void CPDF_StructElementImpl::LoadKids(CPDF_Dictionary* pDict) {
CPDF_Object* pObj = pDict->GetElement("Pg");
- FX_DWORD PageObjNum = 0;
+ uint32_t PageObjNum = 0;
if (CPDF_Reference* pRef = ToReference(pObj))
PageObjNum = pRef->GetRefObjNum();
@@ -242,7 +242,7 @@ void CPDF_StructElementImpl::LoadKids(CPDF_Dictionary* pDict) {
if (CPDF_Array* pArray = pKids->AsArray()) {
m_Kids.SetSize(pArray->GetCount());
- for (FX_DWORD i = 0; i < pArray->GetCount(); i++) {
+ for (uint32_t i = 0; i < pArray->GetCount(); i++) {
CPDF_Object* pKid = pArray->GetElementValue(i);
LoadKid(PageObjNum, pKid, &m_Kids[i]);
}
@@ -251,7 +251,7 @@ void CPDF_StructElementImpl::LoadKids(CPDF_Dictionary* pDict) {
LoadKid(PageObjNum, pKids, &m_Kids[0]);
}
}
-void CPDF_StructElementImpl::LoadKid(FX_DWORD PageObjNum,
+void CPDF_StructElementImpl::LoadKid(uint32_t PageObjNum,
CPDF_Object* pKidObj,
CPDF_StructKid* pKid) {
pKid->m_Type = CPDF_StructKid::Invalid;
@@ -324,7 +324,7 @@ static CPDF_Dictionary* FindAttrDict(CPDF_Object* pAttrs,
} else if (CPDF_Stream* pStream = pAttrs->AsStream()) {
pDict = pStream->GetDict();
} else if (CPDF_Array* pArray = pAttrs->AsArray()) {
- for (FX_DWORD i = 0; i < pArray->GetCount(); i++) {
+ for (uint32_t i = 0; i < pArray->GetCount(); i++) {
CPDF_Object* pElement = pArray->GetElementValue(i);
pDict = FindAttrDict(pElement, owner, nLevel + 1);
if (pDict)
@@ -371,7 +371,7 @@ CPDF_Object* CPDF_StructElementImpl::GetAttr(const CFX_ByteStringC& owner,
return nullptr;
if (CPDF_Array* pArray = pC->AsArray()) {
- for (FX_DWORD i = 0; i < pArray->GetCount(); i++) {
+ for (uint32_t i = 0; i < pArray->GetCount(); i++) {
CFX_ByteString class_name = pArray->GetStringAt(i);
CPDF_Dictionary* pClassDict = pClassMap->GetDictBy(class_name);
if (pClassDict && pClassDict->GetStringBy("O") == owner)
diff --git a/core/fpdfdoc/doc_utils.cpp b/core/fpdfdoc/doc_utils.cpp
index 8659a621b2..e2e3e13e8c 100644
--- a/core/fpdfdoc/doc_utils.cpp
+++ b/core/fpdfdoc/doc_utils.cpp
@@ -27,8 +27,8 @@ CPDF_Object* SearchNumberNode(const CPDF_Dictionary* pNode, int num) {
}
CPDF_Array* pNumbers = pNode->GetArrayBy("Nums");
if (pNumbers) {
- FX_DWORD dwCount = pNumbers->GetCount() / 2;
- for (FX_DWORD i = 0; i < dwCount; i++) {
+ uint32_t dwCount = pNumbers->GetCount() / 2;
+ for (uint32_t i = 0; i < dwCount; i++) {
int index = pNumbers->GetIntegerAt(i * 2);
if (num == index) {
return pNumbers->GetElementValue(i * 2 + 1);
@@ -43,7 +43,7 @@ CPDF_Object* SearchNumberNode(const CPDF_Dictionary* pNode, int num) {
if (!pKids) {
return NULL;
}
- for (FX_DWORD i = 0; i < pKids->GetCount(); i++) {
+ for (uint32_t i = 0; i < pKids->GetCount(); i++) {
CPDF_Dictionary* pKid = pKids->GetDictAt(i);
if (!pKid) {
continue;
@@ -274,7 +274,7 @@ void InitInterFormDict(CPDF_Dictionary*& pFormDict, CPDF_Document* pDocument) {
}
if (!pFormDict) {
pFormDict = new CPDF_Dictionary;
- FX_DWORD dwObjNum = pDocument->AddIndirectObject(pFormDict);
+ uint32_t dwObjNum = pDocument->AddIndirectObject(pFormDict);
CPDF_Dictionary* pRoot = pDocument->GetRoot();
pRoot->SetAtReference("AcroForm", pDocument, dwObjNum);
}
@@ -311,7 +311,7 @@ void InitInterFormDict(CPDF_Dictionary*& pFormDict, CPDF_Document* pDocument) {
pFormDict->SetAtString("DA", csDA);
}
}
-FX_DWORD CountInterFormFonts(CPDF_Dictionary* pFormDict) {
+uint32_t CountInterFormFonts(CPDF_Dictionary* pFormDict) {
if (!pFormDict) {
return 0;
}
@@ -323,7 +323,7 @@ FX_DWORD CountInterFormFonts(CPDF_Dictionary* pFormDict) {
if (!pFonts) {
return 0;
}
- FX_DWORD dwCount = 0;
+ uint32_t dwCount = 0;
for (const auto& it : *pFonts) {
CPDF_Object* pObj = it.second;
if (!pObj) {
@@ -339,7 +339,7 @@ FX_DWORD CountInterFormFonts(CPDF_Dictionary* pFormDict) {
}
CPDF_Font* GetInterFormFont(CPDF_Dictionary* pFormDict,
CPDF_Document* pDocument,
- FX_DWORD index,
+ uint32_t index,
CFX_ByteString& csNameTag) {
if (!pFormDict) {
return NULL;
@@ -352,7 +352,7 @@ CPDF_Font* GetInterFormFont(CPDF_Dictionary* pFormDict,
if (!pFonts) {
return NULL;
}
- FX_DWORD dwCount = 0;
+ uint32_t dwCount = 0;
for (const auto& it : *pFonts) {
const CFX_ByteString& csKey = it.first;
CPDF_Object* pObj = it.second;
@@ -708,7 +708,7 @@ void CPDF_IconFit::GetIconPosition(FX_FLOAT& fLeft, FX_FLOAT& fBottom) {
}
CPDF_Array* pA = m_pDict->GetArrayBy("A");
if (pA) {
- FX_DWORD dwCount = pA->GetCount();
+ uint32_t dwCount = pA->GetCount();
if (dwCount > 0) {
fLeft = pA->GetNumberAt(0);
}
diff --git a/core/fpdfdoc/doc_utils.h b/core/fpdfdoc/doc_utils.h
index e9a11e075f..35b7d2d598 100644
--- a/core/fpdfdoc/doc_utils.h
+++ b/core/fpdfdoc/doc_utils.h
@@ -25,10 +25,10 @@ class CPDF_NumberTree {
CFX_WideString GetFullName(CPDF_Dictionary* pFieldDict);
void InitInterFormDict(CPDF_Dictionary*& pFormDict, CPDF_Document* pDocument);
-FX_DWORD CountInterFormFonts(CPDF_Dictionary* pFormDict);
+uint32_t CountInterFormFonts(CPDF_Dictionary* pFormDict);
CPDF_Font* GetInterFormFont(CPDF_Dictionary* pFormDict,
CPDF_Document* pDocument,
- FX_DWORD index,
+ uint32_t index,
CFX_ByteString& csNameTag);
CPDF_Font* GetInterFormFont(CPDF_Dictionary* pFormDict,
CPDF_Document* pDocument,
diff --git a/core/fpdfdoc/doc_vt.cpp b/core/fpdfdoc/doc_vt.cpp
index 5ccba85b72..028a2204c5 100644
--- a/core/fpdfdoc/doc_vt.cpp
+++ b/core/fpdfdoc/doc_vt.cpp
@@ -423,11 +423,11 @@ static bool IsLatin(uint16_t word) {
(word >= 0xFF41 && word <= 0xFF5A));
}
-static bool IsDigit(FX_DWORD word) {
+static bool IsDigit(uint32_t word) {
return word >= 0x0030 && word <= 0x0039;
}
-static bool IsCJK(FX_DWORD word) {
+static bool IsCJK(uint32_t word) {
if ((word >= 0x1100 && word <= 0x11FF) ||
(word >= 0x2E80 && word <= 0x2FFF) ||
(word >= 0x3040 && word <= 0x9FBF) ||
@@ -448,7 +448,7 @@ static bool IsCJK(FX_DWORD word) {
return word >= 0xFF66 && word <= 0xFF9D;
}
-static bool IsPunctuation(FX_DWORD word) {
+static bool IsPunctuation(uint32_t word) {
if (word <= 0x007F)
return !!(special_chars[word] & 0x08);
@@ -495,11 +495,11 @@ static bool IsPunctuation(FX_DWORD word) {
return false;
}
-static bool IsConnectiveSymbol(FX_DWORD word) {
+static bool IsConnectiveSymbol(uint32_t word) {
return word <= 0x007F && (special_chars[word] & 0x20);
}
-static bool IsOpenStylePunctuation(FX_DWORD word) {
+static bool IsOpenStylePunctuation(uint32_t word) {
if (word <= 0x007F)
return !!(special_chars[word] & 0x04);
diff --git a/core/fpdfdoc/tagged_int.h b/core/fpdfdoc/tagged_int.h
index e930f613b1..4877069bf6 100644
--- a/core/fpdfdoc/tagged_int.h
+++ b/core/fpdfdoc/tagged_int.h
@@ -82,7 +82,7 @@ class CPDF_StructElementImpl final : public CPDF_StructElement {
int subindex = -1) override;
void LoadKids(CPDF_Dictionary* pDict);
- void LoadKid(FX_DWORD PageObjNum, CPDF_Object* pObj, CPDF_StructKid* pKid);
+ void LoadKid(uint32_t PageObjNum, CPDF_Object* pObj, CPDF_StructKid* pKid);
CPDF_Object* GetAttr(const CFX_ByteStringC& owner,
const CFX_ByteStringC& name,
FX_BOOL bInheritable,