summaryrefslogtreecommitdiff
path: root/fpdfsdk/src/formfiller
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2015-06-09 11:30:25 -0700
committerTom Sepez <tsepez@chromium.org>2015-06-09 11:30:25 -0700
commitbb17868d736f698d5217c30d52c5bbfed62c5936 (patch)
tree9d4d3e2538a81e6241d4992570bc3f3c1af71d28 /fpdfsdk/src/formfiller
parentbf6c2a4873f8cc12ad910fb904218a78087a3735 (diff)
downloadpdfium-bb17868d736f698d5217c30d52c5bbfed62c5936.tar.xz
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
Diffstat (limited to 'fpdfsdk/src/formfiller')
-rw-r--r--fpdfsdk/src/formfiller/FFL_CBA_Fontmap.cpp12
-rw-r--r--fpdfsdk/src/formfiller/FFL_CheckBox.cpp2
-rw-r--r--fpdfsdk/src/formfiller/FFL_ComboBox.cpp8
-rw-r--r--fpdfsdk/src/formfiller/FFL_FormFiller.cpp6
-rw-r--r--fpdfsdk/src/formfiller/FFL_IFormFiller.cpp6
-rw-r--r--fpdfsdk/src/formfiller/FFL_ListBox.cpp16
-rw-r--r--fpdfsdk/src/formfiller/FFL_Notify.cpp2
-rw-r--r--fpdfsdk/src/formfiller/FFL_RadioButton.cpp2
-rw-r--r--fpdfsdk/src/formfiller/FFL_TextField.cpp2
-rw-r--r--fpdfsdk/src/formfiller/FFL_Utils.cpp2
10 files changed, 29 insertions, 29 deletions
diff --git a/fpdfsdk/src/formfiller/FFL_CBA_Fontmap.cpp b/fpdfsdk/src/formfiller/FFL_CBA_Fontmap.cpp
index 41112600de..11600b75f8 100644
--- a/fpdfsdk/src/formfiller/FFL_CBA_Fontmap.cpp
+++ b/fpdfsdk/src/formfiller/FFL_CBA_Fontmap.cpp
@@ -45,7 +45,7 @@ void CBA_FontMap::Reset()
void CBA_FontMap::Initial(FX_LPCSTR fontname)
{
- FX_INT32 nCharset = DEFAULT_CHARSET;
+ int32_t nCharset = DEFAULT_CHARSET;
if (!m_pDefaultFont)
{
@@ -83,13 +83,13 @@ void CBA_FontMap::SetDefaultFont(CPDF_Font * pFont, const CFX_ByteString & sFont
// if (m_sDefaultFontName.IsEmpty())
// m_sDefaultFontName = pFont->GetFontTypeName();
- FX_INT32 nCharset = DEFAULT_CHARSET;
+ int32_t nCharset = DEFAULT_CHARSET;
if (const CFX_SubstFont* pSubstFont = m_pDefaultFont->GetSubstFont())
nCharset = pSubstFont->m_Charset;
AddFontData(m_pDefaultFont, m_sDefaultFontName, nCharset);
}
-CPDF_Font* CBA_FontMap::FindFontSameCharset(CFX_ByteString& sFontAlias, FX_INT32 nCharset)
+CPDF_Font* CBA_FontMap::FindFontSameCharset(CFX_ByteString& sFontAlias, int32_t nCharset)
{
ASSERT(m_pAnnotDict != NULL);
@@ -119,7 +119,7 @@ CPDF_Document* CBA_FontMap::GetDocument()
}
CPDF_Font* CBA_FontMap::FindResFontSameCharset(CPDF_Dictionary* pResDict, CFX_ByteString& sFontAlias,
- FX_INT32 nCharset)
+ int32_t nCharset)
{
if (!pResDict) return NULL;
@@ -187,7 +187,7 @@ void CBA_FontMap::AddFontToAnnotDict(CPDF_Font* pFont, const CFX_ByteString& sAl
if (pStream == NULL)
{
pStream = new CPDF_Stream(NULL, 0, NULL);
- FX_INT32 objnum = m_pDocument->AddIndirectObject(pStream);
+ int32_t objnum = m_pDocument->AddIndirectObject(pStream);
pAPDict->SetAtReference(m_sAPType, m_pDocument, objnum);
}
@@ -214,7 +214,7 @@ void CBA_FontMap::AddFontToAnnotDict(CPDF_Font* pFont, const CFX_ByteString& sAl
if (!pStreamResFontList)
{
pStreamResFontList = new CPDF_Dictionary;
- FX_INT32 objnum = m_pDocument->AddIndirectObject(pStreamResFontList);
+ int32_t objnum = m_pDocument->AddIndirectObject(pStreamResFontList);
pStreamResList->SetAtReference("Font", m_pDocument, objnum);
}
if (!pStreamResFontList->KeyExist(sAlias))
diff --git a/fpdfsdk/src/formfiller/FFL_CheckBox.cpp b/fpdfsdk/src/formfiller/FFL_CheckBox.cpp
index f8035c7ec9..dad485cac3 100644
--- a/fpdfsdk/src/formfiller/FFL_CheckBox.cpp
+++ b/fpdfsdk/src/formfiller/FFL_CheckBox.cpp
@@ -124,7 +124,7 @@ void CFFL_CheckBox::SaveData(CPDFSDK_PageView* pPageView)
CPDF_FormField* pField = m_pWidget->GetFormField();
ASSERT(pField != NULL);
- for (FX_INT32 i=0,sz=pField->CountControls(); i<sz; i++)
+ for (int32_t i=0,sz=pField->CountControls(); i<sz; i++)
{
if (CPDF_FormControl* pCtrl = pField->GetControl(i))
{
diff --git a/fpdfsdk/src/formfiller/FFL_ComboBox.cpp b/fpdfsdk/src/formfiller/FFL_ComboBox.cpp
index 012ed4a730..3c74c9f7e1 100644
--- a/fpdfsdk/src/formfiller/FFL_ComboBox.cpp
+++ b/fpdfsdk/src/formfiller/FFL_ComboBox.cpp
@@ -80,14 +80,14 @@ CPWL_Wnd* CFFL_ComboBox::NewPDFWindow(const PWL_CREATEPARAM& cp, CPDFSDK_PageVie
CFFL_IFormFiller* pFormFiller = m_pApp->GetIFormFiller();
pWnd->SetFillerNotify(pFormFiller);
- FX_INT32 nCurSel = m_pWidget->GetSelectedIndex(0);
+ int32_t nCurSel = m_pWidget->GetSelectedIndex(0);
CFX_WideString swText;
if (nCurSel < 0)
swText = m_pWidget->GetValue();
else
swText = m_pWidget->GetOptionLabel(nCurSel);
- for (FX_INT32 i=0,sz=m_pWidget->CountOptions(); i<sz; i++)
+ for (int32_t i=0,sz=m_pWidget->CountOptions(); i<sz; i++)
{
pWnd->AddString(m_pWidget->GetOptionLabel(i).c_str());
}
@@ -107,7 +107,7 @@ FX_BOOL CFFL_ComboBox::IsDataChanged(CPDFSDK_PageView* pPageView)
{
if (CPWL_ComboBox * pWnd = (CPWL_ComboBox*)GetPDFWindow(pPageView, FALSE))
{
- FX_INT32 nCurSel = pWnd->GetSelect();
+ int32_t nCurSel = pWnd->GetSelect();
ASSERT(m_pWidget != NULL);
@@ -138,7 +138,7 @@ void CFFL_ComboBox::SaveData(CPDFSDK_PageView* pPageView)
if (CPWL_ComboBox* pWnd = (CPWL_ComboBox*)GetPDFWindow(pPageView, FALSE))
{
CFX_WideString swText = pWnd->GetText();
- FX_INT32 nCurSel = pWnd->GetSelect();
+ int32_t nCurSel = pWnd->GetSelect();
//mantis:0004157
FX_BOOL bSetValue = TRUE;
diff --git a/fpdfsdk/src/formfiller/FFL_FormFiller.cpp b/fpdfsdk/src/formfiller/FFL_FormFiller.cpp
index 530b80ce6f..1e2db7004a 100644
--- a/fpdfsdk/src/formfiller/FFL_FormFiller.cpp
+++ b/fpdfsdk/src/formfiller/FFL_FormFiller.cpp
@@ -9,9 +9,9 @@
#include "../../include/formfiller/FFL_Notify.h"
#include "../../include/formfiller/FFL_CBA_Fontmap.h"
-#define GetRed(rgb) ((FX_BYTE)(rgb))
-#define GetGreen(rgb) ((FX_BYTE)(((FX_WORD)(rgb)) >> 8))
-#define GetBlue(rgb) ((FX_BYTE)((rgb)>>16))
+#define GetRed(rgb) ((uint8_t)(rgb))
+#define GetGreen(rgb) ((uint8_t)(((FX_WORD)(rgb)) >> 8))
+#define GetBlue(rgb) ((uint8_t)((rgb)>>16))
#define FFL_HINT_ELAPSE 800
diff --git a/fpdfsdk/src/formfiller/FFL_IFormFiller.cpp b/fpdfsdk/src/formfiller/FFL_IFormFiller.cpp
index 1656ba5c5d..b2d80abc35 100644
--- a/fpdfsdk/src/formfiller/FFL_IFormFiller.cpp
+++ b/fpdfsdk/src/formfiller/FFL_IFormFiller.cpp
@@ -719,7 +719,7 @@ void CFFL_IFormFiller::SetFocusAnnotTab(CPDFSDK_Annot* pWidget, FX_BOOL bSameFie
}
-void CFFL_IFormFiller::QueryWherePopup(void* pPrivateData, FX_FLOAT fPopupMin,FX_FLOAT fPopupMax, FX_INT32 & nRet, FX_FLOAT & fPopupRet)
+void CFFL_IFormFiller::QueryWherePopup(void* pPrivateData, FX_FLOAT fPopupMin,FX_FLOAT fPopupMax, int32_t & nRet, FX_FLOAT & fPopupRet)
{
ASSERT(pPrivateData != NULL);
@@ -834,7 +834,7 @@ void CFFL_IFormFiller::OnSetWindowRect(void* pPrivateData, const CPDF_Rect & rcW
}
}
-void CFFL_IFormFiller::OnKeyStroke(FX_BOOL bEditOrList, void* pPrivateData, FX_INT32 nKeyCode, CFX_WideString& strChange,
+void CFFL_IFormFiller::OnKeyStroke(FX_BOOL bEditOrList, void* pPrivateData, int32_t nKeyCode, CFX_WideString& strChange,
const CFX_WideString& strChangeEx, FX_BOOL bKeyDown,
FX_BOOL & bRC, FX_BOOL & bExit)
{
@@ -1097,7 +1097,7 @@ void CFFL_IFormFiller::DoPaste(CPDFSDK_Document* pDocument)
{
}
-void CFFL_IFormFiller::OnBeforeKeyStroke(FX_BOOL bEditOrList, void* pPrivateData, FX_INT32 nKeyCode,
+void CFFL_IFormFiller::OnBeforeKeyStroke(FX_BOOL bEditOrList, void* pPrivateData, int32_t nKeyCode,
CFX_WideString & strChange, const CFX_WideString& strChangeEx,
int nSelStart, int nSelEnd,
FX_BOOL bKeyDown, FX_BOOL & bRC, FX_BOOL & bExit, FX_DWORD nFlag)
diff --git a/fpdfsdk/src/formfiller/FFL_ListBox.cpp b/fpdfsdk/src/formfiller/FFL_ListBox.cpp
index dffd17538f..6b0aa1b347 100644
--- a/fpdfsdk/src/formfiller/FFL_ListBox.cpp
+++ b/fpdfsdk/src/formfiller/FFL_ListBox.cpp
@@ -76,7 +76,7 @@ CPWL_Wnd* CFFL_ListBox::NewPDFWindow(const PWL_CREATEPARAM& cp, CPDFSDK_PageView
CFFL_IFormFiller* pIFormFiller = m_pApp->GetIFormFiller();
pWnd->SetFillerNotify(pIFormFiller);
- for (FX_INT32 i=0,sz=m_pWidget->CountOptions(); i<sz; i++)
+ for (int32_t i=0,sz=m_pWidget->CountOptions(); i<sz; i++)
pWnd->AddString(m_pWidget->GetOptionLabel(i).c_str());
if (pWnd->HasFlag(PLBS_MULTIPLESEL))
@@ -84,7 +84,7 @@ CPWL_Wnd* CFFL_ListBox::NewPDFWindow(const PWL_CREATEPARAM& cp, CPDFSDK_PageView
m_OriginSelections.RemoveAll();
FX_BOOL bSetCaret = FALSE;
- for (FX_INT32 i=0,sz=m_pWidget->CountOptions(); i<sz; i++)
+ for (int32_t i=0,sz=m_pWidget->CountOptions(); i<sz; i++)
{
if (m_pWidget->IsOptionSelected(i))
{
@@ -130,7 +130,7 @@ FX_BOOL CFFL_ListBox::IsDataChanged(CPDFSDK_PageView* pPageView)
if (m_pWidget->GetFieldFlags() & FIELDFLAG_MULTISELECT)
{
int nSelCount = 0;
- for (FX_INT32 i=0,sz=pListBox->GetCount(); i<sz; i++)
+ for (int32_t i=0,sz=pListBox->GetCount(); i<sz; i++)
{
if (pListBox->IsItemSelected(i))
{
@@ -172,13 +172,13 @@ void CFFL_ListBox::SaveData(CPDFSDK_PageView* pPageView)
}
- FX_INT32 nNewTopIndex = pListBox->GetTopVisibleIndex();
+ int32_t nNewTopIndex = pListBox->GetTopVisibleIndex();
m_pWidget->ClearSelection(FALSE);
if (m_pWidget->GetFieldFlags() & FIELDFLAG_MULTISELECT)
{
- for (FX_INT32 i=0,sz=pListBox->GetCount(); i<sz; i++)
+ for (int32_t i=0,sz=pListBox->GetCount(); i<sz; i++)
{
if (pListBox->IsItemSelected(i))
{
@@ -215,7 +215,7 @@ void CFFL_ListBox::GetActionData(CPDFSDK_PageView* pPageView, CPDF_AAction::AAct
if (CPWL_ListBox* pListBox = (CPWL_ListBox*)GetPDFWindow(pPageView, FALSE))
{
ASSERT(m_pWidget != NULL);
- FX_INT32 nCurSel = pListBox->GetCurSel();
+ int32_t nCurSel = pListBox->GetCurSel();
if (nCurSel >= 0)
fa.sValue = m_pWidget->GetOptionLabel(nCurSel);
}
@@ -230,7 +230,7 @@ void CFFL_ListBox::GetActionData(CPDFSDK_PageView* pPageView, CPDF_AAction::AAct
else
{
ASSERT(m_pWidget != NULL);
- FX_INT32 nCurSel = m_pWidget->GetSelectedIndex(0);
+ int32_t nCurSel = m_pWidget->GetSelectedIndex(0);
if (nCurSel >= 0)
fa.sValue = m_pWidget->GetOptionLabel(nCurSel);
}
@@ -252,7 +252,7 @@ void CFFL_ListBox::SaveState(CPDFSDK_PageView* pPageView)
if (CPWL_ListBox* pListBox = (CPWL_ListBox*)GetPDFWindow(pPageView, FALSE))
{
- for (FX_INT32 i=0,sz=pListBox->GetCount(); i<sz; i++)
+ for (int32_t i=0,sz=pListBox->GetCount(); i<sz; i++)
{
if (pListBox->IsItemSelected(i))
{
diff --git a/fpdfsdk/src/formfiller/FFL_Notify.cpp b/fpdfsdk/src/formfiller/FFL_Notify.cpp
index 73ab5dbb85..406aa8d489 100644
--- a/fpdfsdk/src/formfiller/FFL_Notify.cpp
+++ b/fpdfsdk/src/formfiller/FFL_Notify.cpp
@@ -127,7 +127,7 @@ FX_BOOL CFFL_Notify::ExecuteActionTree(CPDF_AAction::AActionType eAAT,CPDF_Actio
if (!ExecuteAction(eAAT,action,bExit)) return FALSE;
if (bExit) return TRUE;
- for (FX_INT32 i=0,sz=action.GetSubActionsCount(); i<sz; i++)
+ for (int32_t i=0,sz=action.GetSubActionsCount(); i<sz; i++)
{
CPDF_Action subaction = action.GetSubAction(i);
if (!ExecuteActionTree(eAAT,subaction,bExit)) return FALSE;
diff --git a/fpdfsdk/src/formfiller/FFL_RadioButton.cpp b/fpdfsdk/src/formfiller/FFL_RadioButton.cpp
index aacb7d81e9..708d6df090 100644
--- a/fpdfsdk/src/formfiller/FFL_RadioButton.cpp
+++ b/fpdfsdk/src/formfiller/FFL_RadioButton.cpp
@@ -117,7 +117,7 @@ void CFFL_RadioButton::SaveData(CPDFSDK_PageView* pPageView)
CPDF_FormField* pField = m_pWidget->GetFormField();
ASSERT(pField != NULL);
- for (FX_INT32 i=0,sz=pField->CountControls(); i<sz; i++)
+ for (int32_t i=0,sz=pField->CountControls(); i<sz; i++)
{
if (CPDF_FormControl* pCtrl = pField->GetControl(i))
{
diff --git a/fpdfsdk/src/formfiller/FFL_TextField.cpp b/fpdfsdk/src/formfiller/FFL_TextField.cpp
index f488fac6ae..cd0299ce1b 100644
--- a/fpdfsdk/src/formfiller/FFL_TextField.cpp
+++ b/fpdfsdk/src/formfiller/FFL_TextField.cpp
@@ -114,7 +114,7 @@ CPWL_Wnd* CFFL_TextField::NewPDFWindow(const PWL_CREATEPARAM& cp, CPDFSDK_PageVi
pWnd->SetFillerNotify(pIFormFiller);
ASSERT(m_pWidget != NULL);
- FX_INT32 nMaxLen = m_pWidget->GetMaxLen();
+ int32_t nMaxLen = m_pWidget->GetMaxLen();
CFX_WideString swValue = m_pWidget->GetValue();
if (nMaxLen > 0)
diff --git a/fpdfsdk/src/formfiller/FFL_Utils.cpp b/fpdfsdk/src/formfiller/FFL_Utils.cpp
index 196102bfb4..2f988b2f0b 100644
--- a/fpdfsdk/src/formfiller/FFL_Utils.cpp
+++ b/fpdfsdk/src/formfiller/FFL_Utils.cpp
@@ -93,7 +93,7 @@ FX_BOOL CFFL_Utils::TraceObject(CPDF_Object* pObj)
case PDFOBJ_BOOLEAN:
break;
case PDFOBJ_NUMBER:
- //TRACE("%d\n",(FX_INT32)pObj);
+ //TRACE("%d\n",(int32_t)pObj);
break;
case PDFOBJ_STRING:
//TRACE(((CPDF_String*)pObj)->GetString() + "\n");