diff options
author | Tom Sepez <tsepez@chromium.org> | 2015-06-09 13:24:12 -0700 |
---|---|---|
committer | Tom Sepez <tsepez@chromium.org> | 2015-06-09 13:24:12 -0700 |
commit | bfa9a824a20f37c2dd7111012b46c929cf2ed8a0 (patch) | |
tree | 4cfbe682869d89900f33751c37f6a84865beeb0a /fpdfsdk/src/formfiller | |
parent | b116136da234afcad018bb44a3ccb64b9ad2a554 (diff) | |
download | pdfium-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 'fpdfsdk/src/formfiller')
-rw-r--r-- | fpdfsdk/src/formfiller/FFL_CBA_Fontmap.cpp | 16 | ||||
-rw-r--r-- | fpdfsdk/src/formfiller/FFL_CheckBox.cpp | 2 | ||||
-rw-r--r-- | fpdfsdk/src/formfiller/FFL_ComboBox.cpp | 8 | ||||
-rw-r--r-- | fpdfsdk/src/formfiller/FFL_FormFiller.cpp | 6 | ||||
-rw-r--r-- | fpdfsdk/src/formfiller/FFL_IFormFiller.cpp | 6 | ||||
-rw-r--r-- | fpdfsdk/src/formfiller/FFL_ListBox.cpp | 16 | ||||
-rw-r--r-- | fpdfsdk/src/formfiller/FFL_Notify.cpp | 2 | ||||
-rw-r--r-- | fpdfsdk/src/formfiller/FFL_RadioButton.cpp | 2 | ||||
-rw-r--r-- | fpdfsdk/src/formfiller/FFL_TextField.cpp | 2 | ||||
-rw-r--r-- | fpdfsdk/src/formfiller/FFL_Utils.cpp | 2 |
10 files changed, 31 insertions, 31 deletions
diff --git a/fpdfsdk/src/formfiller/FFL_CBA_Fontmap.cpp b/fpdfsdk/src/formfiller/FFL_CBA_Fontmap.cpp index 9f04861e44..d73fbf45b0 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; @@ -186,8 +186,8 @@ void CBA_FontMap::AddFontToAnnotDict(CPDF_Font* pFont, const CFX_ByteString& sAl CPDF_Stream* pStream = pAPDict->GetStream(m_sAPType); if (pStream == NULL) { - pStream = FX_NEW CPDF_Stream(NULL, 0, NULL); - FX_INT32 objnum = m_pDocument->AddIndirectObject(pStream); + pStream = new CPDF_Stream(NULL, 0, NULL); + int32_t objnum = m_pDocument->AddIndirectObject(pStream); pAPDict->SetAtReference(m_sAPType, m_pDocument, objnum); } @@ -213,8 +213,8 @@ void CBA_FontMap::AddFontToAnnotDict(CPDF_Font* pFont, const CFX_ByteString& sAl CPDF_Dictionary* pStreamResFontList = pStreamResList->GetDict("Font"); if (!pStreamResFontList) { - pStreamResFontList = FX_NEW CPDF_Dictionary; - FX_INT32 objnum = m_pDocument->AddIndirectObject(pStreamResFontList); + pStreamResFontList = new CPDF_Dictionary; + 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 a86c2520b3..123c1cd24a 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 c9dd6681d2..9fdcbbdc4a 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 42af6be574..6f96d33da8 100644 --- a/fpdfsdk/src/formfiller/FFL_IFormFiller.cpp +++ b/fpdfsdk/src/formfiller/FFL_IFormFiller.cpp @@ -722,7 +722,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); @@ -837,7 +837,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) { @@ -1284,7 +1284,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 46f738dc73..fb7fec9ea7 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"); |