summaryrefslogtreecommitdiff
path: root/fpdfsdk/src
diff options
context:
space:
mode:
Diffstat (limited to 'fpdfsdk/src')
-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
-rw-r--r--fpdfsdk/src/fpdfppo.cpp2
-rw-r--r--fpdfsdk/src/fpdfview.cpp6
-rw-r--r--fpdfsdk/src/fsdk_actionhandler.cpp12
-rw-r--r--fpdfsdk/src/fsdk_baseannot.cpp52
-rw-r--r--fpdfsdk/src/fsdk_baseform.cpp46
-rw-r--r--fpdfsdk/src/fsdk_mgr.cpp38
-rw-r--r--fpdfsdk/src/fxedit/fxet_ap.cpp8
-rw-r--r--fpdfsdk/src/fxedit/fxet_edit.cpp108
-rw-r--r--fpdfsdk/src/fxedit/fxet_list.cpp122
-rw-r--r--fpdfsdk/src/fxedit/fxet_pageobjs.cpp36
-rw-r--r--fpdfsdk/src/javascript/Document.cpp2
-rw-r--r--fpdfsdk/src/javascript/Field.cpp56
-rw-r--r--fpdfsdk/src/javascript/JS_GlobalData.cpp12
-rw-r--r--fpdfsdk/src/javascript/util.cpp4
-rw-r--r--fpdfsdk/src/pdfwindow/PWL_ComboBox.cpp12
-rw-r--r--fpdfsdk/src/pdfwindow/PWL_Edit.cpp48
-rw-r--r--fpdfsdk/src/pdfwindow/PWL_EditCtrl.cpp30
-rw-r--r--fpdfsdk/src/pdfwindow/PWL_FontMap.cpp64
-rw-r--r--fpdfsdk/src/pdfwindow/PWL_Icon.cpp4
-rw-r--r--fpdfsdk/src/pdfwindow/PWL_IconList.cpp64
-rw-r--r--fpdfsdk/src/pdfwindow/PWL_Label.cpp6
-rw-r--r--fpdfsdk/src/pdfwindow/PWL_ListBox.cpp32
-rw-r--r--fpdfsdk/src/pdfwindow/PWL_ListCtrl.cpp22
-rw-r--r--fpdfsdk/src/pdfwindow/PWL_Note.cpp72
-rw-r--r--fpdfsdk/src/pdfwindow/PWL_ScrollBar.cpp14
-rw-r--r--fpdfsdk/src/pdfwindow/PWL_Signature.cpp4
-rw-r--r--fpdfsdk/src/pdfwindow/PWL_Utils.cpp86
-rw-r--r--fpdfsdk/src/pdfwindow/PWL_Wnd.cpp72
38 files changed, 546 insertions, 546 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");
diff --git a/fpdfsdk/src/fpdfppo.cpp b/fpdfsdk/src/fpdfppo.cpp
index e8bd76d414..2b583f038d 100644
--- a/fpdfsdk/src/fpdfppo.cpp
+++ b/fpdfsdk/src/fpdfppo.cpp
@@ -178,7 +178,7 @@ FX_BOOL CPDF_PageOrganizer::ExportPage(CPDF_Document *pSrcPDFDoc, CFX_WordArray*
FX_DWORD dwOldPageObj = pSrcPageDict->GetObjNum();
FX_DWORD dwNewPageObj = pCurPageDict->GetObjNum();
- pMapPtrToPtr->SetAt((FX_LPVOID)(FX_UINTPTR)dwOldPageObj, (FX_LPVOID)(FX_UINTPTR)dwNewPageObj);
+ pMapPtrToPtr->SetAt((FX_LPVOID)(uintptr_t)dwOldPageObj, (FX_LPVOID)(uintptr_t)dwNewPageObj);
this->UpdateReference(pCurPageDict, pDestPDFDoc, pMapPtrToPtr);
curpage++;
diff --git a/fpdfsdk/src/fpdfview.cpp b/fpdfsdk/src/fpdfview.cpp
index 159507080c..efb1148305 100644
--- a/fpdfsdk/src/fpdfview.cpp
+++ b/fpdfsdk/src/fpdfview.cpp
@@ -202,7 +202,7 @@ extern void CheckUnSupportError(CPDF_Document * pDoc, FX_DWORD err_code);
class CMemFile final: public IFX_FileRead
{
public:
- CMemFile(FX_BYTE* pBuf, FX_FILESIZE size):m_pBuf(pBuf),m_size(size) {}
+ CMemFile(uint8_t* pBuf, FX_FILESIZE size):m_pBuf(pBuf),m_size(size) {}
virtual void Release() {delete this;}
virtual FX_FILESIZE GetSize() {return m_size;}
@@ -220,14 +220,14 @@ public:
return TRUE;
}
private:
- FX_BYTE* m_pBuf;
+ uint8_t* m_pBuf;
FX_FILESIZE m_size;
};
DLLEXPORT FPDF_DOCUMENT STDCALL FPDF_LoadMemDocument(const void* data_buf, int size, FPDF_BYTESTRING password)
{
CPDF_Parser* pParser = new CPDF_Parser;
pParser->SetPassword(password);
- CMemFile* pMemFile = new CMemFile((FX_BYTE*)data_buf, size);
+ CMemFile* pMemFile = new CMemFile((uint8_t*)data_buf, size);
FX_DWORD err_code = pParser->StartParse(pMemFile);
if (err_code) {
delete pParser;
diff --git a/fpdfsdk/src/fsdk_actionhandler.cpp b/fpdfsdk/src/fsdk_actionhandler.cpp
index fb8bcb2cb7..50d6b654f6 100644
--- a/fpdfsdk/src/fsdk_actionhandler.cpp
+++ b/fpdfsdk/src/fsdk_actionhandler.cpp
@@ -158,7 +158,7 @@ FX_BOOL CPDFSDK_ActionHandler::ExecuteDocumentOpenAction(const CPDF_Action& acti
DoAction_NoJs(action, pDocument);
}
- 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 (!ExecuteDocumentOpenAction(subaction, pDocument, list)) return FALSE;
@@ -213,7 +213,7 @@ FX_BOOL CPDFSDK_ActionHandler::ExecuteLinkAction(const CPDF_Action& action, CPDF
DoAction_NoJs(action, pDocument);
}
- 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 (!ExecuteLinkAction(subaction, pDocument, list)) return FALSE;
@@ -254,7 +254,7 @@ FX_BOOL CPDFSDK_ActionHandler::ExecuteDocumentPageAction(const CPDF_Action& acti
if (!IsValidDocView(pDocument))
return FALSE;
- 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 (!ExecuteDocumentPageAction(subaction, type, pDocument, list)) return FALSE;
@@ -309,7 +309,7 @@ FX_BOOL CPDFSDK_ActionHandler::ExecuteFieldAction(const CPDF_Action& action, CPD
DoAction_NoJs(action, pDocument);
}
- 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 (!ExecuteFieldAction(subaction, type, pDocument, pFormField, data, list)) return FALSE;
@@ -399,7 +399,7 @@ FX_BOOL CPDFSDK_ActionHandler::ExecuteScreenAction(const CPDF_Action& action, CP
DoAction_NoJs(action, pDocument);
}
- 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 (!ExecuteScreenAction(subaction, type, pDocument, pScreen, list)) return FALSE;
@@ -454,7 +454,7 @@ FX_BOOL CPDFSDK_ActionHandler::ExecuteBookMark(const CPDF_Action& action, CPDFSD
DoAction_NoJs(action, pDocument);
}
- 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 (!ExecuteBookMark(subaction, pDocument, pBookmark, list)) return FALSE;
diff --git a/fpdfsdk/src/fsdk_baseannot.cpp b/fpdfsdk/src/fsdk_baseannot.cpp
index 6febe6e2e6..e21bb85663 100644
--- a/fpdfsdk/src/fsdk_baseannot.cpp
+++ b/fpdfsdk/src/fsdk_baseannot.cpp
@@ -12,24 +12,24 @@
//---------------------------------------------------------------------------
// CPDFSDK_DateTime
//---------------------------------------------------------------------------
-int _gAfxGetTimeZoneInSeconds(FX_CHAR tzhour, FX_BYTE tzminute)
+int _gAfxGetTimeZoneInSeconds(FX_CHAR tzhour, uint8_t tzminute)
{
return (int)tzhour * 3600 + (int)tzminute * (tzhour >= 0 ? 60 : -60);
}
-FX_BOOL _gAfxIsLeapYear(FX_SHORT year)
+FX_BOOL _gAfxIsLeapYear(int16_t year)
{
return ((year % 400 == 0) || ((year % 4 == 0) && (year % 100 != 0)));
}
-FX_WORD _gAfxGetYearDays(FX_SHORT year)
+FX_WORD _gAfxGetYearDays(int16_t year)
{
return (_gAfxIsLeapYear(year) == TRUE ? 366 : 365);
}
-FX_BYTE _gAfxGetMonthDays(FX_SHORT year, FX_BYTE month)
+uint8_t _gAfxGetMonthDays(int16_t year, uint8_t month)
{
- FX_BYTE mDays;
+ uint8_t mDays;
switch (month)
{
case 1:
@@ -117,12 +117,12 @@ CPDFSDK_DateTime& CPDFSDK_DateTime::operator = (const FX_SYSTEMTIME& st)
{
tzset();
- dt.year = (FX_SHORT)st.wYear;
- dt.month = (FX_BYTE)st.wMonth;
- dt.day = (FX_BYTE)st.wDay;
- dt.hour = (FX_BYTE)st.wHour;
- dt.minute = (FX_BYTE)st.wMinute;
- dt.second = (FX_BYTE)st.wSecond;
+ dt.year = (int16_t)st.wYear;
+ dt.month = (uint8_t)st.wMonth;
+ dt.day = (uint8_t)st.wDay;
+ dt.hour = (uint8_t)st.wHour;
+ dt.minute = (uint8_t)st.wMinute;
+ dt.second = (uint8_t)st.wSecond;
// dt.tzHour = _timezone / 3600 * -1;
// dt.tzMinute = (abs(_timezone) % 3600) / 60;
return *this;
@@ -234,7 +234,7 @@ CPDFSDK_DateTime& CPDFSDK_DateTime::FromPDFDateTimeString(const CFX_ByteString&
if (ch < '0' || ch > '9') break;
i ++;
}
- dt.year = (FX_SHORT)k;
+ dt.year = (int16_t)k;
if (i >= strLength || j < 4) return *this;
j = 0;
@@ -247,7 +247,7 @@ CPDFSDK_DateTime& CPDFSDK_DateTime::FromPDFDateTimeString(const CFX_ByteString&
if (ch < '0' || ch > '9') break;
i ++;
}
- dt.month = (FX_BYTE)k;
+ dt.month = (uint8_t)k;
if (i >= strLength || j < 2) return *this;
j = 0;
@@ -260,7 +260,7 @@ CPDFSDK_DateTime& CPDFSDK_DateTime::FromPDFDateTimeString(const CFX_ByteString&
if (ch < '0' || ch > '9') break;
i ++;
}
- dt.day = (FX_BYTE)k;
+ dt.day = (uint8_t)k;
if (i >= strLength || j < 2) return *this;
j = 0;
@@ -273,7 +273,7 @@ CPDFSDK_DateTime& CPDFSDK_DateTime::FromPDFDateTimeString(const CFX_ByteString&
if (ch < '0' || ch > '9') break;
i ++;
}
- dt.hour = (FX_BYTE)k;
+ dt.hour = (uint8_t)k;
if (i >= strLength || j < 2) return *this;
j = 0;
@@ -286,7 +286,7 @@ CPDFSDK_DateTime& CPDFSDK_DateTime::FromPDFDateTimeString(const CFX_ByteString&
if (ch < '0' || ch > '9') break;
i ++;
}
- dt.minute = (FX_BYTE)k;
+ dt.minute = (uint8_t)k;
if (i >= strLength || j < 2) return *this;
j = 0;
@@ -299,7 +299,7 @@ CPDFSDK_DateTime& CPDFSDK_DateTime::FromPDFDateTimeString(const CFX_ByteString&
if (ch < '0' || ch > '9') break;
i ++;
}
- dt.second = (FX_BYTE)k;
+ dt.second = (uint8_t)k;
if (i >= strLength || j < 2) return *this;
ch = dtStr[i ++];
@@ -333,7 +333,7 @@ CPDFSDK_DateTime& CPDFSDK_DateTime::FromPDFDateTimeString(const CFX_ByteString&
if (ch < '0' || ch > '9') break;
i ++;
}
- dt.tzMinute = (FX_BYTE)k;
+ dt.tzMinute = (uint8_t)k;
if (i >= strLength || j < 2) return *this;
}
@@ -401,9 +401,9 @@ CPDFSDK_DateTime& CPDFSDK_DateTime::AddDays(short days)
{
if (days == 0) return *this;
- FX_SHORT y = dt.year, yy;
- FX_BYTE m = dt.month;
- FX_BYTE d = dt.day;
+ int16_t y = dt.year, yy;
+ uint8_t m = dt.month;
+ uint8_t d = dt.day;
int mdays, ydays, ldays;
ldays = days;
@@ -489,11 +489,11 @@ CPDFSDK_DateTime& CPDFSDK_DateTime::AddSeconds(int seconds)
days = n / 86400;
n %= 86400;
}
- dt.hour = (FX_BYTE)(n / 3600);
+ dt.hour = (uint8_t)(n / 3600);
dt.hour %= 24;
n %= 3600;
- dt.minute = (FX_BYTE)(n / 60);
- dt.second = (FX_BYTE)(n % 60);
+ dt.minute = (uint8_t)(n / 60);
+ dt.second = (uint8_t)(n % 60);
if (days != 0) AddDays(days);
return *this;
@@ -965,7 +965,7 @@ void CPDFSDK_Annot::WriteAppearance(const CFX_ByteString& sAPType, const CPDF_Re
{
CPDF_Document* pDoc = m_pPageView->GetPDFDocument();
pStream = new CPDF_Stream(NULL, 0, NULL);
- FX_INT32 objnum = pDoc->AddIndirectObject(pStream);
+ int32_t objnum = pDoc->AddIndirectObject(pStream);
pParentDict->SetAtReference(sAPType, pDoc, objnum);
}
@@ -985,7 +985,7 @@ void CPDFSDK_Annot::WriteAppearance(const CFX_ByteString& sAPType, const CPDF_Re
pStreamDict->SetAtRect("BBox", rcBBox);
}
- pStream->SetData((FX_BYTE*)sContents.c_str(), sContents.GetLength(), FALSE, FALSE);
+ pStream->SetData((uint8_t*)sContents.c_str(), sContents.GetLength(), FALSE, FALSE);
}
#define BA_ANNOT_MINWIDTH 1
diff --git a/fpdfsdk/src/fsdk_baseform.cpp b/fpdfsdk/src/fsdk_baseform.cpp
index 8b0738a8d4..8d62a16ff4 100644
--- a/fpdfsdk/src/fsdk_baseform.cpp
+++ b/fpdfsdk/src/fsdk_baseform.cpp
@@ -456,7 +456,7 @@ void CPDFSDK_Widget::DrawShadow(CFX_RenderDevice* pDevice, CPDFSDK_PageView* pPa
// {
CPDF_Rect rc = GetRect();
FX_COLORREF color = m_pInterForm->GetHighlightColor(nFieldType);
- FX_BYTE alpha = m_pInterForm->GetHighlightAlpha();
+ uint8_t alpha = m_pInterForm->GetHighlightAlpha();
CFX_FloatRect rcDevice;
ASSERT(m_pInterForm->GetDocument());
@@ -488,7 +488,7 @@ void CPDFSDK_Widget::ResetAppearance_PushButton()
CPDF_Rect rcWindow = GetRotatedRect();
- FX_INT32 nLayout = 0;
+ int32_t nLayout = 0;
switch (pControl->GetTextPosition())
{
@@ -529,7 +529,7 @@ void CPDFSDK_Widget::ResetAppearance_PushButton()
crBorder = CPWL_Color(iColorType, fc[0], fc[1], fc[2], fc[3]);
FX_FLOAT fBorderWidth = (FX_FLOAT)GetBorderWidth();
- FX_INT32 nBorderStyle = 0;
+ int32_t nBorderStyle = 0;
CPWL_Dash dsBorder(3,0,0);
CPWL_Color crLeftTop,crRightBottom;
@@ -735,7 +735,7 @@ void CPDFSDK_Widget::ResetAppearance_CheckBox()
crBorder = CPWL_Color(iColorType, fc[0], fc[1], fc[2], fc[3]);
FX_FLOAT fBorderWidth = (FX_FLOAT)GetBorderWidth();
- FX_INT32 nBorderStyle = 0;
+ int32_t nBorderStyle = 0;
CPWL_Dash dsBorder(3,0,0);
CPWL_Color crLeftTop,crRightBottom;
@@ -775,7 +775,7 @@ void CPDFSDK_Widget::ResetAppearance_CheckBox()
crText = CPWL_Color(iColorType, fc[0], fc[1], fc[2], fc[3]);
}
- FX_INT32 nStyle = 0;
+ int32_t nStyle = 0;
CFX_WideString csWCaption = pControl->GetNormalCaption();
if (csWCaption.GetLength() > 0)
@@ -867,7 +867,7 @@ void CPDFSDK_Widget::ResetAppearance_RadioButton()
crBorder = CPWL_Color(iColorType, fc[0], fc[1], fc[2], fc[3]);
FX_FLOAT fBorderWidth = (FX_FLOAT)GetBorderWidth();
- FX_INT32 nBorderStyle = 0;
+ int32_t nBorderStyle = 0;
CPWL_Dash dsBorder(3,0,0);
CPWL_Color crLeftTop,crRightBottom;
@@ -907,7 +907,7 @@ void CPDFSDK_Widget::ResetAppearance_RadioButton()
crText = CPWL_Color(iColorType, fc[0], fc[1], fc[2], fc[3]);
}
- FX_INT32 nStyle = 0;
+ int32_t nStyle = 0;
CFX_WideString csWCaption = pControl->GetNormalCaption();
if (csWCaption.GetLength() > 0)
@@ -1069,7 +1069,7 @@ void CPDFSDK_Widget::ResetAppearance_ComboBox(FX_LPCWSTR sValue)
pEdit->SetText(sValue);
else
{
- FX_INT32 nCurSel = pField->GetSelectedIndex(0);
+ int32_t nCurSel = pField->GetSelectedIndex(0);
if (nCurSel < 0)
pEdit->SetText(pField->GetValue().c_str());
@@ -1143,14 +1143,14 @@ void CPDFSDK_Widget::ResetAppearance_ListBox()
CFX_ByteTextBuf sList;
FX_FLOAT fy = rcClient.top;
- FX_INT32 nTop = pField->GetTopVisibleIndex();
- FX_INT32 nCount = pField->CountOptions();
- FX_INT32 nSelCount = pField->CountSelectedItems();
+ int32_t nTop = pField->GetTopVisibleIndex();
+ int32_t nCount = pField->CountOptions();
+ int32_t nSelCount = pField->CountSelectedItems();
- for (FX_INT32 i=nTop; i<nCount; i++)
+ for (int32_t i=nTop; i<nCount; i++)
{
FX_BOOL bSelected = FALSE;
- for (FX_INT32 j=0; j<nSelCount; j++)
+ for (int32_t j=0; j<nSelCount; j++)
{
if (pField->GetSelectedIndex(j) == i)
{
@@ -1310,7 +1310,7 @@ void CPDFSDK_Widget::ResetAppearance_TextField(FX_LPCWSTR sValue)
sLines << "q\n" << GetBorderWidth() << " w\n"
<< CPWL_Utils::GetColorAppStream(GetBorderPWLColor(),FALSE) << " 2 J 0 j\n";
- for (FX_INT32 i=1;i<nMaxLen;i++)
+ for (int32_t i=1;i<nMaxLen;i++)
{
sLines << rcClient.left + ((rcClient.right - rcClient.left)/nMaxLen)*i << " "
<< rcClient.bottom << " m\n"
@@ -1335,7 +1335,7 @@ void CPDFSDK_Widget::ResetAppearance_TextField(FX_LPCWSTR sValue)
<< dsBorder.nGap << "] "
<< dsBorder.nPhase << " d\n";
- for (FX_INT32 i=1;i<nMaxLen;i++)
+ for (int32_t i=1;i<nMaxLen;i++)
{
sLines << rcClient.left + ((rcClient.right - rcClient.left)/nMaxLen)*i << " "
<< rcClient.bottom << " m\n"
@@ -1415,7 +1415,7 @@ CFX_ByteString CPDFSDK_Widget::GetBorderAppStream() const
CPWL_Color crLeftTop, crRightBottom;
FX_FLOAT fBorderWidth = (FX_FLOAT)GetBorderWidth();
- FX_INT32 nBorderStyle = 0;
+ int32_t nBorderStyle = 0;
CPWL_Dash dsBorder(3,0,0);
switch (GetBorderStyle())
@@ -1490,7 +1490,7 @@ CPWL_Color CPDFSDK_Widget::GetTextPWLColor() const
CPDF_DefaultAppearance da = pFormCtrl->GetDefaultAppearance();
if (da.HasColor())
{
- FX_INT32 iColorType;
+ int32_t iColorType;
FX_FLOAT fc[4];
da.GetColor(iColorType, fc);
crText = CPWL_Color(iColorType, fc[0], fc[1], fc[2], fc[3]);
@@ -1506,7 +1506,7 @@ CPWL_Color CPDFSDK_Widget::GetBorderPWLColor() const
CPDF_FormControl* pFormCtrl = GetFormControl();
ASSERT(pFormCtrl != NULL);
- FX_INT32 iColorType;
+ int32_t iColorType;
FX_FLOAT fc[4];
pFormCtrl->GetOriginalBorderColor(iColorType, fc);
if (iColorType > 0)
@@ -1522,7 +1522,7 @@ CPWL_Color CPDFSDK_Widget::GetFillPWLColor() const
CPDF_FormControl* pFormCtrl = GetFormControl();
ASSERT(pFormCtrl != NULL);
- FX_INT32 iColorType;
+ int32_t iColorType;
FX_FLOAT fc[4];
pFormCtrl->GetOriginalBackgroundColor(iColorType, fc);
if (iColorType > 0)
@@ -1643,12 +1643,12 @@ CFX_WideString CPDFSDK_Widget::GetAlternateName() const
return pFormField->GetAlternateName();
}
-FX_INT32 CPDFSDK_Widget::GetAppearanceAge() const
+int32_t CPDFSDK_Widget::GetAppearanceAge() const
{
return m_nAppAge;
}
-FX_INT32 CPDFSDK_Widget::GetValueAge() const
+int32_t CPDFSDK_Widget::GetValueAge() const
{
return m_nValueAge;
}
@@ -1898,7 +1898,7 @@ CPDF_Stream* CPDFSDK_InterForm::LoadImageFromFile(const CFX_WideString& sFile)
pRetStream = new CPDF_Stream(NULL, 0, NULL);
CFX_ByteString csStream;
csStream.Format("q\n%d 0 0 %d 0 0 cm\n/Img Do\nQ", nWidth, nHeight);
- pRetStream->InitStream((FX_BYTE*)csStream.c_str(), csStream.GetLength(), pStreamDict);
+ pRetStream->InitStream((uint8_t*)csStream.c_str(), csStream.GetLength(), pStreamDict);
pDocument->AddIndirectObject(pRetStream);
}
@@ -2345,7 +2345,7 @@ FX_BOOL CPDFSDK_InterForm::FDFToURLEncodedData(FX_LPBYTE& pBuf, FX_STRSIZE& nBuf
}
nBufSize = fdfEncodedData.GetLength();
- pBuf = FX_Alloc(FX_BYTE, nBufSize);
+ pBuf = FX_Alloc(uint8_t, nBufSize);
FXSYS_memcpy(pBuf, fdfEncodedData.GetBuffer(), nBufSize);
}
return TRUE;
diff --git a/fpdfsdk/src/fsdk_mgr.cpp b/fpdfsdk/src/fsdk_mgr.cpp
index 7ac370ec43..36e48117ae 100644
--- a/fpdfsdk/src/fsdk_mgr.cpp
+++ b/fpdfsdk/src/fsdk_mgr.cpp
@@ -30,8 +30,8 @@ public:
virtual CFX_WideString GetClipboardText(FX_HWND hWnd){return L"";}
virtual FX_BOOL SetClipboardText(FX_HWND hWnd, CFX_WideString string) {return FALSE;}
- virtual void ClientToScreen(FX_HWND hWnd, FX_INT32& x, FX_INT32& y) {}
- virtual void ScreenToClient(FX_HWND hWnd, FX_INT32& x, FX_INT32& y) {}
+ virtual void ClientToScreen(FX_HWND hWnd, int32_t& x, int32_t& y) {}
+ virtual void ScreenToClient(FX_HWND hWnd, int32_t& x, int32_t& y) {}
/*cursor style
FXCT_ARROW
@@ -41,20 +41,20 @@ public:
FXCT_HBEAM
FXCT_HAND
*/
- virtual void SetCursor(FX_INT32 nCursorType);
+ virtual void SetCursor(int32_t nCursorType);
virtual FX_HMENU CreatePopupMenu() {return NULL;}
- virtual FX_BOOL AppendMenuItem(FX_HMENU hMenu, FX_INT32 nIDNewItem, CFX_WideString string) {return FALSE;}
- virtual FX_BOOL EnableMenuItem(FX_HMENU hMenu, FX_INT32 nIDItem, FX_BOOL bEnabled) {return FALSE;}
- virtual FX_INT32 TrackPopupMenu(FX_HMENU hMenu, FX_INT32 x, FX_INT32 y, FX_HWND hParent) {return -1;}
+ virtual FX_BOOL AppendMenuItem(FX_HMENU hMenu, int32_t nIDNewItem, CFX_WideString string) {return FALSE;}
+ virtual FX_BOOL EnableMenuItem(FX_HMENU hMenu, int32_t nIDItem, FX_BOOL bEnabled) {return FALSE;}
+ virtual int32_t TrackPopupMenu(FX_HMENU hMenu, int32_t x, int32_t y, FX_HWND hParent) {return -1;}
virtual void DestroyMenu(FX_HMENU hMenu) {}
- virtual CFX_ByteString GetNativeTrueTypeFont(FX_INT32 nCharset);
- virtual FX_BOOL FindNativeTrueTypeFont(FX_INT32 nCharset, CFX_ByteString sFontFaceName);
- virtual CPDF_Font* AddNativeTrueTypeFontToPDF(CPDF_Document* pDoc, CFX_ByteString sFontFaceName, FX_BYTE nCharset);
+ virtual CFX_ByteString GetNativeTrueTypeFont(int32_t nCharset);
+ virtual FX_BOOL FindNativeTrueTypeFont(int32_t nCharset, CFX_ByteString sFontFaceName);
+ virtual CPDF_Font* AddNativeTrueTypeFontToPDF(CPDF_Document* pDoc, CFX_ByteString sFontFaceName, uint8_t nCharset);
- virtual FX_INT32 SetTimer(FX_INT32 uElapse, TimerCallback lpTimerFunc) ;
- virtual void KillTimer(FX_INT32 nID) ;
+ virtual int32_t SetTimer(int32_t uElapse, TimerCallback lpTimerFunc) ;
+ virtual void KillTimer(int32_t nID) ;
virtual FX_BOOL IsSHIFTKeyDown(FX_DWORD nFlag) {return m_pEnv->FFI_IsSHIFTKeyDown(nFlag);}
@@ -64,14 +64,14 @@ public:
virtual FX_SYSTEMTIME GetLocalTime();
- virtual FX_INT32 GetCharSet() {return m_nCharSet;}
- virtual void SetCharSet(FX_INT32 nCharSet) {m_nCharSet = nCharSet;}
+ virtual int32_t GetCharSet() {return m_nCharSet;}
+ virtual void SetCharSet(int32_t nCharSet) {m_nCharSet = nCharSet;}
private:
CPDFDoc_Environment* m_pEnv;
int m_nCharSet;
};
-void CFX_SystemHandler::SetCursor(FX_INT32 nCursorType)
+void CFX_SystemHandler::SetCursor(int32_t nCursorType)
{
m_pEnv->FFI_SetCursor(nCursorType);
@@ -132,12 +132,12 @@ FX_BOOL CFX_SystemHandler::IsSelectionImplemented()
return FALSE;
}
-CFX_ByteString CFX_SystemHandler::GetNativeTrueTypeFont(FX_INT32 nCharset)
+CFX_ByteString CFX_SystemHandler::GetNativeTrueTypeFont(int32_t nCharset)
{
return "";
}
-FX_BOOL CFX_SystemHandler::FindNativeTrueTypeFont(FX_INT32 nCharset, CFX_ByteString sFontFaceName)
+FX_BOOL CFX_SystemHandler::FindNativeTrueTypeFont(int32_t nCharset, CFX_ByteString sFontFaceName)
{
CFX_FontMgr* pFontMgr = CFX_GEModule::Get()->GetFontMgr();
// FXFT_Face nFace = pFontMgr->FindSubstFont(sFontFaceName,TRUE,0,0,0,0,NULL);
@@ -182,7 +182,7 @@ static int CharSet2CP(int charset)
return 0;
}
CPDF_Font* CFX_SystemHandler::AddNativeTrueTypeFontToPDF(CPDF_Document* pDoc, CFX_ByteString sFontFaceName,
- FX_BYTE nCharset)
+ uint8_t nCharset)
{
if(pDoc)
{
@@ -197,11 +197,11 @@ CPDF_Font* CFX_SystemHandler::AddNativeTrueTypeFontToPDF(CPDF_Document* pDoc, CF
}
-FX_INT32 CFX_SystemHandler::SetTimer(FX_INT32 uElapse, TimerCallback lpTimerFunc)
+int32_t CFX_SystemHandler::SetTimer(int32_t uElapse, TimerCallback lpTimerFunc)
{
return m_pEnv->FFI_SetTimer(uElapse, lpTimerFunc);
}
-void CFX_SystemHandler::KillTimer(FX_INT32 nID)
+void CFX_SystemHandler::KillTimer(int32_t nID)
{
m_pEnv->FFI_KillTimer(nID);
}
diff --git a/fpdfsdk/src/fxedit/fxet_ap.cpp b/fpdfsdk/src/fxedit/fxet_ap.cpp
index 92e5bfc1dd..10a76a7157 100644
--- a/fpdfsdk/src/fxedit/fxet_ap.cpp
+++ b/fpdfsdk/src/fxedit/fxet_ap.cpp
@@ -8,7 +8,7 @@
#include "../../include/fxedit/fx_edit.h"
#include "../../include/fxedit/fxet_edit.h"
-CFX_ByteString GetPDFWordString(IFX_Edit_FontMap * pFontMap, FX_INT32 nFontIndex, FX_WORD Word, FX_WORD SubWord)
+CFX_ByteString GetPDFWordString(IFX_Edit_FontMap * pFontMap, int32_t nFontIndex, FX_WORD Word, FX_WORD SubWord)
{
ASSERT (pFontMap != NULL);
@@ -50,7 +50,7 @@ static CFX_ByteString GetWordRenderString(const CFX_ByteString & strWords)
return "";
}
-static CFX_ByteString GetFontSetString(IFX_Edit_FontMap * pFontMap, FX_INT32 nFontIndex, FX_FLOAT fFontSize)
+static CFX_ByteString GetFontSetString(IFX_Edit_FontMap * pFontMap, int32_t nFontIndex, FX_FLOAT fFontSize)
{
CFX_ByteTextBuf sRet;
@@ -71,7 +71,7 @@ CFX_ByteString IFX_Edit::GetEditAppearanceStream(IFX_Edit* pEdit, const CPDF_Poi
CFX_ByteTextBuf sEditStream, sWords;
CPDF_Point ptOld(0.0f,0.0f),ptNew(0.0f,0.0f);
- FX_INT32 nCurFontIndex = -1;
+ int32_t nCurFontIndex = -1;
if (IFX_Edit_Iterator* pIterator = pEdit->GetIterator())
{
@@ -171,7 +171,7 @@ CFX_ByteString IFX_Edit::GetEditAppearanceStream(IFX_Edit* pEdit, const CPDF_Poi
CFX_ByteTextBuf sAppStream;
if (sEditStream.GetSize() > 0)
{
- FX_INT32 nHorzScale = pEdit->GetHorzScale();
+ int32_t nHorzScale = pEdit->GetHorzScale();
if (nHorzScale != 100)
{
sAppStream << nHorzScale << " Tz\n";
diff --git a/fpdfsdk/src/fxedit/fxet_edit.cpp b/fpdfsdk/src/fxedit/fxet_edit.cpp
index 0015c0f4ed..9415cefbe3 100644
--- a/fpdfsdk/src/fxedit/fxet_edit.cpp
+++ b/fpdfsdk/src/fxedit/fxet_edit.cpp
@@ -105,7 +105,7 @@ FX_BOOL CFX_Edit_Iterator::GetSection(CPVT_Section & section) const
return FALSE;
}
-void CFX_Edit_Iterator::SetAt(FX_INT32 nWordIndex)
+void CFX_Edit_Iterator::SetAt(int32_t nWordIndex)
{
ASSERT(m_pVTIterator != NULL);
@@ -147,7 +147,7 @@ IFX_Edit_FontMap* CFX_Edit_Provider::GetFontMap()
return m_pFontMap;
}
-FX_INT32 CFX_Edit_Provider::GetCharWidth(FX_INT32 nFontIndex, FX_WORD word, FX_INT32 nWordStyle)
+int32_t CFX_Edit_Provider::GetCharWidth(int32_t nFontIndex, FX_WORD word, int32_t nWordStyle)
{
if (CPDF_Font* pPDFFont = m_pFontMap->GetPDFFont(nFontIndex))
{
@@ -165,7 +165,7 @@ FX_INT32 CFX_Edit_Provider::GetCharWidth(FX_INT32 nFontIndex, FX_WORD word, FX_I
return 0;
}
-FX_INT32 CFX_Edit_Provider::GetTypeAscent(FX_INT32 nFontIndex)
+int32_t CFX_Edit_Provider::GetTypeAscent(int32_t nFontIndex)
{
if (CPDF_Font* pPDFFont = m_pFontMap->GetPDFFont(nFontIndex))
return pPDFFont->GetTypeAscent();
@@ -173,7 +173,7 @@ FX_INT32 CFX_Edit_Provider::GetTypeAscent(FX_INT32 nFontIndex)
return 0;
}
-FX_INT32 CFX_Edit_Provider::GetTypeDescent(FX_INT32 nFontIndex)
+int32_t CFX_Edit_Provider::GetTypeDescent(int32_t nFontIndex)
{
if (CPDF_Font* pPDFFont = m_pFontMap->GetPDFFont(nFontIndex))
return pPDFFont->GetTypeDescent();
@@ -181,12 +181,12 @@ FX_INT32 CFX_Edit_Provider::GetTypeDescent(FX_INT32 nFontIndex)
return 0;
}
-FX_INT32 CFX_Edit_Provider::GetWordFontIndex(FX_WORD word, FX_INT32 charset, FX_INT32 nFontIndex)
+int32_t CFX_Edit_Provider::GetWordFontIndex(FX_WORD word, int32_t charset, int32_t nFontIndex)
{
return m_pFontMap->GetWordFontIndex(word,charset,nFontIndex);
}
-FX_INT32 CFX_Edit_Provider::GetDefaultFontIndex()
+int32_t CFX_Edit_Provider::GetDefaultFontIndex()
{
return 0;
}
@@ -220,26 +220,26 @@ void CFX_Edit_Refresh::Push(const CPVT_WordRange & linerange,const CPDF_Rect & r
void CFX_Edit_Refresh::NoAnalyse()
{
{
- for (FX_INT32 i = 0, sz = m_OldLineRects.GetSize(); i < sz; i++)
+ for (int32_t i = 0, sz = m_OldLineRects.GetSize(); i < sz; i++)
if (CFX_Edit_LineRect * pOldRect = m_OldLineRects.GetAt(i))
m_RefreshRects.Add(pOldRect->m_rcLine);
}
{
- for (FX_INT32 i = 0, sz = m_NewLineRects.GetSize(); i < sz; i++)
+ for (int32_t i = 0, sz = m_NewLineRects.GetSize(); i < sz; i++)
if (CFX_Edit_LineRect * pNewRect = m_NewLineRects.GetAt(i))
m_RefreshRects.Add(pNewRect->m_rcLine);
}
}
-void CFX_Edit_Refresh::Analyse(FX_INT32 nAlignment)
+void CFX_Edit_Refresh::Analyse(int32_t nAlignment)
{
FX_BOOL bLineTopChanged = FALSE;
CPDF_Rect rcResult;
FX_FLOAT fWidthDiff;
- FX_INT32 szMax = FX_EDIT_MAX(m_OldLineRects.GetSize(),m_NewLineRects.GetSize());
- FX_INT32 i = 0;
+ int32_t szMax = FX_EDIT_MAX(m_OldLineRects.GetSize(),m_NewLineRects.GetSize());
+ int32_t i = 0;
while (i < szMax)
{
@@ -346,7 +346,7 @@ void CFX_Edit_Refresh::EndRefresh()
/* ------------------------------------- CFX_Edit_Undo ------------------------------------- */
-CFX_Edit_Undo::CFX_Edit_Undo(FX_INT32 nBufsize) : m_nCurUndoPos(0),
+CFX_Edit_Undo::CFX_Edit_Undo(int32_t nBufsize) : m_nCurUndoPos(0),
m_nBufSize(nBufsize),
m_bModified(FALSE),
m_bVirgin(TRUE),
@@ -391,7 +391,7 @@ void CFX_Edit_Undo::Redo()
{
m_bWorking = TRUE;
- FX_INT32 nStackSize = m_UndoItemStack.GetSize();
+ int32_t nStackSize = m_UndoItemStack.GetSize();
if (m_nCurUndoPos < nStackSize)
{
@@ -441,7 +441,7 @@ FX_BOOL CFX_Edit_Undo::IsModified() const
return TRUE;
}
-IFX_Edit_UndoItem* CFX_Edit_Undo::GetItem(FX_INT32 nIndex)
+IFX_Edit_UndoItem* CFX_Edit_Undo::GetItem(int32_t nIndex)
{
if (nIndex>=0 && nIndex < m_UndoItemStack.GetSize())
return m_UndoItemStack.GetAt(nIndex);
@@ -459,7 +459,7 @@ void CFX_Edit_Undo::RemoveHeads()
void CFX_Edit_Undo::RemoveTails()
{
- for (FX_INT32 i = m_UndoItemStack.GetSize()-1; i >= m_nCurUndoPos; i--)
+ for (int32_t i = m_UndoItemStack.GetSize()-1; i >= m_nCurUndoPos; i--)
{
delete m_UndoItemStack.GetAt(i);
m_UndoItemStack.RemoveAt(i);
@@ -468,7 +468,7 @@ void CFX_Edit_Undo::RemoveTails()
void CFX_Edit_Undo::Reset()
{
- for (FX_INT32 i=0, sz=m_UndoItemStack.GetSize(); i < sz; i++)
+ for (int32_t i=0, sz=m_UndoItemStack.GetSize(); i < sz; i++)
{
delete m_UndoItemStack.GetAt(i);
}
@@ -549,7 +549,7 @@ CFX_WideString CFX_Edit_GroupUndoItem::GetUndoTitle()
/* ------------------------------------- CFX_Edit_UndoItem derived classes ------------------------------------- */
CFXEU_InsertWord::CFXEU_InsertWord(CFX_Edit * pEdit, const CPVT_WordPlace & wpOldPlace, const CPVT_WordPlace & wpNewPlace,
- FX_WORD word, FX_INT32 charset, const CPVT_WordProps * pWordProps)
+ FX_WORD word, int32_t charset, const CPVT_WordProps * pWordProps)
: m_pEdit(pEdit), m_wpOld(wpOldPlace), m_wpNew(wpNewPlace), m_Word(word), m_nCharset(charset), m_WordProps()
{
if (pWordProps)
@@ -624,7 +624,7 @@ void CFXEU_InsertReturn::Undo()
//CFXEU_Backspace
CFXEU_Backspace::CFXEU_Backspace(CFX_Edit * pEdit, const CPVT_WordPlace & wpOldPlace, const CPVT_WordPlace & wpNewPlace,
- FX_WORD word, FX_INT32 charset,
+ FX_WORD word, int32_t charset,
const CPVT_SecProps & SecProps, const CPVT_WordProps & WordProps) :
m_pEdit(pEdit),
m_wpOld(wpOldPlace),
@@ -671,7 +671,7 @@ void CFXEU_Backspace::Undo()
//CFXEU_Delete
CFXEU_Delete::CFXEU_Delete(CFX_Edit * pEdit, const CPVT_WordPlace & wpOldPlace, const CPVT_WordPlace & wpNewPlace,
- FX_WORD word, FX_INT32 charset,
+ FX_WORD word, int32_t charset,
const CPVT_SecProps & SecProps, const CPVT_WordProps & WordProps, FX_BOOL bSecEnd) :
m_pEdit(pEdit),
m_wpOld(wpOldPlace),
@@ -754,7 +754,7 @@ void CFXEU_Clear::Undo()
//CFXEU_ClearRich
CFXEU_ClearRich::CFXEU_ClearRich(CFX_Edit * pEdit, const CPVT_WordPlace & wpOldPlace, const CPVT_WordPlace & wpNewPlace,
- const CPVT_WordRange & wrSel, FX_WORD word, FX_INT32 charset,
+ const CPVT_WordRange & wrSel, FX_WORD word, int32_t charset,
const CPVT_SecProps & SecProps, const CPVT_WordProps & WordProps) :
m_pEdit(pEdit),
m_wpOld(wpOldPlace),
@@ -807,7 +807,7 @@ void CFXEU_ClearRich::Undo()
//CFXEU_InsertText
CFXEU_InsertText::CFXEU_InsertText(CFX_Edit * pEdit, const CPVT_WordPlace & wpOldPlace, const CPVT_WordPlace & wpNewPlace,
- const CFX_WideString & swText, FX_INT32 charset,
+ const CFX_WideString & swText, int32_t charset,
const CPVT_SecProps * pSecProps, const CPVT_WordProps * pWordProps) :
m_pEdit(pEdit),
m_wpOld(wpOldPlace),
@@ -1046,13 +1046,13 @@ void CFX_Edit::SetPlateRect(const CPDF_Rect & rect, FX_BOOL bPaint/* = TRUE*/)
if (bPaint) Paint();
}
-void CFX_Edit::SetAlignmentH(FX_INT32 nFormat/* =0 */, FX_BOOL bPaint/* = TRUE*/)
+void CFX_Edit::SetAlignmentH(int32_t nFormat/* =0 */, FX_BOOL bPaint/* = TRUE*/)
{
m_pVT->SetAlignment(nFormat);
if (bPaint) Paint();
}
-void CFX_Edit::SetAlignmentV(FX_INT32 nFormat/* =0 */, FX_BOOL bPaint/* = TRUE*/)
+void CFX_Edit::SetAlignmentV(int32_t nFormat/* =0 */, FX_BOOL bPaint/* = TRUE*/)
{
m_nAlignment = nFormat;
if (bPaint) Paint();
@@ -1064,13 +1064,13 @@ void CFX_Edit::SetPasswordChar(FX_WORD wSubWord/* ='*' */, FX_BOOL bPaint/* = TR
if (bPaint) Paint();
}
-void CFX_Edit::SetLimitChar(FX_INT32 nLimitChar/* =0 */, FX_BOOL bPaint/* = TRUE*/)
+void CFX_Edit::SetLimitChar(int32_t nLimitChar/* =0 */, FX_BOOL bPaint/* = TRUE*/)
{
m_pVT->SetLimitChar(nLimitChar);
if (bPaint) Paint();
}
-void CFX_Edit::SetCharArray(FX_INT32 nCharArray/* =0 */, FX_BOOL bPaint/* = TRUE*/)
+void CFX_Edit::SetCharArray(int32_t nCharArray/* =0 */, FX_BOOL bPaint/* = TRUE*/)
{
m_pVT->SetCharArray(nCharArray);
if (bPaint) Paint();
@@ -1082,7 +1082,7 @@ void CFX_Edit::SetCharSpace(FX_FLOAT fCharSpace/* =0.0f */, FX_BOOL bPaint/* = T
if (bPaint) Paint();
}
-void CFX_Edit::SetHorzScale(FX_INT32 nHorzScale/* =100 */, FX_BOOL bPaint/* = TRUE*/)
+void CFX_Edit::SetHorzScale(int32_t nHorzScale/* =100 */, FX_BOOL bPaint/* = TRUE*/)
{
m_pVT->SetHorzScale(nHorzScale);
if (bPaint) Paint();
@@ -1130,7 +1130,7 @@ void CFX_Edit::SetTextOverflow(FX_BOOL bAllowed /*= FALSE*/, FX_BOOL bPaint/* =
if (bPaint) Paint();
}
-void CFX_Edit::SetSel(FX_INT32 nStartChar,FX_INT32 nEndChar)
+void CFX_Edit::SetSel(int32_t nStartChar,int32_t nEndChar)
{
if (m_pVT->IsValid())
{
@@ -1181,7 +1181,7 @@ void CFX_Edit::SetSel(const CPVT_WordPlace & begin,const CPVT_WordPlace & end)
}
}
-void CFX_Edit::GetSel(FX_INT32 & nStartChar, FX_INT32 & nEndChar) const
+void CFX_Edit::GetSel(int32_t & nStartChar, int32_t & nEndChar) const
{
nStartChar = -1;
nEndChar = -1;
@@ -1209,7 +1209,7 @@ void CFX_Edit::GetSel(FX_INT32 & nStartChar, FX_INT32 & nEndChar) const
}
}
-FX_INT32 CFX_Edit::GetCaret() const
+int32_t CFX_Edit::GetCaret() const
{
if (m_pVT->IsValid())
return m_pVT->WordPlaceToWordIndex(m_wpCaret);
@@ -1319,14 +1319,14 @@ CFX_WideString CFX_Edit::GetSelText() const
return GetRangeText(m_SelState.ConvertToWordRange());
}
-FX_INT32 CFX_Edit::GetTotalWords() const
+int32_t CFX_Edit::GetTotalWords() const
{
return m_pVT->GetTotalWords();
}
-FX_INT32 CFX_Edit::GetTotalLines() const
+int32_t CFX_Edit::GetTotalLines() const
{
- FX_INT32 nLines = 0;
+ int32_t nLines = 0;
if (IPDF_VariableText_Iterator * pIterator = m_pVT->GetIterator())
{
@@ -1379,7 +1379,7 @@ void CFX_Edit::SetRichText(FX_BOOL bRichText/* =TRUE */, FX_BOOL bPaint/* = TRUE
if (bPaint) Paint();
}
-FX_BOOL CFX_Edit::SetRichFontIndex(FX_INT32 nFontIndex)
+FX_BOOL CFX_Edit::SetRichFontIndex(int32_t nFontIndex)
{
CPVT_WordProps WordProps;
WordProps.nFontIndex = nFontIndex;
@@ -1400,7 +1400,7 @@ FX_BOOL CFX_Edit::SetRichTextColor(FX_COLORREF dwColor)
return SetRichTextProps(EP_WORDCOLOR,NULL,&WordProps);
}
-FX_BOOL CFX_Edit::SetRichTextScript(FX_INT32 nScriptType)
+FX_BOOL CFX_Edit::SetRichTextScript(int32_t nScriptType)
{
CPVT_WordProps WordProps;
WordProps.nScriptType = nScriptType;
@@ -1446,7 +1446,7 @@ FX_BOOL CFX_Edit::SetRichTextCharSpace(FX_FLOAT fCharSpace)
return SetRichTextProps(EP_CHARSPACE,NULL,&WordProps);
}
-FX_BOOL CFX_Edit::SetRichTextHorzScale(FX_INT32 nHorzScale /*= 100*/)
+FX_BOOL CFX_Edit::SetRichTextHorzScale(int32_t nHorzScale /*= 100*/)
{
CPVT_WordProps WordProps;
WordProps.nHorzScale = nHorzScale;
@@ -1467,7 +1467,7 @@ FX_BOOL CFX_Edit::SetRichTextLineIndent(FX_FLOAT fLineIndent)
return SetRichTextProps(EP_LINEINDENT,&SecProps,NULL);
}
-FX_BOOL CFX_Edit::SetRichTextAlignment(FX_INT32 nAlignment)
+FX_BOOL CFX_Edit::SetRichTextAlignment(int32_t nAlignment)
{
CPVT_SecProps SecProps;
SecProps.nAlignment = nAlignment;
@@ -1921,13 +1921,13 @@ FX_BOOL CFX_Edit::SetWordProps(EDIT_PROPS_E eProps, const CPVT_WordPlace & place
return FALSE;
}
-void CFX_Edit::SetText(FX_LPCWSTR text,FX_INT32 charset /*= DEFAULT_CHARSET*/,
+void CFX_Edit::SetText(FX_LPCWSTR text,int32_t charset /*= DEFAULT_CHARSET*/,
const CPVT_SecProps * pSecProps /*= NULL*/,const CPVT_WordProps * pWordProps /*= NULL*/)
{
SetText(text,charset,pSecProps,pWordProps,TRUE,TRUE);
}
-FX_BOOL CFX_Edit::InsertWord(FX_WORD word, FX_INT32 charset /*= DEFAULT_CHARSET*/, const CPVT_WordProps * pWordProps /*= NULL*/)
+FX_BOOL CFX_Edit::InsertWord(FX_WORD word, int32_t charset /*= DEFAULT_CHARSET*/, const CPVT_WordProps * pWordProps /*= NULL*/)
{
return InsertWord(word,charset,pWordProps,TRUE,TRUE);
}
@@ -1952,7 +1952,7 @@ FX_BOOL CFX_Edit::Clear()
return Clear(TRUE,TRUE);
}
-FX_BOOL CFX_Edit::InsertText(FX_LPCWSTR text, FX_INT32 charset /*= DEFAULT_CHARSET*/,
+FX_BOOL CFX_Edit::InsertText(FX_LPCWSTR text, int32_t charset /*= DEFAULT_CHARSET*/,
const CPVT_SecProps * pSecProps /*= NULL*/,const CPVT_WordProps * pWordProps /*= NULL*/)
{
return InsertText(text,charset,pSecProps,pWordProps,TRUE,TRUE);
@@ -1968,7 +1968,7 @@ FX_WORD CFX_Edit::GetPasswordChar() const
return m_pVT->GetPasswordChar();
}
-FX_INT32 CFX_Edit::GetCharArray() const
+int32_t CFX_Edit::GetCharArray() const
{
return m_pVT->GetCharArray();
}
@@ -1983,7 +1983,7 @@ CPDF_Rect CFX_Edit::GetContentRect() const
return VTToEdit(m_pVT->GetContentRect());
}
-FX_INT32 CFX_Edit::GetHorzScale() const
+int32_t CFX_Edit::GetHorzScale() const
{
return m_pVT->GetHorzScale();
}
@@ -2413,7 +2413,7 @@ void CFX_Edit::Refresh(REFRESH_PLAN_E ePlan,const CPVT_WordRange * pRange1,const
m_bNotifyFlag = TRUE;
if (const CFX_Edit_RectArray * pRects = m_Refresh.GetRefreshRects())
{
- for (FX_INT32 i = 0, sz = pRects->GetSize(); i < sz; i++)
+ for (int32_t i = 0, sz = pRects->GetSize(); i < sz; i++)
m_pNotify->IOnInvalidateRect(pRects->GetAt(i));
}
m_bNotifyFlag = FALSE;
@@ -2647,7 +2647,7 @@ void CFX_Edit::SetCaretChange()
}
}
-void CFX_Edit::SetCaret(FX_INT32 nPos)
+void CFX_Edit::SetCaret(int32_t nPos)
{
if (m_pVT->IsValid())
{
@@ -2962,7 +2962,7 @@ void CFX_Edit::OnVK_END(FX_BOOL bShift,FX_BOOL bCtrl)
}
}
-void CFX_Edit::SetText(FX_LPCWSTR text,FX_INT32 charset,
+void CFX_Edit::SetText(FX_LPCWSTR text,int32_t charset,
const CPVT_SecProps * pSecProps,const CPVT_WordProps * pWordProps, FX_BOOL bAddUndo, FX_BOOL bPaint)
{
Empty();
@@ -2973,7 +2973,7 @@ void CFX_Edit::SetText(FX_LPCWSTR text,FX_INT32 charset,
//if (bAddUndo)
}
-FX_BOOL CFX_Edit::InsertWord(FX_WORD word, FX_INT32 charset, const CPVT_WordProps * pWordProps, FX_BOOL bAddUndo, FX_BOOL bPaint)
+FX_BOOL CFX_Edit::InsertWord(FX_WORD word, int32_t charset, const CPVT_WordProps * pWordProps, FX_BOOL bAddUndo, FX_BOOL bPaint)
{
if (IsTextOverflow()) return FALSE;
@@ -3264,7 +3264,7 @@ FX_BOOL CFX_Edit::Clear(FX_BOOL bAddUndo, FX_BOOL bPaint)
return FALSE;
}
-FX_BOOL CFX_Edit::InsertText(FX_LPCWSTR text, FX_INT32 charset,
+FX_BOOL CFX_Edit::InsertText(FX_LPCWSTR text, int32_t charset,
const CPVT_SecProps * pSecProps, const CPVT_WordProps * pWordProps, FX_BOOL bAddUndo, FX_BOOL bPaint)
{
if (IsTextOverflow()) return FALSE;
@@ -3360,7 +3360,7 @@ void CFX_Edit::SetCaretOrigin()
}
}
-FX_INT32 CFX_Edit::WordPlaceToWordIndex(const CPVT_WordPlace & place) const
+int32_t CFX_Edit::WordPlaceToWordIndex(const CPVT_WordPlace & place) const
{
if (m_pVT->IsValid())
return m_pVT->WordPlaceToWordIndex(place);
@@ -3368,7 +3368,7 @@ FX_INT32 CFX_Edit::WordPlaceToWordIndex(const CPVT_WordPlace & place) const
return -1;
}
-CPVT_WordPlace CFX_Edit::WordIndexToWordPlace(FX_INT32 index) const
+CPVT_WordPlace CFX_Edit::WordIndexToWordPlace(int32_t index) const
{
if (m_pVT->IsValid())
return m_pVT->WordIndexToWordPlace(index);
@@ -3378,9 +3378,9 @@ CPVT_WordPlace CFX_Edit::WordIndexToWordPlace(FX_INT32 index) const
FX_BOOL CFX_Edit::IsTextFull() const
{
- FX_INT32 nTotalWords = m_pVT->GetTotalWords();
- FX_INT32 nLimitChar = m_pVT->GetLimitChar();
- FX_INT32 nCharArray = m_pVT->GetCharArray();
+ int32_t nTotalWords = m_pVT->GetTotalWords();
+ int32_t nLimitChar = m_pVT->GetLimitChar();
+ int32_t nCharArray = m_pVT->GetCharArray();
return IsTextOverflow() || (nLimitChar>0 && nTotalWords >= nLimitChar)
|| (nCharArray>0 && nTotalWords >= nCharArray);
@@ -3510,7 +3510,7 @@ FX_FLOAT CFX_Edit::GetLineBottom(const CPVT_WordPlace& place) const
return 0.0f;
}
-CPVT_WordPlace CFX_Edit::DoInsertText(const CPVT_WordPlace& place, FX_LPCWSTR text, FX_INT32 charset,
+CPVT_WordPlace CFX_Edit::DoInsertText(const CPVT_WordPlace& place, FX_LPCWSTR text, int32_t charset,
const CPVT_SecProps * pSecProps, const CPVT_WordProps * pWordProps)
{
CPVT_WordPlace wp = place;
@@ -3519,7 +3519,7 @@ CPVT_WordPlace CFX_Edit::DoInsertText(const CPVT_WordPlace& place, FX_LPCWSTR te
{
CFX_WideString sText = text;
- for (FX_INT32 i = 0, sz = sText.GetLength(); i < sz; i++)
+ for (int32_t i = 0, sz = sText.GetLength(); i < sz; i++)
{
FX_WORD word = sText[i];
switch (word)
@@ -3546,7 +3546,7 @@ CPVT_WordPlace CFX_Edit::DoInsertText(const CPVT_WordPlace& place, FX_LPCWSTR te
return wp;
}
-FX_INT32 CFX_Edit::GetCharSetFromUnicode(FX_WORD word, FX_INT32 nOldCharset)
+int32_t CFX_Edit::GetCharSetFromUnicode(FX_WORD word, int32_t nOldCharset)
{
if (IFX_Edit_FontMap* pFontMap = this->GetFontMap())
return pFontMap->CharSetFromUnicode(word, nOldCharset);
diff --git a/fpdfsdk/src/fxedit/fxet_list.cpp b/fpdfsdk/src/fxedit/fxet_list.cpp
index 64ed694d12..03b23020b4 100644
--- a/fpdfsdk/src/fxedit/fxet_list.cpp
+++ b/fpdfsdk/src/fxedit/fxet_list.cpp
@@ -130,7 +130,7 @@ CFX_List::~CFX_List()
void CFX_List::Empty()
{
- for (FX_INT32 i=0,sz=m_aListItems.GetSize(); i<sz; i++)
+ for (int32_t i=0,sz=m_aListItems.GetSize(); i<sz; i++)
delete m_aListItems.GetAt(i);
m_aListItems.RemoveAll();
@@ -157,14 +157,14 @@ void CFX_List::AddItem(FX_LPCWSTR str)
}
}
-void CFX_List::ReArrange(FX_INT32 nItemIndex)
+void CFX_List::ReArrange(int32_t nItemIndex)
{
FX_FLOAT fPosY = 0.0f;
if (CFX_ListItem * pPrevItem = m_aListItems.GetAt(nItemIndex - 1))
fPosY = pPrevItem->GetRect().bottom;
- for (FX_INT32 i=nItemIndex,sz=m_aListItems.GetSize(); i<sz; i++)
+ for (int32_t i=nItemIndex,sz=m_aListItems.GetSize(); i<sz; i++)
{
if (CFX_ListItem * pListItem = m_aListItems.GetAt(i))
{
@@ -177,7 +177,7 @@ void CFX_List::ReArrange(FX_INT32 nItemIndex)
SetContentRect(CLST_Rect(0.0f,0.0f,0.0f,fPosY));
}
-IFX_Edit * CFX_List::GetItemEdit(FX_INT32 nIndex) const
+IFX_Edit * CFX_List::GetItemEdit(int32_t nIndex) const
{
if (CFX_ListItem * pListItem = m_aListItems.GetAt(nIndex))
{
@@ -187,7 +187,7 @@ IFX_Edit * CFX_List::GetItemEdit(FX_INT32 nIndex) const
return NULL;
}
-FX_INT32 CFX_List::GetCount() const
+int32_t CFX_List::GetCount() const
{
return m_aListItems.GetSize();
}
@@ -207,14 +207,14 @@ FX_FLOAT CFX_List::GetFontSize() const
return m_fFontSize;
}
-FX_INT32 CFX_List::GetItemIndex(const CPDF_Point & point) const
+int32_t CFX_List::GetItemIndex(const CPDF_Point & point) const
{
CPDF_Point pt = OuterToInner(point);
FX_BOOL bFirst = TRUE;
FX_BOOL bLast = TRUE;
- for (FX_INT32 i=0,sz=m_aListItems.GetSize(); i<sz; i++)
+ for (int32_t i=0,sz=m_aListItems.GetSize(); i<sz; i++)
{
if (CFX_ListItem * pListItem = m_aListItems.GetAt(i))
{
@@ -253,9 +253,9 @@ FX_FLOAT CFX_List::GetFirstHeight() const
return 1.0f;
}
-FX_INT32 CFX_List::GetFirstSelected() const
+int32_t CFX_List::GetFirstSelected() const
{
- for (FX_INT32 i=0,sz=m_aListItems.GetSize(); i<sz; i++)
+ for (int32_t i=0,sz=m_aListItems.GetSize(); i<sz; i++)
{
if (CFX_ListItem * pListItem = m_aListItems.GetAt(i))
{
@@ -266,9 +266,9 @@ FX_INT32 CFX_List::GetFirstSelected() const
return -1;
}
-FX_INT32 CFX_List::GetLastSelected() const
+int32_t CFX_List::GetLastSelected() const
{
- for (FX_INT32 i=m_aListItems.GetSize()-1; i>=0; i--)
+ for (int32_t i=m_aListItems.GetSize()-1; i>=0; i--)
{
if (CFX_ListItem * pListItem = m_aListItems.GetAt(i))
{
@@ -286,11 +286,11 @@ FX_WCHAR CFX_List::Toupper(FX_WCHAR c) const
return c;
}
-FX_INT32 CFX_List::FindNext(FX_INT32 nIndex,FX_WCHAR nChar) const
+int32_t CFX_List::FindNext(int32_t nIndex,FX_WCHAR nChar) const
{
- FX_INT32 nCircleIndex = nIndex;
+ int32_t nCircleIndex = nIndex;
- for (FX_INT32 i=0,sz=m_aListItems.GetSize(); i<sz; i++)
+ for (int32_t i=0,sz=m_aListItems.GetSize(); i<sz; i++)
{
nCircleIndex ++;
if (nCircleIndex >= sz) nCircleIndex = 0;
@@ -305,7 +305,7 @@ FX_INT32 CFX_List::FindNext(FX_INT32 nIndex,FX_WCHAR nChar) const
return nCircleIndex;
}
-CPDF_Rect CFX_List::GetItemRect(FX_INT32 nIndex) const
+CPDF_Rect CFX_List::GetItemRect(int32_t nIndex) const
{
if (CFX_ListItem * pListItem = m_aListItems.GetAt(nIndex))
{
@@ -318,7 +318,7 @@ CPDF_Rect CFX_List::GetItemRect(FX_INT32 nIndex) const
return CPDF_Rect();
}
-FX_BOOL CFX_List::IsItemSelected(FX_INT32 nIndex) const
+FX_BOOL CFX_List::IsItemSelected(int32_t nIndex) const
{
if (CFX_ListItem * pListItem = m_aListItems.GetAt(nIndex))
{
@@ -328,7 +328,7 @@ FX_BOOL CFX_List::IsItemSelected(FX_INT32 nIndex) const
return FALSE;
}
-void CFX_List::SetItemSelect(FX_INT32 nItemIndex, FX_BOOL bSelected)
+void CFX_List::SetItemSelect(int32_t nItemIndex, FX_BOOL bSelected)
{
if (CFX_ListItem * pListItem = m_aListItems.GetAt(nItemIndex))
{
@@ -336,7 +336,7 @@ void CFX_List::SetItemSelect(FX_INT32 nItemIndex, FX_BOOL bSelected)
}
}
-void CFX_List::SetItemCaret(FX_INT32 nItemIndex, FX_BOOL bCaret)
+void CFX_List::SetItemCaret(int32_t nItemIndex, FX_BOOL bCaret)
{
if (CFX_ListItem * pListItem = m_aListItems.GetAt(nItemIndex))
{
@@ -354,12 +354,12 @@ FX_BOOL CFX_List::IsMultipleSel() const
return m_bMultiple;
}
-FX_BOOL CFX_List::IsValid(FX_INT32 nItemIndex) const
+FX_BOOL CFX_List::IsValid(int32_t nItemIndex) const
{
return nItemIndex >= 0 && nItemIndex < m_aListItems.GetSize();
}
-CFX_WideString CFX_List::GetItemText(FX_INT32 nIndex) const
+CFX_WideString CFX_List::GetItemText(int32_t nIndex) const
{
if (CFX_ListItem * pListItem = m_aListItems.GetAt(nIndex))
{
@@ -377,15 +377,15 @@ CPLST_Select::CPLST_Select()
CPLST_Select::~CPLST_Select()
{
- for (FX_INT32 i=0,sz=m_aItems.GetSize(); i<sz; i++)
+ for (int32_t i=0,sz=m_aItems.GetSize(); i<sz; i++)
delete m_aItems.GetAt(i);
m_aItems.RemoveAll();
}
-void CPLST_Select::Add(FX_INT32 nItemIndex)
+void CPLST_Select::Add(int32_t nItemIndex)
{
- FX_INT32 nIndex = Find(nItemIndex);
+ int32_t nIndex = Find(nItemIndex);
if (nIndex < 0)
m_aItems.Add(new CPLST_Select_Item(nItemIndex,1));
@@ -398,21 +398,21 @@ void CPLST_Select::Add(FX_INT32 nItemIndex)
}
}
-void CPLST_Select::Add(FX_INT32 nBeginIndex, FX_INT32 nEndIndex)
+void CPLST_Select::Add(int32_t nBeginIndex, int32_t nEndIndex)
{
if (nBeginIndex > nEndIndex)
{
- FX_INT32 nTemp = nEndIndex;
+ int32_t nTemp = nEndIndex;
nEndIndex = nBeginIndex;
nBeginIndex = nTemp;
}
- for (FX_INT32 i=nBeginIndex; i<=nEndIndex; i++) Add(i);
+ for (int32_t i=nBeginIndex; i<=nEndIndex; i++) Add(i);
}
-void CPLST_Select::Sub(FX_INT32 nItemIndex)
+void CPLST_Select::Sub(int32_t nItemIndex)
{
- for (FX_INT32 i=m_aItems.GetSize()-1; i>=0; i--)
+ for (int32_t i=m_aItems.GetSize()-1; i>=0; i--)
{
if (CPLST_Select_Item * pItem = m_aItems.GetAt(i))
if (pItem->nItemIndex == nItemIndex)
@@ -420,21 +420,21 @@ void CPLST_Select::Sub(FX_INT32 nItemIndex)
}
}
-void CPLST_Select::Sub(FX_INT32 nBeginIndex, FX_INT32 nEndIndex)
+void CPLST_Select::Sub(int32_t nBeginIndex, int32_t nEndIndex)
{
if (nBeginIndex > nEndIndex)
{
- FX_INT32 nTemp = nEndIndex;
+ int32_t nTemp = nEndIndex;
nEndIndex = nBeginIndex;
nBeginIndex = nTemp;
}
- for (FX_INT32 i=nBeginIndex; i<=nEndIndex; i++) Sub(i);
+ for (int32_t i=nBeginIndex; i<=nEndIndex; i++) Sub(i);
}
-FX_INT32 CPLST_Select::Find(FX_INT32 nItemIndex) const
+int32_t CPLST_Select::Find(int32_t nItemIndex) const
{
- for (FX_INT32 i=0,sz=m_aItems.GetSize(); i<sz; i++)
+ for (int32_t i=0,sz=m_aItems.GetSize(); i<sz; i++)
{
if (CPLST_Select_Item * pItem = m_aItems.GetAt(i))
{
@@ -446,17 +446,17 @@ FX_INT32 CPLST_Select::Find(FX_INT32 nItemIndex) const
return -1;
}
-FX_BOOL CPLST_Select::IsExist(FX_INT32 nItemIndex) const
+FX_BOOL CPLST_Select::IsExist(int32_t nItemIndex) const
{
return Find(nItemIndex) >= 0;
}
-FX_INT32 CPLST_Select::GetCount() const
+int32_t CPLST_Select::GetCount() const
{
return m_aItems.GetSize();
}
-FX_INT32 CPLST_Select::GetItemIndex(FX_INT32 nIndex) const
+int32_t CPLST_Select::GetItemIndex(int32_t nIndex) const
{
if (nIndex >= 0 && nIndex < m_aItems.GetSize())
if (CPLST_Select_Item * pItem = m_aItems.GetAt(nIndex))
@@ -465,7 +465,7 @@ FX_INT32 CPLST_Select::GetItemIndex(FX_INT32 nIndex) const
return -1;
}
-FX_INT32 CPLST_Select::GetState(FX_INT32 nIndex) const
+int32_t CPLST_Select::GetState(int32_t nIndex) const
{
if (nIndex >= 0 && nIndex < m_aItems.GetSize())
if (CPLST_Select_Item * pItem = m_aItems.GetAt(nIndex))
@@ -476,7 +476,7 @@ FX_INT32 CPLST_Select::GetState(FX_INT32 nIndex) const
void CPLST_Select::DeselectAll()
{
- for (FX_INT32 i=0,sz=m_aItems.GetSize(); i<sz; i++)
+ for (int32_t i=0,sz=m_aItems.GetSize(); i<sz; i++)
{
if (CPLST_Select_Item * pItem = m_aItems.GetAt(i))
{
@@ -487,7 +487,7 @@ void CPLST_Select::DeselectAll()
void CPLST_Select::Done()
{
- for (FX_INT32 i=m_aItems.GetSize()-1; i>=0; i--)
+ for (int32_t i=m_aItems.GetSize()-1; i>=0; i--)
{
if (CPLST_Select_Item * pItem = m_aItems.GetAt(i))
{
@@ -559,7 +559,7 @@ CPDF_Rect CFX_ListCtrl::OutToIn(const CPDF_Rect & rect) const
void CFX_ListCtrl::OnMouseDown(const CPDF_Point & point,FX_BOOL bShift,FX_BOOL bCtrl)
{
- FX_INT32 nHitIndex = this->GetItemIndex(point);
+ int32_t nHitIndex = this->GetItemIndex(point);
if (IsMultipleSel())
{
@@ -608,7 +608,7 @@ void CFX_ListCtrl::OnMouseDown(const CPDF_Point & point,FX_BOOL bShift,FX_BOOL b
void CFX_ListCtrl::OnMouseMove(const CPDF_Point & point,FX_BOOL bShift,FX_BOOL bCtrl)
{
- FX_INT32 nHitIndex = this->GetItemIndex(point);
+ int32_t nHitIndex = this->GetItemIndex(point);
if (IsMultipleSel())
{
@@ -639,7 +639,7 @@ void CFX_ListCtrl::OnMouseMove(const CPDF_Point & point,FX_BOOL bShift,FX_BOOL b
this->ScrollToListItem(nHitIndex);
}
-void CFX_ListCtrl::OnVK(FX_INT32 nItemIndex,FX_BOOL bShift,FX_BOOL bCtrl)
+void CFX_ListCtrl::OnVK(int32_t nItemIndex,FX_BOOL bShift,FX_BOOL bCtrl)
{
if (IsMultipleSel())
{
@@ -706,8 +706,8 @@ void CFX_ListCtrl::OnVK_END(FX_BOOL bShift,FX_BOOL bCtrl)
FX_BOOL CFX_ListCtrl::OnChar(FX_WORD nChar,FX_BOOL bShift,FX_BOOL bCtrl)
{
- FX_INT32 nIndex = GetLastSelected();
- FX_INT32 nFindIndex = FindNext(nIndex,nChar);
+ int32_t nIndex = GetLastSelected();
+ int32_t nFindIndex = FindNext(nIndex,nChar);
if (nFindIndex != nIndex)
{
@@ -728,7 +728,7 @@ void CFX_ListCtrl::SetPlateRect(const CPDF_Rect & rect)
InvalidateItem(-1);
}
-CPDF_Rect CFX_ListCtrl::GetItemRect(FX_INT32 nIndex) const
+CPDF_Rect CFX_ListCtrl::GetItemRect(int32_t nIndex) const
{
return InToOut(CFX_List::GetItemRect(nIndex));
}
@@ -739,7 +739,7 @@ void CFX_ListCtrl::AddString(FX_LPCWSTR string)
ReArrange(GetCount() - 1);
}
-void CFX_ListCtrl::SetMultipleSelect(FX_INT32 nItemIndex, FX_BOOL bSelected)
+void CFX_ListCtrl::SetMultipleSelect(int32_t nItemIndex, FX_BOOL bSelected)
{
if (!IsValid(nItemIndex)) return;
@@ -758,7 +758,7 @@ void CFX_ListCtrl::SetMultipleSelect(FX_INT32 nItemIndex, FX_BOOL bSelected)
}
}
-void CFX_ListCtrl::SetSingleSelect(FX_INT32 nItemIndex)
+void CFX_ListCtrl::SetSingleSelect(int32_t nItemIndex)
{
if (!IsValid(nItemIndex)) return;
@@ -776,13 +776,13 @@ void CFX_ListCtrl::SetSingleSelect(FX_INT32 nItemIndex)
}
}
-void CFX_ListCtrl::SetCaret(FX_INT32 nItemIndex)
+void CFX_ListCtrl::SetCaret(int32_t nItemIndex)
{
if (!IsValid(nItemIndex)) return;
if (this->IsMultipleSel())
{
- FX_INT32 nOldIndex = m_nCaretIndex;
+ int32_t nOldIndex = m_nCaretIndex;
if (nOldIndex != nItemIndex)
{
@@ -797,7 +797,7 @@ void CFX_ListCtrl::SetCaret(FX_INT32 nItemIndex)
}
}
-void CFX_ListCtrl::InvalidateItem(FX_INT32 nItemIndex)
+void CFX_ListCtrl::InvalidateItem(int32_t nItemIndex)
{
if (m_pNotify)
{
@@ -831,10 +831,10 @@ void CFX_ListCtrl::InvalidateItem(FX_INT32 nItemIndex)
void CFX_ListCtrl::SelectItems()
{
- for (FX_INT32 i=0,sz=m_aSelItems.GetCount(); i<sz; i++)
+ for (int32_t i=0,sz=m_aSelItems.GetCount(); i<sz; i++)
{
- FX_INT32 nItemIndex = m_aSelItems.GetItemIndex(i);
- FX_INT32 nState = m_aSelItems.GetState(i);
+ int32_t nItemIndex = m_aSelItems.GetItemIndex(i);
+ int32_t nState = m_aSelItems.GetState(i);
switch(nState)
{
@@ -850,7 +850,7 @@ void CFX_ListCtrl::SelectItems()
m_aSelItems.Done();
}
-void CFX_ListCtrl::Select(FX_INT32 nItemIndex)
+void CFX_ListCtrl::Select(int32_t nItemIndex)
{
if (!IsValid(nItemIndex)) return;
@@ -863,7 +863,7 @@ void CFX_ListCtrl::Select(FX_INT32 nItemIndex)
SetSingleSelect(nItemIndex);
}
-FX_BOOL CFX_ListCtrl::IsItemVisible(FX_INT32 nItemIndex) const
+FX_BOOL CFX_ListCtrl::IsItemVisible(int32_t nItemIndex) const
{
CPDF_Rect rcPlate = this->GetPlateRect();
CPDF_Rect rcItem = this->GetItemRect(nItemIndex);
@@ -871,7 +871,7 @@ FX_BOOL CFX_ListCtrl::IsItemVisible(FX_INT32 nItemIndex) const
return rcItem.bottom >= rcPlate.bottom && rcItem.top <= rcPlate.top;
}
-void CFX_ListCtrl::ScrollToListItem(FX_INT32 nItemIndex)
+void CFX_ListCtrl::ScrollToListItem(int32_t nItemIndex)
{
if (!IsValid(nItemIndex)) return;
@@ -960,13 +960,13 @@ CPDF_Rect CFX_ListCtrl::GetContentRect() const
return InToOut(CFX_List::GetContentRect());
}
-void CFX_ListCtrl::ReArrange(FX_INT32 nItemIndex)
+void CFX_ListCtrl::ReArrange(int32_t nItemIndex)
{
CFX_List::ReArrange(nItemIndex);
SetScrollInfo();
}
-void CFX_ListCtrl::SetTopItem(FX_INT32 nIndex)
+void CFX_ListCtrl::SetTopItem(int32_t nIndex)
{
if (IsValid(nIndex))
{
@@ -976,9 +976,9 @@ void CFX_ListCtrl::SetTopItem(FX_INT32 nIndex)
}
}
-FX_INT32 CFX_ListCtrl::GetTopItem() const
+int32_t CFX_ListCtrl::GetTopItem() const
{
- FX_INT32 nItemIndex = this->GetItemIndex(this->GetBTPoint());
+ int32_t nItemIndex = this->GetItemIndex(this->GetBTPoint());
if (!IsItemVisible(nItemIndex) && IsItemVisible(nItemIndex + 1))
nItemIndex += 1;
@@ -997,7 +997,7 @@ void CFX_ListCtrl::Cancel()
m_aSelItems.DeselectAll();
}
-FX_INT32 CFX_ListCtrl::GetItemIndex(const CPDF_Point & point) const
+int32_t CFX_ListCtrl::GetItemIndex(const CPDF_Point & point) const
{
return CFX_List::GetItemIndex(OutToIn(point));
}
diff --git a/fpdfsdk/src/fxedit/fxet_pageobjs.cpp b/fpdfsdk/src/fxedit/fxet_pageobjs.cpp
index 7b64b33ba1..6b597cabb9 100644
--- a/fpdfsdk/src/fxedit/fxet_pageobjs.cpp
+++ b/fpdfsdk/src/fxedit/fxet_pageobjs.cpp
@@ -11,7 +11,7 @@
#define FX_EDIT_UNDERLINEHALFWIDTH 0.5f
#define FX_EDIT_CROSSOUTHALFWIDTH 0.5f
-extern CFX_ByteString GetPDFWordString(IFX_Edit_FontMap * pFontMap, FX_INT32 nFontIndex, FX_WORD Word, FX_WORD SubWord);
+extern CFX_ByteString GetPDFWordString(IFX_Edit_FontMap * pFontMap, int32_t nFontIndex, FX_WORD Word, FX_WORD SubWord);
CPDF_Rect GetUnderLineRect(const CPVT_Word& word)
{
@@ -26,7 +26,7 @@ CPDF_Rect GetCrossoutRect(const CPVT_Word& word)
}
static void DrawTextString(CFX_RenderDevice* pDevice, const CPDF_Point& pt, CPDF_Font* pFont, FX_FLOAT fFontSize, CPDF_Matrix* pUser2Device,
- const CFX_ByteString& str, FX_ARGB crTextFill, FX_ARGB crTextStroke, FX_INT32 nHorzScale)
+ const CFX_ByteString& str, FX_ARGB crTextFill, FX_ARGB crTextStroke, int32_t nHorzScale)
{
FX_FLOAT x = pt.x, y = pt.y;
pUser2Device->Transform(x, y);
@@ -87,10 +87,10 @@ void IFX_Edit::DrawUnderline(CFX_RenderDevice* pDevice, CPDF_Matrix* pUser2Devic
CPDF_Rect rcTemp = rcClip;
pUser2Device->TransformRect(rcTemp);
FX_RECT rcDevClip;
- rcDevClip.left = (FX_INT32)rcTemp.left;
- rcDevClip.right = (FX_INT32)rcTemp.right;
- rcDevClip.top = (FX_INT32)rcTemp.top;
- rcDevClip.bottom = (FX_INT32)rcTemp.bottom;
+ rcDevClip.left = (int32_t)rcTemp.left;
+ rcDevClip.right = (int32_t)rcTemp.right;
+ rcDevClip.top = (int32_t)rcTemp.top;
+ rcDevClip.bottom = (int32_t)rcTemp.bottom;
pDevice->SetClip_Rect(&rcDevClip);
}
@@ -139,7 +139,7 @@ void IFX_Edit::DrawEdit(CFX_RenderDevice* pDevice, CPDF_Matrix* pUser2Device, IF
FX_WORD SubWord = pEdit->GetPasswordChar();
FX_FLOAT fFontSize = pEdit->GetFontSize();
CPVT_WordRange wrSelect = pEdit->GetSelectWordRange();
- FX_INT32 nHorzScale = pEdit->GetHorzScale();
+ int32_t nHorzScale = pEdit->GetHorzScale();
FX_COLORREF crCurFill = crTextFill;
FX_COLORREF crOldFill = crCurFill;
@@ -149,7 +149,7 @@ void IFX_Edit::DrawEdit(CFX_RenderDevice* pDevice, CPDF_Matrix* pUser2Device, IF
const FX_COLORREF crSelBK = ArgbEncode(255,0,51,113);
CFX_ByteTextBuf sTextBuf;
- FX_INT32 nFontIndex = -1;
+ int32_t nFontIndex = -1;
CPDF_Point ptBT(0.0f,0.0f);
pDevice->SaveState();
@@ -159,10 +159,10 @@ void IFX_Edit::DrawEdit(CFX_RenderDevice* pDevice, CPDF_Matrix* pUser2Device, IF
CPDF_Rect rcTemp = rcClip;
pUser2Device->TransformRect(rcTemp);
FX_RECT rcDevClip;
- rcDevClip.left = (FX_INT32)rcTemp.left;
- rcDevClip.right = (FX_INT32)rcTemp.right;
- rcDevClip.top = (FX_INT32)rcTemp.top;
- rcDevClip.bottom = (FX_INT32)rcTemp.bottom;
+ rcDevClip.left = (int32_t)rcTemp.left;
+ rcDevClip.right = (int32_t)rcTemp.right;
+ rcDevClip.top = (int32_t)rcTemp.top;
+ rcDevClip.bottom = (int32_t)rcTemp.bottom;
pDevice->SetClip_Rect(&rcDevClip);
}
@@ -293,10 +293,10 @@ void IFX_Edit::DrawRichEdit(CFX_RenderDevice* pDevice, CPDF_Matrix* pUser2Device
CPDF_Rect rcTemp = rcClip;
pUser2Device->TransformRect(rcTemp);
FX_RECT rcDevClip;
- rcDevClip.left = (FX_INT32)rcTemp.left;
- rcDevClip.right = (FX_INT32)rcTemp.right;
- rcDevClip.top = (FX_INT32)rcTemp.top;
- rcDevClip.bottom = (FX_INT32)rcTemp.bottom;
+ rcDevClip.left = (int32_t)rcTemp.left;
+ rcDevClip.right = (int32_t)rcTemp.right;
+ rcDevClip.top = (int32_t)rcTemp.top;
+ rcDevClip.bottom = (int32_t)rcTemp.bottom;
pDevice->SetClip_Rect(&rcDevClip);
}
@@ -416,7 +416,7 @@ static void AddRectToPageObjects(CPDF_PageObjects* pPageObjs, FX_COLORREF crFill
}
static CPDF_TextObject* AddTextObjToPageObjects(CPDF_PageObjects* pPageObjs, FX_COLORREF crText,
- CPDF_Font* pFont, FX_FLOAT fFontSize, FX_FLOAT fCharSpace, FX_INT32 nHorzScale,
+ CPDF_Font* pFont, FX_FLOAT fFontSize, FX_FLOAT fCharSpace, int32_t nHorzScale,
const CPDF_Point& point, const CFX_ByteString& text)
{
CPDF_TextObject* pTxtObj = new CPDF_TextObject;
@@ -452,7 +452,7 @@ void IFX_Edit::GeneratePageObjects(CPDF_PageObjects* pPageObjects, IFX_Edit* pEd
{
FX_FLOAT fFontSize = pEdit->GetFontSize();
- FX_INT32 nOldFontIndex = -1;
+ int32_t nOldFontIndex = -1;
CFX_ByteTextBuf sTextBuf;
CPDF_Point ptBT(0.0f,0.0f);
diff --git a/fpdfsdk/src/javascript/Document.cpp b/fpdfsdk/src/javascript/Document.cpp
index 6a3d6e1e33..230a4ce49c 100644
--- a/fpdfsdk/src/javascript/Document.cpp
+++ b/fpdfsdk/src/javascript/Document.cpp
@@ -1223,7 +1223,7 @@ FX_BOOL Document::documentFileName(IFXJS_Context* cc, CJS_PropValue& vp, CFX_Wid
return FALSE;
}
CFX_WideString wsFilePath = m_pDocument->GetPath();
- FX_INT32 i = wsFilePath.GetLength() - 1;
+ int32_t i = wsFilePath.GetLength() - 1;
for ( ; i >= 0; i-- )
{
if ( wsFilePath.GetAt( i ) == L'\\' || wsFilePath.GetAt( i ) == L'/' )
diff --git a/fpdfsdk/src/javascript/Field.cpp b/fpdfsdk/src/javascript/Field.cpp
index 7476fa5728..c4936e3799 100644
--- a/fpdfsdk/src/javascript/Field.cpp
+++ b/fpdfsdk/src/javascript/Field.cpp
@@ -597,7 +597,7 @@ FX_BOOL Field::buttonAlignX(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString
FX_FLOAT fLeft,fBottom;
IconFit.GetIconPosition(fLeft,fBottom);
- vp << (FX_INT32)fLeft;
+ vp << (int32_t)fLeft;
}
return TRUE;
@@ -648,7 +648,7 @@ FX_BOOL Field::buttonAlignY(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString
FX_FLOAT fLeft,fBottom;
IconFit.GetIconPosition(fLeft,fBottom);
- vp << (FX_INT32)fBottom;
+ vp << (int32_t)fBottom;
}
return TRUE;
@@ -788,9 +788,9 @@ FX_BOOL Field::buttonScaleHow(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideStri
CPDF_IconFit IconFit = pFormControl->GetIconFit();
if (IconFit.IsProportionalScale())
- vp << (FX_INT32)0;
+ vp << (int32_t)0;
else
- vp << (FX_INT32)1;
+ vp << (int32_t)1;
}
return TRUE;
@@ -841,16 +841,16 @@ FX_BOOL Field::buttonScaleWhen(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideStr
switch (ScaleM)
{
case CPDF_IconFit::Always :
- vp << (FX_INT32) CPDF_IconFit::Always;
+ vp << (int32_t) CPDF_IconFit::Always;
break;
case CPDF_IconFit::Bigger :
- vp << (FX_INT32) CPDF_IconFit::Bigger;
+ vp << (int32_t) CPDF_IconFit::Bigger;
break;
case CPDF_IconFit::Never :
- vp << (FX_INT32) CPDF_IconFit::Never;
+ vp << (int32_t) CPDF_IconFit::Never;
break;
case CPDF_IconFit::Smaller :
- vp << (FX_INT32) CPDF_IconFit::Smaller;
+ vp << (int32_t) CPDF_IconFit::Smaller;
break;
}
}
@@ -901,7 +901,7 @@ FX_BOOL Field::calcOrderIndex(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideStri
CPDF_InterForm* pInterForm = pRDInterForm->GetInterForm();
ASSERT(pInterForm != NULL);
- vp << (FX_INT32)pInterForm->FindFieldInCalculationOrder(pFormField);
+ vp << (int32_t)pInterForm->FindFieldInCalculationOrder(pFormField);
}
return TRUE;
@@ -944,7 +944,7 @@ FX_BOOL Field::charLimit(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& s
if (pFormField->GetFieldType() != FIELDTYPE_TEXTFIELD)
return FALSE;
- vp << (FX_INT32)pFormField->GetMaxLen();
+ vp << (int32_t)pFormField->GetMaxLen();
}
return TRUE;
}
@@ -1141,7 +1141,7 @@ void Field::SetCurrentValueIndices(CPDFSDK_Document* pDocument, const CFX_WideSt
break;
}
- int iSelecting = (FX_INT32)array.GetAt(i);
+ int iSelecting = (int32_t)array.GetAt(i);
if (iSelecting < pFormField->CountOptions() && !pFormField->IsItemSelected(iSelecting))
pFormField->SetItemSelection(iSelecting, TRUE);
@@ -1365,7 +1365,7 @@ FX_BOOL Field::display(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sEr
if (ANNOTFLAG_INVISIBLE & dwFlag || ANNOTFLAG_HIDDEN & dwFlag)
{
- vp << (FX_INT32)1;
+ vp << (int32_t)1;
}
else
{
@@ -1373,16 +1373,16 @@ FX_BOOL Field::display(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sEr
{
if (ANNOTFLAG_NOVIEW & dwFlag)
{
- vp << (FX_INT32)3;
+ vp << (int32_t)3;
}
else
{
- vp << (FX_INT32)0;
+ vp << (int32_t)0;
}
}
else
{
- vp << (FX_INT32)2;
+ vp << (int32_t)2;
}
}
}
@@ -1932,7 +1932,7 @@ FX_BOOL Field::lineWidth(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& s
CPDFSDK_Widget* pWidget = pInterForm->GetWidget(pFormField->GetControl(0));
if (!pWidget) return FALSE;
- vp << (FX_INT32)pWidget->GetBorderWidth();
+ vp << (int32_t)pWidget->GetBorderWidth();
}
return TRUE;
@@ -2110,7 +2110,7 @@ FX_BOOL Field::numItems(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sE
if (!vp.IsGetting()) return FALSE;
- vp << (FX_INT32)pFormField->CountOptions();
+ vp << (int32_t)pFormField->CountOptions();
return TRUE;
}
@@ -2147,14 +2147,14 @@ FX_BOOL Field::page(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError
if(!pPageView)
return FALSE;
- PageArray.SetElement(i, CJS_Value(m_isolate,(FX_INT32)pPageView->GetPageIndex()));
+ PageArray.SetElement(i, CJS_Value(m_isolate,(int32_t)pPageView->GetPageIndex()));
}
vp << PageArray;
}
else
{
- vp << (FX_INT32) -1;
+ vp << (int32_t) -1;
}
return TRUE;
@@ -2407,10 +2407,10 @@ FX_BOOL Field::rect(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError
CFX_FloatRect crRect = pWidget->GetRect();
CJS_Value Upper_Leftx(m_isolate),Upper_Lefty(m_isolate),Lower_Rightx(m_isolate),Lower_Righty(m_isolate);
- Upper_Leftx = (FX_INT32)crRect.left;
- Upper_Lefty = (FX_INT32)crRect.top;
- Lower_Rightx = (FX_INT32)crRect.right;
- Lower_Righty = (FX_INT32)crRect.bottom;
+ Upper_Leftx = (int32_t)crRect.left;
+ Upper_Lefty = (int32_t)crRect.top;
+ Lower_Rightx = (int32_t)crRect.right;
+ Lower_Righty = (int32_t)crRect.bottom;
CJS_Array rcArray(m_isolate);
rcArray.SetElement(0,Upper_Leftx);
@@ -2643,7 +2643,7 @@ FX_BOOL Field::rotation(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sE
CPDF_FormControl* pFormControl = GetSmartFieldControl(pFormField);
if (!pFormControl)return FALSE;
- vp << (FX_INT32)pFormControl->GetRotation();
+ vp << (int32_t)pFormControl->GetRotation();
}
return TRUE;
@@ -2850,7 +2850,7 @@ FX_BOOL Field::textColor(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& s
FX_ARGB color;
CPDF_DefaultAppearance FieldAppearance = pFormControl->GetDefaultAppearance();
FieldAppearance.GetColor(color, iColorType);
- FX_INT32 a,r,g,b;
+ int32_t a,r,g,b;
ArgbDecode(color, a, r, g, b);
CPWL_Color crRet = CPWL_Color(COLORTYPE_RGB, r / 255.0f,
@@ -3791,7 +3791,7 @@ FX_BOOL Field::setFocus(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Val
CPDF_FormField* pFormField = (CPDF_FormField*)FieldArray.ElementAt(0);
ASSERT(pFormField != NULL);
- FX_INT32 nCount = pFormField->CountControls();
+ int32_t nCount = pFormField->CountControls();
if (nCount < 1) return FALSE;
@@ -3812,7 +3812,7 @@ FX_BOOL Field::setFocus(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Val
return FALSE;
if (CPDFSDK_PageView* pCurPageView = m_pDocument->GetPageView(pPage))
{
- for (FX_INT32 i=0; i<nCount; i++)
+ for (int32_t i=0; i<nCount; i++)
{
if (CPDFSDK_Widget* pTempWidget = pInterForm->GetWidget(pFormField->GetControl(i)))
{
@@ -3886,7 +3886,7 @@ FX_BOOL Field::source(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sErr
/////////////////////////////////////////// delay /////////////////////////////////////////////
-void Field::AddDelay_Int(enum FIELD_PROP prop, FX_INT32 n)
+void Field::AddDelay_Int(enum FIELD_PROP prop, int32_t n)
{
ASSERT(m_pJSDoc != NULL);
diff --git a/fpdfsdk/src/javascript/JS_GlobalData.cpp b/fpdfsdk/src/javascript/JS_GlobalData.cpp
index b4e4a5b108..450c7a1338 100644
--- a/fpdfsdk/src/javascript/JS_GlobalData.cpp
+++ b/fpdfsdk/src/javascript/JS_GlobalData.cpp
@@ -105,7 +105,7 @@ void CJS_GlobalVariableArray::Empty()
#define PHANTOM_JS_GLOBALDATA_FILENAME L"Phantom_JsGlobal.Data"
#define SDK_JS_GLOBALDATA_FILENAME L"SDK_JsGlobal.Data"
-static const FX_BYTE JS_RC4KEY[] = {0x19,0xa8,0xe8,0x01,0xf6,0xa8,0xb6,0x4d,0x82,0x04,
+static const uint8_t JS_RC4KEY[] = {0x19,0xa8,0xe8,0x01,0xf6,0xa8,0xb6,0x4d,0x82,0x04,
0x45,0x6d,0xb4,0xcf,0xd7,0x77,0x67,0xf9,0x75,0x9f,
0xf0,0xe0,0x1e,0x51,0xee,0x46,0xfd,0x0b,0xc9,0x93,
0x25,0x55,0x4a,0xee,0xe0,0x16,0xd0,0xdf,0x8c,0xfa,
@@ -338,7 +338,7 @@ FX_BOOL CJS_GlobalData::DeleteGlobalVariable(FX_LPCSTR propname)
return FALSE;
}
-FX_INT32 CJS_GlobalData::GetSize() const
+int32_t CJS_GlobalData::GetSize() const
{
return m_arrayGlobalData.GetSize();
}
@@ -351,7 +351,7 @@ CJS_GlobalData_Element* CJS_GlobalData::GetAt(int index) const
void CJS_GlobalData::LoadGlobalPersistentVariables()
{
FX_LPBYTE pBuffer = NULL;
- FX_INT32 nLength = 0;
+ int32_t nLength = 0;
LoadFileBuffer(m_sFilePath.c_str(), pBuffer, nLength);
CRYPT_ArcFourCryptBlock(pBuffer, nLength, JS_RC4KEY, sizeof(JS_RC4KEY));
@@ -379,7 +379,7 @@ void CJS_GlobalData::LoadGlobalPersistentVariables()
if (dwSize == nLength - sizeof(FX_WORD) * 2 - sizeof(FX_DWORD)* 2)
{
- for (FX_INT32 i=0,sz=dwCount; i<sz; i++)
+ for (int32_t i=0,sz=dwCount; i<sz; i++)
{
if (p > pBuffer + nLength)
break;
@@ -511,12 +511,12 @@ void CJS_GlobalData::SaveGlobalPersisitentVariables()
WriteFileBuffer(m_sFilePath.c_str(), (FX_LPCSTR)sFile.GetBuffer(), sFile.GetSize());
}
-void CJS_GlobalData::LoadFileBuffer(FX_LPCWSTR sFilePath, FX_LPBYTE& pBuffer, FX_INT32& nLength)
+void CJS_GlobalData::LoadFileBuffer(FX_LPCWSTR sFilePath, FX_LPBYTE& pBuffer, int32_t& nLength)
{
//UnSupport.
}
-void CJS_GlobalData::WriteFileBuffer(FX_LPCWSTR sFilePath, FX_LPCSTR pBuffer, FX_INT32 nLength)
+void CJS_GlobalData::WriteFileBuffer(FX_LPCWSTR sFilePath, FX_LPCSTR pBuffer, int32_t nLength)
{
//UnSupport.
}
diff --git a/fpdfsdk/src/javascript/util.cpp b/fpdfsdk/src/javascript/util.cpp
index 26c59a32ad..e051cda66e 100644
--- a/fpdfsdk/src/javascript/util.cpp
+++ b/fpdfsdk/src/javascript/util.cpp
@@ -603,10 +603,10 @@ FX_BOOL util::scand(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value&
return TRUE;
}
-FX_INT64 FX_atoi64(const char *nptr)
+int64_t FX_atoi64(const char *nptr)
{
int c; /* current char */
- FX_INT64 total; /* current total */
+ int64_t total; /* current total */
int sign; /* if '-', then negative, otherwise positive */
/* skip whitespace */
diff --git a/fpdfsdk/src/pdfwindow/PWL_ComboBox.cpp b/fpdfsdk/src/pdfwindow/PWL_ComboBox.cpp
index 6627189bd7..51c4c185f9 100644
--- a/fpdfsdk/src/pdfwindow/PWL_ComboBox.cpp
+++ b/fpdfsdk/src/pdfwindow/PWL_ComboBox.cpp
@@ -256,12 +256,12 @@ void CPWL_ComboBox::AddString(FX_LPCWSTR string)
m_pList->AddString(string);
}
-FX_INT32 CPWL_ComboBox::GetSelect() const
+int32_t CPWL_ComboBox::GetSelect() const
{
return m_nSelectItem;
}
-void CPWL_ComboBox::SetSelect(FX_INT32 nItemIndex)
+void CPWL_ComboBox::SetSelect(int32_t nItemIndex)
{
if (m_pList)
m_pList->Select(nItemIndex);
@@ -271,7 +271,7 @@ void CPWL_ComboBox::SetSelect(FX_INT32 nItemIndex)
m_nSelectItem = nItemIndex;
}
-void CPWL_ComboBox::SetEditSel(FX_INT32 nStartChar,FX_INT32 nEndChar)
+void CPWL_ComboBox::SetEditSel(int32_t nStartChar,int32_t nEndChar)
{
if (m_pEdit)
{
@@ -279,7 +279,7 @@ void CPWL_ComboBox::SetEditSel(FX_INT32 nStartChar,FX_INT32 nEndChar)
}
}
-void CPWL_ComboBox::GetEditSel(FX_INT32 & nStartChar, FX_INT32 & nEndChar) const
+void CPWL_ComboBox::GetEditSel(int32_t & nStartChar, int32_t & nEndChar) const
{
nStartChar = -1;
nEndChar = -1;
@@ -502,7 +502,7 @@ void CPWL_ComboBox::SetPopup(FX_BOOL bPopup)
{
if (m_pFillerNotify)
{
- FX_INT32 nWhere = 0;
+ int32_t nWhere = 0;
FX_FLOAT fPopupRet = 0.0f;
FX_FLOAT fPopupMin = 0.0f;
if (m_pList->GetCount() > 3)
@@ -601,7 +601,7 @@ FX_BOOL CPWL_ComboBox::OnChar(FX_WORD nChar, FX_DWORD nFlag)
}
}
-void CPWL_ComboBox::OnNotify(CPWL_Wnd* pWnd, FX_DWORD msg, FX_INTPTR wParam, FX_INTPTR lParam)
+void CPWL_ComboBox::OnNotify(CPWL_Wnd* pWnd, FX_DWORD msg, intptr_t wParam, intptr_t lParam)
{
switch (msg)
{
diff --git a/fpdfsdk/src/pdfwindow/PWL_Edit.cpp b/fpdfsdk/src/pdfwindow/PWL_Edit.cpp
index 83f7340fad..f50233ff1c 100644
--- a/fpdfsdk/src/pdfwindow/PWL_Edit.cpp
+++ b/fpdfsdk/src/pdfwindow/PWL_Edit.cpp
@@ -47,12 +47,12 @@ void CPWL_Edit::SetText(FX_LPCWSTR csText)
if (CXML_Element * pXML = CXML_Element::Parse(sValue.c_str(), sValue.GetLength()))
{
- FX_INT32 nCount = pXML->CountChildren();
+ int32_t nCount = pXML->CountChildren();
FX_BOOL bFirst = TRUE;
swText.Empty();
- for (FX_INT32 i=0; i<nCount; i++)
+ for (int32_t i=0; i<nCount; i++)
{
if (CXML_Element * pSubElement = pXML->GetElement(i))
{
@@ -61,7 +61,7 @@ void CPWL_Edit::SetText(FX_LPCWSTR csText)
{
int nChild = pSubElement->CountChildren();
CFX_WideString swSection;
- for(FX_INT32 j=0; j<nChild; j++)
+ for(int32_t j=0; j<nChild; j++)
{
swSection += pSubElement->GetContent(j);
}
@@ -119,12 +119,12 @@ CPDF_Rect CPWL_Edit::GetClientRect() const
void CPWL_Edit::SetAlignFormatH(PWL_EDIT_ALIGNFORMAT_H nFormat, FX_BOOL bPaint/* = TRUE*/)
{
- m_pEdit->SetAlignmentH((FX_INT32)nFormat, bPaint);
+ m_pEdit->SetAlignmentH((int32_t)nFormat, bPaint);
}
void CPWL_Edit::SetAlignFormatV(PWL_EDIT_ALIGNFORMAT_V nFormat, FX_BOOL bPaint/* = TRUE*/)
{
- m_pEdit->SetAlignmentV((FX_INT32)nFormat, bPaint);
+ m_pEdit->SetAlignmentV((int32_t)nFormat, bPaint);
}
FX_BOOL CPWL_Edit::CanSelectAll() const
@@ -298,7 +298,7 @@ void CPWL_Edit::GetThisAppearanceStream(CFX_ByteTextBuf & sAppStream)
CPDF_Rect rcClient = GetClientRect();
CFX_ByteTextBuf sLine;
- FX_INT32 nCharArray = m_pEdit->GetCharArray();
+ int32_t nCharArray = m_pEdit->GetCharArray();
if (nCharArray > 0)
{
@@ -309,7 +309,7 @@ void CPWL_Edit::GetThisAppearanceStream(CFX_ByteTextBuf & sAppStream)
sLine << "q\n" << GetBorderWidth() << " w\n"
<< CPWL_Utils::GetColorAppStream(GetBorderColor(),FALSE) << " 2 J 0 j\n";
- for (FX_INT32 i=1;i<nCharArray;i++)
+ for (int32_t i=1;i<nCharArray;i++)
{
sLine << rcClient.left + ((rcClient.right - rcClient.left)/nCharArray)*i << " "
<< rcClient.bottom << " m\n"
@@ -328,7 +328,7 @@ void CPWL_Edit::GetThisAppearanceStream(CFX_ByteTextBuf & sAppStream)
<< GetBorderDash().nGap << "] "
<< GetBorderDash().nPhase << " d\n";
- for (FX_INT32 i=1;i<nCharArray;i++)
+ for (int32_t i=1;i<nCharArray;i++)
{
sLine << rcClient.left + ((rcClient.right - rcClient.left)/nCharArray)*i << " "
<< rcClient.bottom << " m\n"
@@ -411,7 +411,7 @@ void CPWL_Edit::DrawThisAppearance(CFX_RenderDevice* pDevice, CPDF_Matrix* pUser
CPDF_Rect rcClient = GetClientRect();
CFX_ByteTextBuf sLine;
- FX_INT32 nCharArray = m_pEdit->GetCharArray();
+ int32_t nCharArray = m_pEdit->GetCharArray();
FX_SAFE_INT32 nCharArraySafe = nCharArray;
nCharArraySafe -= 1;
nCharArraySafe *= 2;
@@ -428,7 +428,7 @@ void CPWL_Edit::DrawThisAppearance(CFX_RenderDevice* pDevice, CPDF_Matrix* pUser
CFX_PathData path;
path.SetPointCount(nCharArraySafe.ValueOrDie());
- for (FX_INT32 i=0; i<nCharArray-1; i++)
+ for (int32_t i=0; i<nCharArray-1; i++)
{
path.SetPoint(i*2, rcClient.left + ((rcClient.right - rcClient.left)/nCharArray)*(i+1),
rcClient.bottom, FXPT_MOVETO);
@@ -453,7 +453,7 @@ void CPWL_Edit::DrawThisAppearance(CFX_RenderDevice* pDevice, CPDF_Matrix* pUser
CFX_PathData path;
path.SetPointCount(nCharArraySafe.ValueOrDie());
- for (FX_INT32 i=0; i<nCharArray-1; i++)
+ for (int32_t i=0; i<nCharArray-1; i++)
{
path.SetPoint(i*2, rcClient.left + ((rcClient.right - rcClient.left)/nCharArray)*(i+1),
rcClient.bottom, FXPT_MOVETO);
@@ -563,9 +563,9 @@ FX_BOOL CPWL_Edit::OnRButtonUp(const CPDF_Point & point, FX_DWORD nFlag)
{
m_pSpellCheck->SuggestWords(sLatin,sSuggestWords);
- FX_INT32 nSuggest = sSuggestWords.GetSize();
+ int32_t nSuggest = sSuggestWords.GetSize();
- for (FX_INT32 nWord=0; nWord<nSuggest; nWord++)
+ for (int32_t nWord=0; nWord<nSuggest; nWord++)
{
pSH->AppendMenuItem(hPopup, WM_PWLEDIT_SUGGEST+nWord, sSuggestWords[nWord].UTF8Decode());
}
@@ -643,11 +643,11 @@ FX_BOOL CPWL_Edit::OnRButtonUp(const CPDF_Point & point, FX_DWORD nFlag)
pSH->EnableMenuItem(hPopup, WM_PWLEDIT_SELECTALL, FALSE);
}
- FX_INT32 x, y;
+ int32_t x, y;
PWLtoWnd(ptPopup, x, y);
pSH->ClientToScreen(GetAttachedHWnd(), x, y);
pSH->SetCursor(FXCT_ARROW);
- FX_INT32 nCmd = pSH->TrackPopupMenu(hPopup,
+ int32_t nCmd = pSH->TrackPopupMenu(hPopup,
x,
y,
GetAttachedHWnd());
@@ -736,7 +736,7 @@ void CPWL_Edit::OnKillFocus()
m_bFocus = FALSE;
}
-void CPWL_Edit::SetHorzScale(FX_INT32 nHorzScale, FX_BOOL bPaint/* = TRUE*/)
+void CPWL_Edit::SetHorzScale(int32_t nHorzScale, FX_BOOL bPaint/* = TRUE*/)
{
m_pEdit->SetHorzScale(nHorzScale, bPaint);
}
@@ -761,8 +761,8 @@ CPVT_WordRange CPWL_Edit::GetSelectWordRange() const
{
if (m_pEdit->IsSelected())
{
- FX_INT32 nStart = -1;
- FX_INT32 nEnd = -1;
+ int32_t nStart = -1;
+ int32_t nEnd = -1;
m_pEdit->GetSel(nStart, nEnd);
@@ -821,7 +821,7 @@ FX_BOOL CPWL_Edit::IsTextFull() const
return m_pEdit->IsTextFull();
}
-FX_FLOAT CPWL_Edit::GetCharArrayAutoFontSize(CPDF_Font* pFont, const CPDF_Rect& rcPlate, FX_INT32 nCharArray)
+FX_FLOAT CPWL_Edit::GetCharArrayAutoFontSize(CPDF_Font* pFont, const CPDF_Rect& rcPlate, int32_t nCharArray)
{
if (pFont && !pFont->IsStandardFont())
{
@@ -838,7 +838,7 @@ FX_FLOAT CPWL_Edit::GetCharArrayAutoFontSize(CPDF_Font* pFont, const CPDF_Rect&
return 0.0f;
}
-void CPWL_Edit::SetCharArray(FX_INT32 nCharArray)
+void CPWL_Edit::SetCharArray(int32_t nCharArray)
{
if (HasFlag(PES_CHARARRAY) && nCharArray > 0)
{
@@ -860,7 +860,7 @@ void CPWL_Edit::SetCharArray(FX_INT32 nCharArray)
}
}
-void CPWL_Edit::SetLimitChar(FX_INT32 nLimitChar)
+void CPWL_Edit::SetLimitChar(int32_t nLimitChar)
{
m_pEdit->SetLimitChar(nLimitChar);
}
@@ -1016,7 +1016,7 @@ FX_BOOL CPWL_Edit::OnChar(FX_WORD nChar, FX_DWORD nFlag)
if (m_pFillerNotify)
{
CFX_WideString swChange;
- FX_INT32 nKeyCode;
+ int32_t nKeyCode;
int nSelStart = 0;
int nSelEnd = 0;
@@ -1048,8 +1048,8 @@ FX_BOOL CPWL_Edit::OnChar(FX_WORD nChar, FX_DWORD nFlag)
if (IFX_Edit_FontMap * pFontMap = GetFontMap())
{
- FX_INT32 nOldCharSet = GetCharSet();
- FX_INT32 nNewCharSet = pFontMap->CharSetFromUnicode(nChar, DEFAULT_CHARSET);
+ int32_t nOldCharSet = GetCharSet();
+ int32_t nNewCharSet = pFontMap->CharSetFromUnicode(nChar, DEFAULT_CHARSET);
if(nOldCharSet != nNewCharSet)
{
SetCharSet(nNewCharSet);
diff --git a/fpdfsdk/src/pdfwindow/PWL_EditCtrl.cpp b/fpdfsdk/src/pdfwindow/PWL_EditCtrl.cpp
index 90a198a771..a38371c326 100644
--- a/fpdfsdk/src/pdfwindow/PWL_EditCtrl.cpp
+++ b/fpdfsdk/src/pdfwindow/PWL_EditCtrl.cpp
@@ -81,7 +81,7 @@ void CPWL_EditCtrl::RePosChildWnd()
m_pEdit->SetPlateRect(GetClientRect());
}
-void CPWL_EditCtrl::OnNotify(CPWL_Wnd* pWnd, FX_DWORD msg, FX_INTPTR wParam, FX_INTPTR lParam)
+void CPWL_EditCtrl::OnNotify(CPWL_Wnd* pWnd, FX_DWORD msg, intptr_t wParam, intptr_t lParam)
{
CPWL_Wnd::OnNotify(pWnd,msg,wParam,lParam);
@@ -409,7 +409,7 @@ void CPWL_EditCtrl::GetCaretInfo(CPDF_Point & ptHead, CPDF_Point & ptFoot) const
}
}
-void CPWL_EditCtrl::GetCaretPos(FX_INT32& x, FX_INT32& y) const
+void CPWL_EditCtrl::GetCaretPos(int32_t& x, int32_t& y) const
{
CPDF_Point ptHead(0,0), ptFoot(0,0);
@@ -439,12 +439,12 @@ CFX_WideString CPWL_EditCtrl::GetText() const
return m_pEdit->GetText();
}
-void CPWL_EditCtrl::SetSel(FX_INT32 nStartChar,FX_INT32 nEndChar)
+void CPWL_EditCtrl::SetSel(int32_t nStartChar,int32_t nEndChar)
{
m_pEdit->SetSel(nStartChar, nEndChar);
}
-void CPWL_EditCtrl::GetSel(FX_INT32 & nStartChar, FX_INT32 & nEndChar ) const
+void CPWL_EditCtrl::GetSel(int32_t & nStartChar, int32_t & nEndChar ) const
{
m_pEdit->GetSel(nStartChar, nEndChar);
}
@@ -472,7 +472,7 @@ void CPWL_EditCtrl::EnableRefresh(FX_BOOL bRefresh)
m_pEdit->EnableRefresh(bRefresh);
}
-FX_INT32 CPWL_EditCtrl::GetCaret() const
+int32_t CPWL_EditCtrl::GetCaret() const
{
if (m_pEdit)
return m_pEdit->GetCaret();
@@ -480,13 +480,13 @@ FX_INT32 CPWL_EditCtrl::GetCaret() const
return -1;
}
-void CPWL_EditCtrl::SetCaret(FX_INT32 nPos)
+void CPWL_EditCtrl::SetCaret(int32_t nPos)
{
if (m_pEdit)
m_pEdit->SetCaret(nPos);
}
-FX_INT32 CPWL_EditCtrl::GetTotalWords() const
+int32_t CPWL_EditCtrl::GetTotalWords() const
{
if (m_pEdit)
return m_pEdit->GetTotalWords();
@@ -510,7 +510,7 @@ CPDF_Point CPWL_EditCtrl::GetScrollPos() const
CPDF_Font * CPWL_EditCtrl::GetCaretFont() const
{
- FX_INT32 nFontIndex = 0;
+ int32_t nFontIndex = 0;
if (IFX_Edit_Iterator * pIterator = m_pEdit->GetIterator())
{
@@ -588,7 +588,7 @@ void CPWL_EditCtrl::InsertText(FX_LPCWSTR csText)
m_pEdit->InsertText(csText);
}
-void CPWL_EditCtrl::InsertWord(FX_WORD word, FX_INT32 nCharset)
+void CPWL_EditCtrl::InsertWord(FX_WORD word, int32_t nCharset)
{
if (!IsReadOnly())
m_pEdit->InsertWord(word, nCharset);
@@ -646,7 +646,7 @@ void CPWL_EditCtrl::IOnSetScrollInfoY(FX_FLOAT fPlateMin, FX_FLOAT fPlateMax,
Info.fSmallStep = fSmallStep;
Info.fBigStep = fBigStep;
- this->OnNotify(this,PNM_SETSCROLLINFO,SBT_VSCROLL,(FX_INTPTR)&Info);
+ this->OnNotify(this,PNM_SETSCROLLINFO,SBT_VSCROLL,(intptr_t)&Info);
// PWL_TRACE("set scroll info:%f\n",fContentMax - fContentMin);
@@ -664,7 +664,7 @@ void CPWL_EditCtrl::IOnSetScrollInfoY(FX_FLOAT fPlateMin, FX_FLOAT fPlateMax,
void CPWL_EditCtrl::IOnSetScrollPosY(FX_FLOAT fy)
{
// PWL_TRACE("set scroll position:%f\n",fy);
- this->OnNotify(this,PNM_SETSCROLLPOS,SBT_VSCROLL,(FX_INTPTR)&fy);
+ this->OnNotify(this,PNM_SETSCROLLPOS,SBT_VSCROLL,(intptr_t)&fy);
}
void CPWL_EditCtrl::IOnSetCaret(FX_BOOL bVisible, const CPDF_Point & ptHead, const CPDF_Point & ptFoot, const CPVT_WordPlace& place)
@@ -674,7 +674,7 @@ void CPWL_EditCtrl::IOnSetCaret(FX_BOOL bVisible, const CPDF_Point & ptHead, con
cInfo.ptHead = ptHead;
cInfo.ptFoot = ptFoot;
- this->OnNotify(this,PNM_SETCARETINFO,(FX_INTPTR)&cInfo,(FX_INTPTR)NULL);
+ this->OnNotify(this,PNM_SETCARETINFO,(intptr_t)&cInfo,(intptr_t)NULL);
}
void CPWL_EditCtrl::IOnCaretChange(const CPVT_SecProps & secProps, const CPVT_WordProps & wordProps)
@@ -697,7 +697,7 @@ void CPWL_EditCtrl::IOnInvalidateRect(CPDF_Rect * pRect)
this->InvalidateRect(pRect);
}
-FX_INT32 CPWL_EditCtrl::GetCharSet() const
+int32_t CPWL_EditCtrl::GetCharSet() const
{
if (m_nCharSet < 0)
return DEFAULT_CHARSET;
@@ -705,13 +705,13 @@ FX_INT32 CPWL_EditCtrl::GetCharSet() const
return m_nCharSet;
}
-void CPWL_EditCtrl::GetTextRange(const CPDF_Rect& rect, FX_INT32 & nStartChar, FX_INT32 & nEndChar) const
+void CPWL_EditCtrl::GetTextRange(const CPDF_Rect& rect, int32_t & nStartChar, int32_t & nEndChar) const
{
nStartChar = m_pEdit->WordPlaceToWordIndex(m_pEdit->SearchWordPlace(CPDF_Point(rect.left, rect.top)));
nEndChar = m_pEdit->WordPlaceToWordIndex(m_pEdit->SearchWordPlace(CPDF_Point(rect.right, rect.bottom)));
}
-CFX_WideString CPWL_EditCtrl::GetText(FX_INT32 & nStartChar, FX_INT32 & nEndChar) const
+CFX_WideString CPWL_EditCtrl::GetText(int32_t & nStartChar, int32_t & nEndChar) const
{
CPVT_WordPlace wpStart = m_pEdit->WordIndexToWordPlace(nStartChar);
CPVT_WordPlace wpEnd = m_pEdit->WordIndexToWordPlace(nEndChar);
diff --git a/fpdfsdk/src/pdfwindow/PWL_FontMap.cpp b/fpdfsdk/src/pdfwindow/PWL_FontMap.cpp
index 578511359c..62811eaac1 100644
--- a/fpdfsdk/src/pdfwindow/PWL_FontMap.cpp
+++ b/fpdfsdk/src/pdfwindow/PWL_FontMap.cpp
@@ -49,7 +49,7 @@ CPDF_Document* CPWL_FontMap::GetDocument()
return m_pPDFDoc;
}
-CPDF_Font* CPWL_FontMap::GetPDFFont(FX_INT32 nFontIndex)
+CPDF_Font* CPWL_FontMap::GetPDFFont(int32_t nFontIndex)
{
if (nFontIndex >=0 && nFontIndex < m_aData.GetSize())
{
@@ -62,7 +62,7 @@ CPDF_Font* CPWL_FontMap::GetPDFFont(FX_INT32 nFontIndex)
return NULL;
}
-CFX_ByteString CPWL_FontMap::GetPDFFontAlias(FX_INT32 nFontIndex)
+CFX_ByteString CPWL_FontMap::GetPDFFontAlias(int32_t nFontIndex)
{
if (nFontIndex >=0 && nFontIndex < m_aData.GetSize())
{
@@ -75,7 +75,7 @@ CFX_ByteString CPWL_FontMap::GetPDFFontAlias(FX_INT32 nFontIndex)
return "";
}
-FX_BOOL CPWL_FontMap::KnowWord(FX_INT32 nFontIndex, FX_WORD word)
+FX_BOOL CPWL_FontMap::KnowWord(int32_t nFontIndex, FX_WORD word)
{
if (nFontIndex >=0 && nFontIndex < m_aData.GetSize())
{
@@ -88,7 +88,7 @@ FX_BOOL CPWL_FontMap::KnowWord(FX_INT32 nFontIndex, FX_WORD word)
return FALSE;
}
-FX_INT32 CPWL_FontMap::GetWordFontIndex(FX_WORD word, FX_INT32 nCharset, FX_INT32 nFontIndex)
+int32_t CPWL_FontMap::GetWordFontIndex(FX_WORD word, int32_t nCharset, int32_t nFontIndex)
{
if (nFontIndex > 0)
{
@@ -111,7 +111,7 @@ FX_INT32 CPWL_FontMap::GetWordFontIndex(FX_WORD word, FX_INT32 nCharset, FX_INT3
}
}
- FX_INT32 nNewFontIndex = -1;
+ int32_t nNewFontIndex = -1;
nNewFontIndex = this->GetFontIndex(GetNativeFontName(nCharset), nCharset, TRUE);
if (nNewFontIndex >= 0)
@@ -130,7 +130,7 @@ FX_INT32 CPWL_FontMap::GetWordFontIndex(FX_WORD word, FX_INT32 nCharset, FX_INT3
return -1;
}
-FX_INT32 CPWL_FontMap::CharCodeFromUnicode(FX_INT32 nFontIndex, FX_WORD word)
+int32_t CPWL_FontMap::CharCodeFromUnicode(int32_t nFontIndex, FX_WORD word)
{
if (CPWL_FontMap_Data* pData = m_aData.GetAt(nFontIndex))
{
@@ -153,10 +153,10 @@ FX_INT32 CPWL_FontMap::CharCodeFromUnicode(FX_INT32 nFontIndex, FX_WORD word)
return -1;
}
-CFX_ByteString CPWL_FontMap::GetNativeFontName(FX_INT32 nCharset)
+CFX_ByteString CPWL_FontMap::GetNativeFontName(int32_t nCharset)
{
//searching native font is slow, so we must save time
- for (FX_INT32 i=0,sz=m_aNativeFont.GetSize(); i<sz; i++)
+ for (int32_t i=0,sz=m_aNativeFont.GetSize(); i<sz; i++)
{
if (CPWL_FontMap_Native* pData = m_aNativeFont.GetAt(i))
{
@@ -182,13 +182,13 @@ CFX_ByteString CPWL_FontMap::GetNativeFontName(FX_INT32 nCharset)
void CPWL_FontMap::Empty()
{
{
- for (FX_INT32 i=0, sz=m_aData.GetSize(); i<sz; i++)
+ for (int32_t i=0, sz=m_aData.GetSize(); i<sz; i++)
delete m_aData.GetAt(i);
m_aData.RemoveAll();
}
{
- for (FX_INT32 i=0, sz=m_aNativeFont.GetSize(); i<sz; i++)
+ for (int32_t i=0, sz=m_aNativeFont.GetSize(); i<sz; i++)
delete m_aNativeFont.GetAt(i);
m_aNativeFont.RemoveAll();
@@ -223,7 +223,7 @@ const char* g_sDEStandardFontName[] = {"Courier", "Courier-Bold", "Courier-BoldO
FX_BOOL CPWL_FontMap::IsStandardFont(const CFX_ByteString& sFontName)
{
- for (FX_INT32 i=0; i<14; i++)
+ for (int32_t i=0; i<14; i++)
{
if (sFontName == g_sDEStandardFontName[i])
return TRUE;
@@ -232,9 +232,9 @@ FX_BOOL CPWL_FontMap::IsStandardFont(const CFX_ByteString& sFontName)
return FALSE;
}
-FX_INT32 CPWL_FontMap::FindFont(const CFX_ByteString& sFontName, FX_INT32 nCharset)
+int32_t CPWL_FontMap::FindFont(const CFX_ByteString& sFontName, int32_t nCharset)
{
- for (FX_INT32 i=0,sz=m_aData.GetSize(); i<sz; i++)
+ for (int32_t i=0,sz=m_aData.GetSize(); i<sz; i++)
{
if (CPWL_FontMap_Data* pData = m_aData.GetAt(i))
{
@@ -249,9 +249,9 @@ FX_INT32 CPWL_FontMap::FindFont(const CFX_ByteString& sFontName, FX_INT32 nChars
return -1;
}
-FX_INT32 CPWL_FontMap::GetFontIndex(const CFX_ByteString& sFontName, FX_INT32 nCharset, FX_BOOL bFind)
+int32_t CPWL_FontMap::GetFontIndex(const CFX_ByteString& sFontName, int32_t nCharset, FX_BOOL bFind)
{
- FX_INT32 nFontIndex = FindFont(EncodeFontAlias(sFontName, nCharset), nCharset);
+ int32_t nFontIndex = FindFont(EncodeFontAlias(sFontName, nCharset), nCharset);
if (nFontIndex >= 0) return nFontIndex;
// nFontIndex = FindFont("", nCharset);
@@ -285,11 +285,11 @@ FX_INT32 CPWL_FontMap::GetFontIndex(const CFX_ByteString& sFontName, FX_INT32 nC
return AddFontData(pFont, sAlias, nCharset);
}
-FX_INT32 CPWL_FontMap::GetPWLFontIndex(FX_WORD word, FX_INT32 nCharset)
+int32_t CPWL_FontMap::GetPWLFontIndex(FX_WORD word, int32_t nCharset)
{
- FX_INT32 nFind = -1;
+ int32_t nFind = -1;
- for (FX_INT32 i=0,sz=m_aData.GetSize(); i<sz; i++)
+ for (int32_t i=0,sz=m_aData.GetSize(); i<sz; i++)
{
if (CPWL_FontMap_Data* pData = m_aData.GetAt(i))
{
@@ -318,12 +318,12 @@ FX_INT32 CPWL_FontMap::GetPWLFontIndex(FX_WORD word, FX_INT32 nCharset)
return AddFontData(pNewFont, sAlias, nCharset);
}
-CPDF_Font* CPWL_FontMap::FindFontSameCharset(CFX_ByteString& sFontAlias, FX_INT32 nCharset)
+CPDF_Font* CPWL_FontMap::FindFontSameCharset(CFX_ByteString& sFontAlias, int32_t nCharset)
{
return NULL;
}
-FX_INT32 CPWL_FontMap::AddFontData(CPDF_Font* pFont, const CFX_ByteString& sFontAlias, FX_INT32 nCharset)
+int32_t CPWL_FontMap::AddFontData(CPDF_Font* pFont, const CFX_ByteString& sFontAlias, int32_t nCharset)
{
CPWL_FontMap_Data* pNewData = new CPWL_FontMap_Data;
pNewData->pFont = pFont;
@@ -339,7 +339,7 @@ void CPWL_FontMap::AddedFont(CPDF_Font* pFont, const CFX_ByteString& sFontAlias)
{
}
-CFX_ByteString CPWL_FontMap::GetFontName(FX_INT32 nFontIndex)
+CFX_ByteString CPWL_FontMap::GetFontName(int32_t nFontIndex)
{
if (nFontIndex >=0 && nFontIndex < m_aData.GetSize())
{
@@ -352,7 +352,7 @@ CFX_ByteString CPWL_FontMap::GetFontName(FX_INT32 nFontIndex)
return "";
}
-CFX_ByteString CPWL_FontMap::GetNativeFont(FX_INT32 nCharset)
+CFX_ByteString CPWL_FontMap::GetNativeFont(int32_t nCharset)
{
CFX_ByteString sFontName;
@@ -372,7 +372,7 @@ CFX_ByteString CPWL_FontMap::GetNativeFont(FX_INT32 nCharset)
return sFontName;
}
-CPDF_Font* CPWL_FontMap::AddFontToDocument(CPDF_Document* pDoc, CFX_ByteString& sFontName, FX_BYTE nCharset)
+CPDF_Font* CPWL_FontMap::AddFontToDocument(CPDF_Document* pDoc, CFX_ByteString& sFontName, uint8_t nCharset)
{
if (IsStandardFont(sFontName))
return AddStandardFont(pDoc, sFontName);
@@ -397,7 +397,7 @@ CPDF_Font* CPWL_FontMap::AddStandardFont(CPDF_Document* pDoc, CFX_ByteString& sF
return pFont;
}
-CPDF_Font* CPWL_FontMap::AddSystemFont(CPDF_Document* pDoc, CFX_ByteString& sFontName, FX_BYTE nCharset)
+CPDF_Font* CPWL_FontMap::AddSystemFont(CPDF_Document* pDoc, CFX_ByteString& sFontName, uint8_t nCharset)
{
if (!pDoc) return NULL;
@@ -410,7 +410,7 @@ CPDF_Font* CPWL_FontMap::AddSystemFont(CPDF_Document* pDoc, CFX_ByteString& sFon
return NULL;
}
-CFX_ByteString CPWL_FontMap::EncodeFontAlias(const CFX_ByteString& sFontName, FX_INT32 nCharset)
+CFX_ByteString CPWL_FontMap::EncodeFontAlias(const CFX_ByteString& sFontName, int32_t nCharset)
{
CFX_ByteString sPostfix;
sPostfix.Format("_%02X", nCharset);
@@ -424,12 +424,12 @@ CFX_ByteString CPWL_FontMap::EncodeFontAlias(const CFX_ByteString& sFontName)
return sRet;
}
-FX_INT32 CPWL_FontMap::GetFontMapCount() const
+int32_t CPWL_FontMap::GetFontMapCount() const
{
return m_aData.GetSize();
}
-const CPWL_FontMap_Data* CPWL_FontMap::GetFontMapData(FX_INT32 nIndex) const
+const CPWL_FontMap_Data* CPWL_FontMap::GetFontMapData(int32_t nIndex) const
{
if (nIndex >=0 && nIndex < m_aData.GetSize())
{
@@ -439,10 +439,10 @@ const CPWL_FontMap_Data* CPWL_FontMap::GetFontMapData(FX_INT32 nIndex) const
return NULL;
}
-FX_INT32 CPWL_FontMap::GetNativeCharset()
+int32_t CPWL_FontMap::GetNativeCharset()
{
- FX_BYTE nCharset = ANSI_CHARSET;
- FX_INT32 iCodePage = FXSYS_GetACP();
+ uint8_t nCharset = ANSI_CHARSET;
+ int32_t iCodePage = FXSYS_GetACP();
switch (iCodePage)
{
case 932://Japan
@@ -513,7 +513,7 @@ const CPWL_FontMap::CharsetFontMap CPWL_FontMap::defaultTTFMap[] = {
{ -1, NULL }
};
-CFX_ByteString CPWL_FontMap::GetDefaultFontByCharset(FX_INT32 nCharset)
+CFX_ByteString CPWL_FontMap::GetDefaultFontByCharset(int32_t nCharset)
{
int i = 0;
while (defaultTTFMap[i].charset != -1) {
@@ -524,7 +524,7 @@ CFX_ByteString CPWL_FontMap::GetDefaultFontByCharset(FX_INT32 nCharset)
return "";
}
-FX_INT32 CPWL_FontMap::CharSetFromUnicode(FX_WORD word, FX_INT32 nOldCharset)
+int32_t CPWL_FontMap::CharSetFromUnicode(FX_WORD word, int32_t nOldCharset)
{
if(m_pSystemHandler && (-1 != m_pSystemHandler->GetCharSet()))
return m_pSystemHandler->GetCharSet();
diff --git a/fpdfsdk/src/pdfwindow/PWL_Icon.cpp b/fpdfsdk/src/pdfwindow/PWL_Icon.cpp
index 5e3e6e5586..9426824c8e 100644
--- a/fpdfsdk/src/pdfwindow/PWL_Icon.cpp
+++ b/fpdfsdk/src/pdfwindow/PWL_Icon.cpp
@@ -137,7 +137,7 @@ CPWL_Icon::~CPWL_Icon()
{
}
-FX_INT32 CPWL_Icon::GetScaleMethod()
+int32_t CPWL_Icon::GetScaleMethod()
{
if (m_pIconFit)
return m_pIconFit->GetScaleMethod();
@@ -199,7 +199,7 @@ void CPWL_Icon::GetScale(FX_FLOAT & fHScale,FX_FLOAT & fVScale)
GetImageSize(fImageWidth,fImageHeight);
- FX_INT32 nScaleMethod = this->GetScaleMethod();
+ int32_t nScaleMethod = this->GetScaleMethod();
/*
enum ScaleMethod
diff --git a/fpdfsdk/src/pdfwindow/PWL_IconList.cpp b/fpdfsdk/src/pdfwindow/PWL_IconList.cpp
index 990f8b893f..cbb94d23d7 100644
--- a/fpdfsdk/src/pdfwindow/PWL_IconList.cpp
+++ b/fpdfsdk/src/pdfwindow/PWL_IconList.cpp
@@ -100,7 +100,7 @@ void CPWL_IconList_Item::SetData(void* pData)
m_pData = pData;
}
-void CPWL_IconList_Item::SetIcon(FX_INT32 nIconIndex)
+void CPWL_IconList_Item::SetIcon(int32_t nIconIndex)
{
m_nIconIndex = nIconIndex;
}
@@ -148,7 +148,7 @@ void CPWL_IconList_Item::OnDisabled()
/* ----------------- CPWL_IconList_Content ----------------- */
-CPWL_IconList_Content::CPWL_IconList_Content(FX_INT32 nListCount) :
+CPWL_IconList_Content::CPWL_IconList_Content(int32_t nListCount) :
m_nSelectIndex(-1),
m_pNotify(NULL),
m_bEnableNotify(TRUE),
@@ -163,7 +163,7 @@ CPWL_IconList_Content::~CPWL_IconList_Content()
void CPWL_IconList_Content::CreateChildWnd(const PWL_CREATEPARAM & cp)
{
- for (FX_INT32 i=0; i<m_nListCount; i++)
+ for (int32_t i=0; i<m_nListCount; i++)
{
CPWL_IconList_Item* pNewItem = new CPWL_IconList_Item();
@@ -188,7 +188,7 @@ void CPWL_IconList_Content::CreateChildWnd(const PWL_CREATEPARAM & cp)
sInfo.fSmallStep = 13.0f;
sInfo.fBigStep = sInfo.fPlateWidth;
- pParent->OnNotify(this, PNM_SETSCROLLINFO, SBT_VSCROLL, (FX_INTPTR)&sInfo);
+ pParent->OnNotify(this, PNM_SETSCROLLINFO, SBT_VSCROLL, (intptr_t)&sInfo);
}
}
@@ -199,7 +199,7 @@ FX_BOOL CPWL_IconList_Content::OnLButtonDown(const CPDF_Point & point, FX_DWORD
SetCapture();
m_bMouseDown = TRUE;
- FX_INT32 nItemIndex = FindItemIndex(point);
+ int32_t nItemIndex = FindItemIndex(point);
SetSelect(nItemIndex);
ScrollToItem(nItemIndex);
@@ -218,7 +218,7 @@ FX_BOOL CPWL_IconList_Content::OnMouseMove(const CPDF_Point & point, FX_DWORD nF
{
if (m_bMouseDown)
{
- FX_INT32 nItemIndex = FindItemIndex(point);
+ int32_t nItemIndex = FindItemIndex(point);
SetSelect(nItemIndex);
ScrollToItem(nItemIndex);
}
@@ -233,7 +233,7 @@ FX_BOOL CPWL_IconList_Content::OnKeyDown(FX_WORD nChar, FX_DWORD nFlag)
case FWL_VKEY_Up:
if (m_nSelectIndex > 0)
{
- FX_INT32 nItemIndex = m_nSelectIndex - 1;
+ int32_t nItemIndex = m_nSelectIndex - 1;
SetSelect(nItemIndex);
ScrollToItem(nItemIndex);
}
@@ -241,7 +241,7 @@ FX_BOOL CPWL_IconList_Content::OnKeyDown(FX_WORD nChar, FX_DWORD nFlag)
case FWL_VKEY_Down:
if (m_nSelectIndex < m_nListCount-1)
{
- FX_INT32 nItemIndex = m_nSelectIndex + 1;
+ int32_t nItemIndex = m_nSelectIndex + 1;
SetSelect(nItemIndex);
ScrollToItem(nItemIndex);
}
@@ -251,10 +251,10 @@ FX_BOOL CPWL_IconList_Content::OnKeyDown(FX_WORD nChar, FX_DWORD nFlag)
return FALSE;
}
-FX_INT32 CPWL_IconList_Content::FindItemIndex(const CPDF_Point& point)
+int32_t CPWL_IconList_Content::FindItemIndex(const CPDF_Point& point)
{
- FX_INT32 nIndex = 0;
- for (FX_INT32 i=0,sz=m_aChildren.GetSize(); i<sz; i++)
+ int32_t nIndex = 0;
+ for (int32_t i=0,sz=m_aChildren.GetSize(); i<sz; i++)
{
if (CPWL_Wnd * pChild = m_aChildren.GetAt(i))
{
@@ -270,7 +270,7 @@ FX_INT32 CPWL_IconList_Content::FindItemIndex(const CPDF_Point& point)
return nIndex;
}
-void CPWL_IconList_Content::ScrollToItem(FX_INT32 nItemIndex)
+void CPWL_IconList_Content::ScrollToItem(int32_t nItemIndex)
{
CPDF_Rect rcClient = GetClientRect();
@@ -297,13 +297,13 @@ void CPWL_IconList_Content::ScrollToItem(FX_INT32 nItemIndex)
this->InvalidateRect();
if (CPWL_Wnd* pParent = this->GetParentWindow())
{
- pParent->OnNotify(this, PNM_SETSCROLLPOS, SBT_VSCROLL, (FX_INTPTR)&ptScroll.y);
+ pParent->OnNotify(this, PNM_SETSCROLLPOS, SBT_VSCROLL, (intptr_t)&ptScroll.y);
}
}
}
}
-void CPWL_IconList_Content::SetSelect(FX_INT32 nIndex)
+void CPWL_IconList_Content::SetSelect(int32_t nIndex)
{
if (m_nSelectIndex != nIndex)
{
@@ -316,7 +316,7 @@ void CPWL_IconList_Content::SetSelect(FX_INT32 nIndex)
}
}
-FX_INT32 CPWL_IconList_Content::GetSelect() const
+int32_t CPWL_IconList_Content::GetSelect() const
{
return m_nSelectIndex;
}
@@ -338,7 +338,7 @@ void CPWL_IconList_Content::EnableNotify(FX_BOOL bNotify)
m_bEnableNotify = bNotify;
}
-void CPWL_IconList_Content::SelectItem(FX_INT32 nItemIndex, FX_BOOL bSelect)
+void CPWL_IconList_Content::SelectItem(int32_t nItemIndex, FX_BOOL bSelect)
{
if (CPWL_IconList_Item* pItem = GetListItem(nItemIndex))
{
@@ -347,7 +347,7 @@ void CPWL_IconList_Content::SelectItem(FX_INT32 nItemIndex, FX_BOOL bSelect)
}
}
-CPWL_IconList_Item* CPWL_IconList_Content::GetListItem(FX_INT32 nItemIndex) const
+CPWL_IconList_Item* CPWL_IconList_Content::GetListItem(int32_t nItemIndex) const
{
if (nItemIndex >= 0 && nItemIndex<m_aChildren.GetSize())
{
@@ -363,25 +363,25 @@ CPWL_IconList_Item* CPWL_IconList_Content::GetListItem(FX_INT32 nItemIndex) cons
return NULL;
}
-void CPWL_IconList_Content::SetListData(FX_INT32 nItemIndex, void* pData)
+void CPWL_IconList_Content::SetListData(int32_t nItemIndex, void* pData)
{
if (CPWL_IconList_Item* pItem = GetListItem(nItemIndex))
pItem->SetData(pData);
}
-void CPWL_IconList_Content::SetListIcon(FX_INT32 nItemIndex, FX_INT32 nIconIndex)
+void CPWL_IconList_Content::SetListIcon(int32_t nItemIndex, int32_t nIconIndex)
{
if (CPWL_IconList_Item* pItem = GetListItem(nItemIndex))
pItem->SetIcon(nIconIndex);
}
-void CPWL_IconList_Content::SetListString(FX_INT32 nItemIndex, const CFX_WideString& str)
+void CPWL_IconList_Content::SetListString(int32_t nItemIndex, const CFX_WideString& str)
{
if (CPWL_IconList_Item* pItem = GetListItem(nItemIndex))
pItem->SetText(str);
}
-CFX_WideString CPWL_IconList_Content::GetListString(FX_INT32 nItemIndex) const
+CFX_WideString CPWL_IconList_Content::GetListString(int32_t nItemIndex) const
{
if (CPWL_IconList_Item* pItem = GetListItem(nItemIndex))
return pItem->GetText();
@@ -391,7 +391,7 @@ CFX_WideString CPWL_IconList_Content::GetListString(FX_INT32 nItemIndex) const
void CPWL_IconList_Content::SetIconFillColor(const CPWL_Color& color)
{
- for (FX_INT32 i=0,sz=m_aChildren.GetSize(); i<sz; i++)
+ for (int32_t i=0,sz=m_aChildren.GetSize(); i<sz; i++)
{
if (CPWL_Wnd * pChild = m_aChildren.GetAt(i))
{
@@ -408,7 +408,7 @@ void CPWL_IconList_Content::SetIconFillColor(const CPWL_Color& color)
/* -------------------- CPWL_IconList --------------------- */
-CPWL_IconList::CPWL_IconList(FX_INT32 nListCount) :
+CPWL_IconList::CPWL_IconList(int32_t nListCount) :
m_pListContent(NULL),
m_nListCount(nListCount)
{
@@ -446,7 +446,7 @@ void CPWL_IconList::OnCreated()
}
}
-void CPWL_IconList::OnNotify(CPWL_Wnd* pWnd, FX_DWORD msg, FX_INTPTR wParam, FX_INTPTR lParam)
+void CPWL_IconList::OnNotify(CPWL_Wnd* pWnd, FX_DWORD msg, intptr_t wParam, intptr_t lParam)
{
CPWL_Wnd::OnNotify(pWnd, msg, wParam, lParam);
@@ -502,17 +502,17 @@ void CPWL_IconList::OnNotify(CPWL_Wnd* pWnd, FX_DWORD msg, FX_INTPTR wParam, FX_
}
}
-void CPWL_IconList::SetSelect(FX_INT32 nIndex)
+void CPWL_IconList::SetSelect(int32_t nIndex)
{
m_pListContent->SetSelect(nIndex);
}
-void CPWL_IconList::SetTopItem(FX_INT32 nIndex)
+void CPWL_IconList::SetTopItem(int32_t nIndex)
{
m_pListContent->ScrollToItem(nIndex);
}
-FX_INT32 CPWL_IconList::GetSelect() const
+int32_t CPWL_IconList::GetSelect() const
{
return m_pListContent->GetSelect();
}
@@ -527,22 +527,22 @@ void CPWL_IconList::EnableNotify(FX_BOOL bNotify)
m_pListContent->EnableNotify(bNotify);
}
-void CPWL_IconList::SetListData(FX_INT32 nItemIndex, void* pData)
+void CPWL_IconList::SetListData(int32_t nItemIndex, void* pData)
{
m_pListContent->SetListData(nItemIndex, pData);
}
-void CPWL_IconList::SetListIcon(FX_INT32 nItemIndex, FX_INT32 nIconIndex)
+void CPWL_IconList::SetListIcon(int32_t nItemIndex, int32_t nIconIndex)
{
m_pListContent->SetListIcon(nItemIndex, nIconIndex);
}
-void CPWL_IconList::SetListString(FX_INT32 nItemIndex, const CFX_WideString& str)
+void CPWL_IconList::SetListString(int32_t nItemIndex, const CFX_WideString& str)
{
m_pListContent->SetListString(nItemIndex, str);
}
-CFX_WideString CPWL_IconList::GetListString(FX_INT32 nItemIndex) const
+CFX_WideString CPWL_IconList::GetListString(int32_t nItemIndex) const
{
return m_pListContent->GetListString(nItemIndex);
}
@@ -581,7 +581,7 @@ FX_BOOL CPWL_IconList::OnMouseWheel(short zDelta, const CPDF_Point & point, FX_D
m_pListContent->InvalidateRect(NULL);
if (CPWL_ScrollBar* pScrollBar = this->GetVScrollBar())
- pScrollBar->OnNotify(this, PNM_SETSCROLLPOS, SBT_VSCROLL, (FX_INTPTR)&ptNew.y);
+ pScrollBar->OnNotify(this, PNM_SETSCROLLPOS, SBT_VSCROLL, (intptr_t)&ptNew.y);
return TRUE;
}
diff --git a/fpdfsdk/src/pdfwindow/PWL_Label.cpp b/fpdfsdk/src/pdfwindow/PWL_Label.cpp
index 18580f3be7..f2f3929e3f 100644
--- a/fpdfsdk/src/pdfwindow/PWL_Label.cpp
+++ b/fpdfsdk/src/pdfwindow/PWL_Label.cpp
@@ -132,7 +132,7 @@ IFX_SystemHandler* pSysHandler = GetSystemHandler();
rcClip, CPDF_Point(0.0f,0.0f), pRange,pSysHandler, NULL);
}
-void CPWL_Label::SetHorzScale(FX_INT32 nHorzScale)
+void CPWL_Label::SetHorzScale(int32_t nHorzScale)
{
m_pEdit->SetHorzScale(nHorzScale);
}
@@ -172,12 +172,12 @@ CFX_WideString CPWL_Label::GetText() const
return m_pEdit->GetText();
}
-void CPWL_Label::SetLimitChar(FX_INT32 nLimitChar)
+void CPWL_Label::SetLimitChar(int32_t nLimitChar)
{
m_pEdit->SetLimitChar(nLimitChar);
}
-FX_INT32 CPWL_Label::GetTotalWords()
+int32_t CPWL_Label::GetTotalWords()
{
if (m_pEdit)
return m_pEdit->GetTotalWords();
diff --git a/fpdfsdk/src/pdfwindow/PWL_ListBox.cpp b/fpdfsdk/src/pdfwindow/PWL_ListBox.cpp
index 035d81959d..47c1c86123 100644
--- a/fpdfsdk/src/pdfwindow/PWL_ListBox.cpp
+++ b/fpdfsdk/src/pdfwindow/PWL_ListBox.cpp
@@ -40,7 +40,7 @@ void CPWL_List_Notify::IOnSetScrollInfoY(FX_FLOAT fPlateMin, FX_FLOAT fPlateMax,
Info.fSmallStep = fSmallStep;
Info.fBigStep = fBigStep;
- m_pList->OnNotify(m_pList,PNM_SETSCROLLINFO,SBT_VSCROLL,(FX_INTPTR)&Info);
+ m_pList->OnNotify(m_pList,PNM_SETSCROLLINFO,SBT_VSCROLL,(intptr_t)&Info);
if (CPWL_ScrollBar * pScroll = m_pList->GetVScrollBar())
{
@@ -66,7 +66,7 @@ void CPWL_List_Notify::IOnSetScrollInfoY(FX_FLOAT fPlateMin, FX_FLOAT fPlateMax,
void CPWL_List_Notify::IOnSetScrollPosY(FX_FLOAT fy)
{
- m_pList->OnNotify(m_pList,PNM_SETSCROLLPOS,SBT_VSCROLL,(FX_INTPTR)&fy);
+ m_pList->OnNotify(m_pList,PNM_SETSCROLLPOS,SBT_VSCROLL,(intptr_t)&fy);
}
void CPWL_List_Notify::IOnInvalidateRect(CPDF_Rect * pRect)
@@ -139,7 +139,7 @@ void CPWL_ListBox::GetThisAppearanceStream(CFX_ByteTextBuf & sAppStream)
if (m_pList)
{
CPDF_Rect rcPlate = m_pList->GetPlateRect();
- for (FX_INT32 i=0,sz=m_pList->GetCount(); i<sz; i++)
+ for (int32_t i=0,sz=m_pList->GetCount(); i<sz; i++)
{
CPDF_Rect rcItem = m_pList->GetItemRect(i);
@@ -191,7 +191,7 @@ void CPWL_ListBox::DrawThisAppearance(CFX_RenderDevice* pDevice, CPDF_Matrix* pU
CPDF_Rect rcList = GetListRect();
CPDF_Rect rcClient = GetClientRect();
- for (FX_INT32 i=0,sz=m_pList->GetCount(); i<sz; i++)
+ for (int32_t i=0,sz=m_pList->GetCount(); i<sz; i++)
{
CPDF_Rect rcItem = m_pList->GetItemRect(i);
if (rcItem.bottom > rcPlate.top || rcItem.top < rcPlate.bottom) continue;
@@ -356,7 +356,7 @@ FX_BOOL CPWL_ListBox::OnMouseMove(const CPDF_Point & point, FX_DWORD nFlag)
return TRUE;
}
-void CPWL_ListBox::OnNotify(CPWL_Wnd* pWnd, FX_DWORD msg, FX_INTPTR wParam, FX_INTPTR lParam)
+void CPWL_ListBox::OnNotify(CPWL_Wnd* pWnd, FX_DWORD msg, intptr_t wParam, intptr_t lParam)
{
CPWL_Wnd::OnNotify(pWnd,msg,wParam,lParam);
@@ -406,7 +406,7 @@ void CPWL_ListBox::KillFocus()
/*
if (this->IsMultipleSel())
{
- for(FX_INT32 i=0;i<this->GetCount();i++)
+ for(int32_t i=0;i<this->GetCount();i++)
{
if (this->IsListItemSelected(i))
{
@@ -496,25 +496,25 @@ FX_FLOAT CPWL_ListBox::GetFontSize() const
return 0.0f;
}
-void CPWL_ListBox::Select(FX_INT32 nItemIndex)
+void CPWL_ListBox::Select(int32_t nItemIndex)
{
if (m_pList)
m_pList->Select(nItemIndex);
}
-void CPWL_ListBox::SetCaret(FX_INT32 nItemIndex)
+void CPWL_ListBox::SetCaret(int32_t nItemIndex)
{
if (m_pList)
m_pList->SetCaret(nItemIndex);
}
-void CPWL_ListBox::SetTopVisibleIndex(FX_INT32 nItemIndex)
+void CPWL_ListBox::SetTopVisibleIndex(int32_t nItemIndex)
{
if (m_pList)
m_pList->SetTopItem(nItemIndex);
}
-void CPWL_ListBox::ScrollToListItem(FX_INT32 nItemIndex)
+void CPWL_ListBox::ScrollToListItem(int32_t nItemIndex)
{
if (m_pList)
m_pList->ScrollToListItem(nItemIndex);
@@ -540,7 +540,7 @@ FX_BOOL CPWL_ListBox::IsMultipleSel() const
return FALSE;
}
-FX_INT32 CPWL_ListBox::GetCaretIndex() const
+int32_t CPWL_ListBox::GetCaretIndex() const
{
if (m_pList)
return m_pList->GetCaret();
@@ -548,7 +548,7 @@ FX_INT32 CPWL_ListBox::GetCaretIndex() const
return -1;
}
-FX_INT32 CPWL_ListBox::GetCurSel() const
+int32_t CPWL_ListBox::GetCurSel() const
{
if (m_pList)
return m_pList->GetSelect();
@@ -556,7 +556,7 @@ FX_INT32 CPWL_ListBox::GetCurSel() const
return -1;
}
-FX_BOOL CPWL_ListBox::IsItemSelected(FX_INT32 nItemIndex) const
+FX_BOOL CPWL_ListBox::IsItemSelected(int32_t nItemIndex) const
{
if (m_pList)
return m_pList->IsItemSelected(nItemIndex);
@@ -564,7 +564,7 @@ FX_BOOL CPWL_ListBox::IsItemSelected(FX_INT32 nItemIndex) const
return FALSE;
}
-FX_INT32 CPWL_ListBox::GetTopVisibleIndex() const
+int32_t CPWL_ListBox::GetTopVisibleIndex() const
{
if (m_pList)
{
@@ -575,7 +575,7 @@ FX_INT32 CPWL_ListBox::GetTopVisibleIndex() const
return -1;
}
-FX_INT32 CPWL_ListBox::GetCount() const
+int32_t CPWL_ListBox::GetCount() const
{
if (m_pList)
return m_pList->GetCount();
@@ -583,7 +583,7 @@ FX_INT32 CPWL_ListBox::GetCount() const
return 0;
}
-FX_INT32 CPWL_ListBox::FindNext(FX_INT32 nIndex,FX_WCHAR nChar) const
+int32_t CPWL_ListBox::FindNext(int32_t nIndex,FX_WCHAR nChar) const
{
if (m_pList)
return m_pList->FindNext(nIndex,nChar);
diff --git a/fpdfsdk/src/pdfwindow/PWL_ListCtrl.cpp b/fpdfsdk/src/pdfwindow/PWL_ListCtrl.cpp
index 9ac18fdc63..17d842165d 100644
--- a/fpdfsdk/src/pdfwindow/PWL_ListCtrl.cpp
+++ b/fpdfsdk/src/pdfwindow/PWL_ListCtrl.cpp
@@ -55,7 +55,7 @@ void CPWL_ListCtrl::ResetFace()
ResetAll(FALSE, 0);
}
-void CPWL_ListCtrl::ResetContent(FX_INT32 nStart)
+void CPWL_ListCtrl::ResetContent(int32_t nStart)
{
if (nStart < 0)
nStart = 0;
@@ -71,7 +71,7 @@ FX_FLOAT CPWL_ListCtrl::GetContentsHeight(FX_FLOAT fLimitWidth)
if (fLimitWidth > fBorderWidth* 2)
{
- for (FX_INT32 i=0,sz=m_aChildren.GetSize(); i<sz; i++)
+ for (int32_t i=0,sz=m_aChildren.GetSize(); i<sz; i++)
{
if (CPWL_Wnd* pChild = m_aChildren.GetAt(i))
{
@@ -91,7 +91,7 @@ FX_FLOAT CPWL_ListCtrl::GetContentsHeight(FX_FLOAT fLimitWidth)
return fRet;
}
-void CPWL_ListCtrl::ResetAll(FX_BOOL bMove, FX_INT32 nStart)
+void CPWL_ListCtrl::ResetAll(FX_BOOL bMove, int32_t nStart)
{
CPDF_Rect rcClient = GetClientRect();
@@ -103,7 +103,7 @@ void CPWL_ListCtrl::ResetAll(FX_BOOL bMove, FX_INT32 nStart)
if (CPWL_Wnd* pChild = m_aChildren.GetAt(nStart-1))
fy = pChild->GetWindowRect().bottom - m_fItemSpace;
- for (FX_INT32 i=nStart,sz=m_aChildren.GetSize(); i<sz; i++)
+ for (int32_t i=nStart,sz=m_aChildren.GetSize(); i<sz; i++)
{
if (CPWL_Wnd* pChild = m_aChildren.GetAt(i))
{
@@ -165,14 +165,14 @@ void CPWL_ListCtrl::DrawChildAppearance(CFX_RenderDevice* pDevice, CPDF_Matrix*
CPDF_Rect rcClient = GetClientRect();
CPDF_Rect rcTemp = rcClient;
pUser2Device->TransformRect(rcTemp);
- FX_RECT rcClip((FX_INT32)rcTemp.left,
- (FX_INT32)rcTemp.bottom,
- (FX_INT32)rcTemp.right,
- (FX_INT32)rcTemp.top);
+ FX_RECT rcClip((int32_t)rcTemp.left,
+ (int32_t)rcTemp.bottom,
+ (int32_t)rcTemp.right,
+ (int32_t)rcTemp.top);
pDevice->SetClip_Rect(&rcClip);
- for (FX_INT32 i=0,sz=m_aChildren.GetSize(); i<sz; i++)
+ for (int32_t i=0,sz=m_aChildren.GetSize(); i<sz; i++)
{
if (CPWL_Wnd * pChild = m_aChildren.GetAt(i))
{
@@ -196,9 +196,9 @@ void CPWL_ListCtrl::DrawChildAppearance(CFX_RenderDevice* pDevice, CPDF_Matrix*
pDevice->RestoreState();
}
-FX_INT32 CPWL_ListCtrl::GetItemIndex(CPWL_Wnd* pItem)
+int32_t CPWL_ListCtrl::GetItemIndex(CPWL_Wnd* pItem)
{
- for (FX_INT32 i=0, sz=m_aChildren.GetSize(); i<sz; i++)
+ for (int32_t i=0, sz=m_aChildren.GetSize(); i<sz; i++)
{
if (pItem == m_aChildren.GetAt(i))
return i;
diff --git a/fpdfsdk/src/pdfwindow/PWL_Note.cpp b/fpdfsdk/src/pdfwindow/PWL_Note.cpp
index 33d1b3b009..6e8ffcd546 100644
--- a/fpdfsdk/src/pdfwindow/PWL_Note.cpp
+++ b/fpdfsdk/src/pdfwindow/PWL_Note.cpp
@@ -179,7 +179,7 @@ void CPWL_Note_Edit::OnKillFocus()
CPWL_Edit::OnKillFocus();
}
-void CPWL_Note_Edit::OnNotify(CPWL_Wnd* pWnd, FX_DWORD msg, FX_INTPTR wParam, FX_INTPTR lParam)
+void CPWL_Note_Edit::OnNotify(CPWL_Wnd* pWnd, FX_DWORD msg, intptr_t wParam, intptr_t lParam)
{
if (m_bEnableNotify)
{
@@ -224,7 +224,7 @@ void CPWL_Note_Edit::OnNotify(CPWL_Wnd* pWnd, FX_DWORD msg, FX_INTPTR wParam, FX
if (CPWL_Wnd * pParent = this->GetParentWindow())
{
- pParent->OnNotify(this, PNM_SETCARETINFO, (FX_INTPTR)&newInfo, 0);
+ pParent->OnNotify(this, PNM_SETCARETINFO, (intptr_t)&newInfo, 0);
}
}
break;
@@ -340,7 +340,7 @@ CPWL_Note_Icon::~CPWL_Note_Icon()
{
}
-void CPWL_Note_Icon::SetIconType(FX_INT32 nType)
+void CPWL_Note_Icon::SetIconType(int32_t nType)
{
m_nType = nType;
}
@@ -481,14 +481,14 @@ CPWL_NoteItem* CPWL_Note_Contents::CreateSubItem()
return pNoteItem;
}
-FX_INT32 CPWL_Note_Contents::CountSubItems() const
+int32_t CPWL_Note_Contents::CountSubItems() const
{
return m_aChildren.GetSize() - 1;
}
-IPWL_NoteItem* CPWL_Note_Contents::GetSubItems(FX_INT32 index) const
+IPWL_NoteItem* CPWL_Note_Contents::GetSubItems(int32_t index) const
{
- FX_INT32 nIndex = index + 1;
+ int32_t nIndex = index + 1;
if (nIndex > 0 && nIndex < m_aChildren.GetSize())
if (CPWL_Wnd* pChild = m_aChildren.GetAt(nIndex))
@@ -502,7 +502,7 @@ IPWL_NoteItem* CPWL_Note_Contents::GetSubItems(FX_INT32 index) const
void CPWL_Note_Contents::DeleteSubItem(IPWL_NoteItem* pNoteItem)
{
- FX_INT32 nIndex = this->GetItemIndex((CPWL_NoteItem*)pNoteItem);
+ int32_t nIndex = this->GetItemIndex((CPWL_NoteItem*)pNoteItem);
if (nIndex > 0)
{
@@ -513,7 +513,7 @@ void CPWL_Note_Contents::DeleteSubItem(IPWL_NoteItem* pNoteItem)
delete pPWLNoteItem;
}
- for (FX_INT32 i=nIndex,sz=m_aChildren.GetSize(); i<sz; i++)
+ for (int32_t i=nIndex,sz=m_aChildren.GetSize(); i<sz; i++)
{
if (CPWL_Wnd* pChild = m_aChildren.GetAt(i))
{
@@ -531,7 +531,7 @@ IPWL_NoteItem* CPWL_Note_Contents::GetHitNoteItem(const CPDF_Point& point)
{
CPDF_Point pt = this->ParentToChild(point);
- for (FX_INT32 i=0,sz=m_aChildren.GetSize(); i<sz; i++)
+ for (int32_t i=0,sz=m_aChildren.GetSize(); i<sz; i++)
{
if (CPWL_Wnd* pChild = m_aChildren.GetAt(i))
{
@@ -546,20 +546,20 @@ IPWL_NoteItem* CPWL_Note_Contents::GetHitNoteItem(const CPDF_Point& point)
return NULL;
}
-void CPWL_Note_Contents::OnNotify(CPWL_Wnd* pWnd, FX_DWORD msg, FX_INTPTR wParam, FX_INTPTR lParam)
+void CPWL_Note_Contents::OnNotify(CPWL_Wnd* pWnd, FX_DWORD msg, intptr_t wParam, intptr_t lParam)
{
switch (msg)
{
case PNM_NOTEEDITCHANGED:
{
- FX_INT32 nIndex = this->GetItemIndex(pWnd);
+ int32_t nIndex = this->GetItemIndex(pWnd);
if (nIndex < 0) nIndex = 0;
m_pEdit->EnableNotify(FALSE);
this->ResetContent(nIndex);
m_pEdit->EnableNotify(TRUE);
- for (FX_INT32 i=nIndex+1, sz=m_aChildren.GetSize(); i<sz; i++)
+ for (int32_t i=nIndex+1, sz=m_aChildren.GetSize(); i<sz; i++)
{
if (CPWL_Wnd* pChild = m_aChildren.GetAt(i))
pChild->OnNotify(this, PNM_NOTERESET, 0, 0);
@@ -586,7 +586,7 @@ void CPWL_Note_Contents::OnNotify(CPWL_Wnd* pWnd, FX_DWORD msg, FX_INTPTR wParam
if (CPWL_Wnd * pParent = this->GetParentWindow())
{
- pParent->OnNotify(this, PNM_SETCARETINFO, (FX_INTPTR)&newInfo, 0);
+ pParent->OnNotify(this, PNM_SETCARETINFO, (intptr_t)&newInfo, 0);
}
}
return;
@@ -596,7 +596,7 @@ void CPWL_Note_Contents::OnNotify(CPWL_Wnd* pWnd, FX_DWORD msg, FX_INTPTR wParam
this->ResetContent(0);
m_pEdit->EnableNotify(TRUE);
- for (FX_INT32 i=1, sz=m_aChildren.GetSize(); i<sz; i++)
+ for (int32_t i=1, sz=m_aChildren.GetSize(); i<sz; i++)
{
if (CPWL_Wnd* pChild = m_aChildren.GetAt(i))
pChild->OnNotify(this, PNM_NOTERESET, 0, 0);
@@ -645,7 +645,7 @@ void CPWL_Note_Contents::EnableModify(FX_BOOL bEnabled)
else
m_pEdit->RemoveFlag(PWS_READONLY);
- for (FX_INT32 i=0,sz=m_aChildren.GetSize(); i<sz; i++)
+ for (int32_t i=0,sz=m_aChildren.GetSize(); i<sz; i++)
{
if (CPWL_Wnd* pChild = m_aChildren.GetAt(i))
{
@@ -665,7 +665,7 @@ void CPWL_Note_Contents::EnableRead(FX_BOOL bEnabled)
else
m_pEdit->RemoveFlag(PES_NOREAD);
- for (FX_INT32 i=0,sz=m_aChildren.GetSize(); i<sz; i++)
+ for (int32_t i=0,sz=m_aChildren.GetSize(); i<sz; i++)
{
if (CPWL_Wnd* pChild = m_aChildren.GetAt(i))
{
@@ -831,7 +831,7 @@ void CPWL_NoteItem::SetAuthorName(const CFX_WideString& sName)
}
}
-void CPWL_NoteItem::ResetSubjectName(FX_INT32 nItemIndex)
+void CPWL_NoteItem::ResetSubjectName(int32_t nItemIndex)
{
if (nItemIndex < 0)
{
@@ -966,7 +966,7 @@ IPWL_NoteItem* CPWL_NoteItem::CreateSubItem()
return CreateNoteItem();
}
-FX_INT32 CPWL_NoteItem::CountSubItems() const
+int32_t CPWL_NoteItem::CountSubItems() const
{
if (m_pContents)
return m_pContents->CountSubItems();
@@ -974,7 +974,7 @@ FX_INT32 CPWL_NoteItem::CountSubItems() const
return 0;
}
-IPWL_NoteItem* CPWL_NoteItem::GetSubItems(FX_INT32 index) const
+IPWL_NoteItem* CPWL_NoteItem::GetSubItems(int32_t index) const
{
if (m_pContents)
return m_pContents->GetSubItems(index);
@@ -1095,7 +1095,7 @@ FX_BOOL CPWL_NoteItem::OnRButtonUp(const CPDF_Point & point, FX_DWORD nFlag)
return CPWL_Wnd::OnRButtonUp(point,nFlag);
}
-void CPWL_NoteItem::OnNotify(CPWL_Wnd* pWnd, FX_DWORD msg, FX_INTPTR wParam, FX_INTPTR lParam)
+void CPWL_NoteItem::OnNotify(CPWL_Wnd* pWnd, FX_DWORD msg, intptr_t wParam, intptr_t lParam)
{
switch (msg)
{
@@ -1117,7 +1117,7 @@ void CPWL_NoteItem::OnNotify(CPWL_Wnd* pWnd, FX_DWORD msg, FX_INTPTR wParam, FX_
if (CPWL_Wnd * pParent = this->GetParentWindow())
{
- pParent->OnNotify(this, PNM_SETCARETINFO, (FX_INTPTR)&newInfo, 0);
+ pParent->OnNotify(this, PNM_SETCARETINFO, (intptr_t)&newInfo, 0);
}
}
return;
@@ -1135,7 +1135,7 @@ void CPWL_NoteItem::PopupNoteItemMenu(const CPDF_Point& point)
{
if (IPWL_NoteNotify* pNotify = GetNoteNotify())
{
- FX_INT32 x,y;
+ int32_t x,y;
PWLtoWnd(point, x, y);
if (IFX_SystemHandler* pSH = GetSystemHandler())
pSH->ClientToScreen(GetAttachedHWnd(), x, y);
@@ -1247,7 +1247,7 @@ void CPWL_Note::RePosChildWnd()
}
}
//CPDF_Point ptNew = m_pContents->GetScrollPos();
- //m_pContentsBar->OnNotify(this, PNM_SETSCROLLPOS, SBT_VSCROLL, (FX_INTPTR)&ptNew.y);
+ //m_pContentsBar->OnNotify(this, PNM_SETSCROLLPOS, SBT_VSCROLL, (intptr_t)&ptNew.y);
}
FX_BOOL CPWL_Note::ResetScrollBar()
@@ -1420,7 +1420,7 @@ void CPWL_Note::RePosNoteChildren()
}
//0-normal / 1-caption / 2-leftbottom corner / 3-rightbottom corner / 4-close / 5-options
-FX_INT32 CPWL_Note::NoteHitTest(const CPDF_Point& point) const
+int32_t CPWL_Note::NoteHitTest(const CPDF_Point& point) const
{
ASSERT(m_pSubject != NULL);
ASSERT(m_pDateTime != NULL);
@@ -1570,8 +1570,8 @@ FX_BOOL CPWL_Note::OnMouseWheel(short zDelta, const CPDF_Point & point, FX_DWORD
if (ptNew.y != ptScroll.y)
{
m_pContents->OnNotify(this, PNM_NOTERESET, 0, 0);
- m_pContents->OnNotify(this, PNM_SCROLLWINDOW, SBT_VSCROLL, (FX_INTPTR)&ptNew.y);
- m_pContentsBar->OnNotify(this, PNM_SETSCROLLPOS, SBT_VSCROLL, (FX_INTPTR)&ptNew.y);
+ m_pContents->OnNotify(this, PNM_SCROLLWINDOW, SBT_VSCROLL, (intptr_t)&ptNew.y);
+ m_pContentsBar->OnNotify(this, PNM_SETSCROLLPOS, SBT_VSCROLL, (intptr_t)&ptNew.y);
return TRUE;
}
@@ -1580,7 +1580,7 @@ FX_BOOL CPWL_Note::OnMouseWheel(short zDelta, const CPDF_Point & point, FX_DWORD
return FALSE;
}
-void CPWL_Note::OnNotify(CPWL_Wnd* pWnd, FX_DWORD msg, FX_INTPTR wParam, FX_INTPTR lParam)
+void CPWL_Note::OnNotify(CPWL_Wnd* pWnd, FX_DWORD msg, intptr_t wParam, intptr_t lParam)
{
switch (msg)
{
@@ -1615,7 +1615,7 @@ void CPWL_Note::OnNotify(CPWL_Wnd* pWnd, FX_DWORD msg, FX_INTPTR wParam, FX_INTP
{
if (m_pContentsBar->IsVisible())
{
- m_pContentsBar->OnNotify(pWnd, PNM_SETSCROLLINFO, SBT_VSCROLL, (FX_INTPTR)&sInfo);
+ m_pContentsBar->OnNotify(pWnd, PNM_SETSCROLLINFO, SBT_VSCROLL, (intptr_t)&sInfo);
m_OldScrollInfo = sInfo;
CPDF_Point ptScroll = m_pContents->GetScrollPos();
@@ -1630,9 +1630,9 @@ void CPWL_Note::OnNotify(CPWL_Wnd* pWnd, FX_DWORD msg, FX_INTPTR wParam, FX_INTP
if (ptOld.y != ptScroll.y)
{
- m_pContentsBar->OnNotify(this, PNM_SETSCROLLPOS, SBT_VSCROLL, (FX_INTPTR)&ptScroll.y);
+ m_pContentsBar->OnNotify(this, PNM_SETSCROLLPOS, SBT_VSCROLL, (intptr_t)&ptScroll.y);
m_pContentsBar->InvalidateRect(NULL);
- m_pContents->OnNotify(this, PNM_SCROLLWINDOW, SBT_VSCROLL, (FX_INTPTR)&ptScroll.y);
+ m_pContents->OnNotify(this, PNM_SCROLLWINDOW, SBT_VSCROLL, (intptr_t)&ptScroll.y);
}
}
}
@@ -1662,10 +1662,10 @@ void CPWL_Note::OnNotify(CPWL_Wnd* pWnd, FX_DWORD msg, FX_INTPTR wParam, FX_INTP
if (pInfo->ptHead.y > rcClient.top)
{
CPDF_Point pt = m_pContents->OutToIn(pInfo->ptHead);
- m_pContents->OnNotify(this, PNM_SCROLLWINDOW, SBT_VSCROLL, (FX_INTPTR)&pt.y);
+ m_pContents->OnNotify(this, PNM_SCROLLWINDOW, SBT_VSCROLL, (intptr_t)&pt.y);
CPDF_Point ptScroll = m_pContents->GetScrollPos();
- m_pContentsBar->OnNotify(this, PNM_SETSCROLLPOS, SBT_VSCROLL, (FX_INTPTR)&ptScroll.y);
+ m_pContentsBar->OnNotify(this, PNM_SETSCROLLPOS, SBT_VSCROLL, (intptr_t)&ptScroll.y);
return;
}
@@ -1674,10 +1674,10 @@ void CPWL_Note::OnNotify(CPWL_Wnd* pWnd, FX_DWORD msg, FX_INTPTR wParam, FX_INTP
{
CPDF_Point pt = m_pContents->OutToIn(pInfo->ptFoot);
pt.y += rcClient.Height();
- m_pContents->OnNotify(this, PNM_SCROLLWINDOW, SBT_VSCROLL, (FX_INTPTR)&pt.y);
+ m_pContents->OnNotify(this, PNM_SCROLLWINDOW, SBT_VSCROLL, (intptr_t)&pt.y);
CPDF_Point ptScroll = m_pContents->GetScrollPos();
- m_pContentsBar->OnNotify(this, PNM_SETSCROLLPOS, SBT_VSCROLL, (FX_INTPTR)&ptScroll.y);
+ m_pContentsBar->OnNotify(this, PNM_SETSCROLLPOS, SBT_VSCROLL, (intptr_t)&ptScroll.y);
return;
}
@@ -1717,7 +1717,7 @@ FX_BOOL CPWL_Note::OnLButtonDown(const CPDF_Point& point, FX_DWORD nFlag)
{
if (IPWL_NoteNotify* pNotify = this->GetNoteNotify())
{
- FX_INT32 x, y;
+ int32_t x, y;
PWLtoWnd(point, x, y);
if (IFX_SystemHandler* pSH = GetSystemHandler())
pSH->ClientToScreen(GetAttachedHWnd(), x, y);
@@ -1749,7 +1749,7 @@ IPWL_NoteNotify* CPWL_Note::GetNoteNotify() const
return NULL;
}
-void CPWL_Note::SetIconType(FX_INT32 nType)
+void CPWL_Note::SetIconType(int32_t nType)
{
if (m_pIcon)
m_pIcon->SetIconType(nType);
diff --git a/fpdfsdk/src/pdfwindow/PWL_ScrollBar.cpp b/fpdfsdk/src/pdfwindow/PWL_ScrollBar.cpp
index 772e184902..ad293bc578 100644
--- a/fpdfsdk/src/pdfwindow/PWL_ScrollBar.cpp
+++ b/fpdfsdk/src/pdfwindow/PWL_ScrollBar.cpp
@@ -281,7 +281,7 @@ void CPWL_SBButton::DrawThisAppearance(CFX_RenderDevice* pDevice, CPDF_Matrix* p
if (rectWnd.IsEmpty()) return;
CPDF_Point ptCenter = this->GetCenterPoint();
- FX_INT32 nTransparancy = this->GetTransparency();
+ int32_t nTransparancy = this->GetTransparency();
switch (this->m_eScrollBarType)
{
@@ -570,7 +570,7 @@ FX_BOOL CPWL_SBButton::OnLButtonDown(const CPDF_Point & point, FX_DWORD nFlag)
CPWL_Wnd::OnLButtonDown(point,nFlag);
if (CPWL_Wnd * pParent = GetParentWindow())
- pParent->OnNotify(this,PNM_LBUTTONDOWN,0,(FX_INTPTR)&point);
+ pParent->OnNotify(this,PNM_LBUTTONDOWN,0,(intptr_t)&point);
m_bMouseDown = TRUE;
SetCapture();
@@ -583,7 +583,7 @@ FX_BOOL CPWL_SBButton::OnLButtonUp(const CPDF_Point & point, FX_DWORD nFlag)
CPWL_Wnd::OnLButtonUp(point,nFlag);
if (CPWL_Wnd * pParent = GetParentWindow())
- pParent->OnNotify(this,PNM_LBUTTONUP,0,(FX_INTPTR)&point);
+ pParent->OnNotify(this,PNM_LBUTTONUP,0,(intptr_t)&point);
m_bMouseDown = FALSE;
ReleaseCapture();
@@ -597,12 +597,12 @@ FX_BOOL CPWL_SBButton::OnMouseMove(const CPDF_Point & point, FX_DWORD nFlag)
if (CPWL_Wnd * pParent = GetParentWindow())
{
- pParent->OnNotify(this,PNM_MOUSEMOVE,0,(FX_INTPTR)&point);
+ pParent->OnNotify(this,PNM_MOUSEMOVE,0,(intptr_t)&point);
/*
if (m_bMouseDown && (m_eSBButtonType == PSBT_MIN || m_eSBButtonType == PSBT_MAX))
{
- if (!pParent->OnNotify(this,PNM_LBUTTONDOWN,nFlags,(FX_INTPTR)&point))
+ if (!pParent->OnNotify(this,PNM_LBUTTONDOWN,nFlags,(intptr_t)&point))
return FALSE;
}
*/
@@ -840,7 +840,7 @@ FX_BOOL CPWL_ScrollBar::OnLButtonUp(const CPDF_Point & point, FX_DWORD nFlag)
return TRUE;
}
-void CPWL_ScrollBar::OnNotify(CPWL_Wnd* pWnd, FX_DWORD msg, FX_INTPTR wParam, FX_INTPTR lParam)
+void CPWL_ScrollBar::OnNotify(CPWL_Wnd* pWnd, FX_DWORD msg, intptr_t wParam, intptr_t lParam)
{
CPWL_Wnd::OnNotify(pWnd,msg,wParam,lParam);
@@ -1214,7 +1214,7 @@ void CPWL_ScrollBar::NotifyScrollWindow()
fPos = m_OriginInfo.fContentMax - m_sData.fScrollPos;
break;
}
- pParent->OnNotify(this,PNM_SCROLLWINDOW,(FX_INTPTR)m_sbType,(FX_INTPTR)&fPos);
+ pParent->OnNotify(this,PNM_SCROLLWINDOW,(intptr_t)m_sbType,(intptr_t)&fPos);
}
}
diff --git a/fpdfsdk/src/pdfwindow/PWL_Signature.cpp b/fpdfsdk/src/pdfwindow/PWL_Signature.cpp
index 5d79ce9cab..fe07630057 100644
--- a/fpdfsdk/src/pdfwindow/PWL_Signature.cpp
+++ b/fpdfsdk/src/pdfwindow/PWL_Signature.cpp
@@ -42,8 +42,8 @@ void CPWL_Signature_Image::DrawThisAppearance(CFX_RenderDevice* pDevice, CPDF_Ma
FX_FLOAT x, y;
pUser2Device->Transform(rcClient.left, rcClient.top, x, y);
- pDevice->StretchDIBits(m_pImage, (FX_INT32)x, (FX_INT32)y,
- (FX_INT32)rcClient.Width(), (FX_INT32)rcClient.Height());
+ pDevice->StretchDIBits(m_pImage, (int32_t)x, (int32_t)y,
+ (int32_t)rcClient.Width(), (int32_t)rcClient.Height());
}
}
diff --git a/fpdfsdk/src/pdfwindow/PWL_Utils.cpp b/fpdfsdk/src/pdfwindow/PWL_Utils.cpp
index b57f8e019d..884807364e 100644
--- a/fpdfsdk/src/pdfwindow/PWL_Utils.cpp
+++ b/fpdfsdk/src/pdfwindow/PWL_Utils.cpp
@@ -16,11 +16,11 @@
/* ---------------------------- CPWL_Utils ------------------------------ */
-CFX_ByteString CPWL_Utils::GetAppStreamFromArray(const CPWL_PathData* pPathData, FX_INT32 nCount)
+CFX_ByteString CPWL_Utils::GetAppStreamFromArray(const CPWL_PathData* pPathData, int32_t nCount)
{
CFX_ByteTextBuf csAP;
- for (FX_INT32 i=0; i<nCount; i++)
+ for (int32_t i=0; i<nCount; i++)
{
switch (pPathData[i].type)
{
@@ -45,11 +45,11 @@ CFX_ByteString CPWL_Utils::GetAppStreamFromArray(const CPWL_PathData* pPathData,
return csAP.GetByteString();
}
-void CPWL_Utils::GetPathDataFromArray(CFX_PathData& path, const CPWL_PathData* pPathData, FX_INT32 nCount)
+void CPWL_Utils::GetPathDataFromArray(CFX_PathData& path, const CPWL_PathData* pPathData, int32_t nCount)
{
path.SetPointCount(nCount);
- for (FX_INT32 i=0; i<nCount; i++)
+ for (int32_t i=0; i<nCount; i++)
{
switch (pPathData[i].type)
{
@@ -143,7 +143,7 @@ CFX_ByteString CPWL_Utils::GetAP_Check(const CPDF_Rect & crBBox)
FX_FLOAT fWidth = crBBox.right - crBBox.left;
FX_FLOAT fHeight = crBBox.top - crBBox.bottom;
- const FX_INT32 num = 8;
+ const int32_t num = 8;
CPWL_Point pts[num*3] =
{
@@ -188,7 +188,7 @@ CFX_ByteString CPWL_Utils::GetAP_Check(const CPDF_Rect & crBBox)
CPWL_Point(0.30f, 0.56f)
};
- for (FX_INT32 j=0; j<num*3; j++)
+ for (int32_t j=0; j<num*3; j++)
{
pts[j].x *= fWidth;
pts[j].x += crBBox.left;
@@ -199,12 +199,12 @@ CFX_ByteString CPWL_Utils::GetAP_Check(const CPDF_Rect & crBBox)
csAP << pts[0].x << " " << pts[0].y << " m\n";
- for (FX_INT32 i=0; i<num; i++)
+ for (int32_t i=0; i<num; i++)
{
- FX_INT32 nCur = i*3;
- FX_INT32 n1 = i*3 + 1;
- FX_INT32 n2 = i*3 + 2;
- FX_INT32 nNext = (i < num-1 ? (i+1)*3 : 0);
+ int32_t nCur = i*3;
+ int32_t n1 = i*3 + 1;
+ int32_t n2 = i*3 + 2;
+ int32_t nNext = (i < num-1 ? (i+1)*3 : 0);
FX_FLOAT px1 = pts[n1].x - pts[nCur].x;
FX_FLOAT py1 = pts[n1].y - pts[nCur].y;
@@ -321,7 +321,7 @@ CFX_ByteString CPWL_Utils::GetAP_Star(const CPDF_Rect & crBBox)
FX_FLOAT fAngel = PWL_PI/10.0f;
- for (FX_INT32 i=0; i<5; i++)
+ for (int32_t i=0; i<5; i++)
{
px[i] = ptCenter.x + fRadius * (FX_FLOAT)cos(fAngel);
py[i] = ptCenter.y + fRadius * (FX_FLOAT)sin(fAngel);
@@ -331,8 +331,8 @@ CFX_ByteString CPWL_Utils::GetAP_Star(const CPDF_Rect & crBBox)
csAP << px[0] << " " << py[0] << " m\n";
- FX_INT32 nNext = 0;
- for (FX_INT32 j=0; j<5; j++)
+ int32_t nNext = 0;
+ for (int32_t j=0; j<5; j++)
{
nNext += 2;
if (nNext >= 5) nNext -= 5;
@@ -476,7 +476,7 @@ static CFX_ByteString GetSquigglyAppearanceStream(FX_FLOAT fStartX, FX_FLOAT fEn
sRet << "0 w\n" << fStartX << " " << fY << " m\n";
FX_FLOAT fx;
- FX_INT32 i;
+ int32_t i;
for (i=1,fx=fStartX+fStep; fx<fEndX; fx+=fStep,i++)
{
@@ -635,7 +635,7 @@ CFX_ByteString CPWL_Utils::GetSpellCheckAppStream(IFX_Edit* pEdit, IPWL_SpellChe
}
CFX_ByteString CPWL_Utils::GetTextAppStream(const CPDF_Rect & rcBBox,IFX_Edit_FontMap * pFontMap,
- const CFX_WideString & sText, FX_INT32 nAlignmentH, FX_INT32 nAlignmentV,
+ const CFX_WideString & sText, int32_t nAlignmentH, int32_t nAlignmentV,
FX_FLOAT fFontSize, FX_BOOL bMultiLine, FX_BOOL bAutoReturn, const CPWL_Color & crText)
{
CFX_ByteTextBuf sRet;
@@ -674,7 +674,7 @@ CFX_ByteString CPWL_Utils::GetPushButtonAppStream(const CPDF_Rect & rcBBox,
const CFX_WideString & sLabel,
const CPWL_Color & crText,
FX_FLOAT fFontSize,
- FX_INT32 nLayOut)
+ int32_t nLayOut)
{
const FX_FLOAT fAutoFontScale = 1.0f / 3.0f;
@@ -947,7 +947,7 @@ CFX_ByteString CPWL_Utils::GetColorAppStream(const CPWL_Color & color,const FX_B
CFX_ByteString CPWL_Utils::GetBorderAppStream(const CPDF_Rect & rect, FX_FLOAT fWidth,
const CPWL_Color & color, const CPWL_Color & crLeftTop, const CPWL_Color & crRightBottom,
- FX_INT32 nStyle, const CPWL_Dash & dash)
+ int32_t nStyle, const CPWL_Dash & dash)
{
CFX_ByteTextBuf sAppStream;
CFX_ByteString sColor;
@@ -1045,7 +1045,7 @@ CFX_ByteString CPWL_Utils::GetBorderAppStream(const CPDF_Rect & rect, FX_FLOAT f
CFX_ByteString CPWL_Utils::GetCircleBorderAppStream(const CPDF_Rect & rect, FX_FLOAT fWidth,
const CPWL_Color & color, const CPWL_Color & crLeftTop, const CPWL_Color & crRightBottom,
- FX_INT32 nStyle, const CPWL_Dash & dash)
+ int32_t nStyle, const CPWL_Dash & dash)
{
CFX_ByteTextBuf sAppStream;
CFX_ByteString sColor;
@@ -1248,7 +1248,7 @@ CFX_ByteString CPWL_Utils::GetAppStream_Star(const CPDF_Rect & rcBBox, const CPW
}
CFX_ByteString CPWL_Utils::GetCheckBoxAppStream(const CPDF_Rect & rcBBox,
- FX_INT32 nStyle,
+ int32_t nStyle,
const CPWL_Color & crText)
{
CPDF_Rect rcCenter = GetCenterSquare(rcBBox);
@@ -1271,7 +1271,7 @@ CFX_ByteString CPWL_Utils::GetCheckBoxAppStream(const CPDF_Rect & rcBBox,
}
CFX_ByteString CPWL_Utils::GetRadioButtonAppStream(const CPDF_Rect & rcBBox,
- FX_INT32 nStyle,
+ int32_t nStyle,
const CPWL_Color & crText)
{
CPDF_Rect rcCenter = GetCenterSquare(rcBBox);
@@ -1376,7 +1376,7 @@ void CPWL_Utils::ConvertRGB2CMYK(FX_FLOAT dR,FX_FLOAT dG,FX_FLOAT dB,FX_FLOAT &d
dK = FX_MIN(dC, FX_MIN(dM, dY));
}
-void CPWL_Utils::PWLColorToARGB(const CPWL_Color& color, FX_INT32& alpha, FX_FLOAT& red, FX_FLOAT& green, FX_FLOAT& blue)
+void CPWL_Utils::PWLColorToARGB(const CPWL_Color& color, int32_t& alpha, FX_FLOAT& red, FX_FLOAT& green, FX_FLOAT& blue)
{
switch (color.nColorType)
{
@@ -1406,16 +1406,16 @@ void CPWL_Utils::PWLColorToARGB(const CPWL_Color& color, FX_INT32& alpha, FX_FLO
}
}
-FX_COLORREF CPWL_Utils::PWLColorToFXColor(const CPWL_Color& color, FX_INT32 nTransparancy)
+FX_COLORREF CPWL_Utils::PWLColorToFXColor(const CPWL_Color& color, int32_t nTransparancy)
{
- FX_INT32 nAlpha = nTransparancy;
+ int32_t nAlpha = nTransparancy;
FX_FLOAT dRed = 0;
FX_FLOAT dGreen = 0;
FX_FLOAT dBlue = 0;
PWLColorToARGB(color, nAlpha, dRed, dGreen, dBlue);
- return ArgbEncode(nAlpha, (FX_INT32)(dRed*255), (FX_INT32)(dGreen*255), (FX_INT32)(dBlue*255));
+ return ArgbEncode(nAlpha, (int32_t)(dRed*255), (int32_t)(dGreen*255), (int32_t)(dBlue*255));
}
void CPWL_Utils::DrawFillRect(CFX_RenderDevice* pDevice, CPDF_Matrix* pUser2Device,const CPDF_Rect & rect,
@@ -1428,13 +1428,13 @@ void CPWL_Utils::DrawFillRect(CFX_RenderDevice* pDevice, CPDF_Matrix* pUser2Devi
}
void CPWL_Utils::DrawFillArea(CFX_RenderDevice* pDevice, CPDF_Matrix* pUser2Device,
- const CPDF_Point* pPts, FX_INT32 nCount, const FX_COLORREF& color)
+ const CPDF_Point* pPts, int32_t nCount, const FX_COLORREF& color)
{
CFX_PathData path;
path.SetPointCount(nCount);
path.SetPoint(0, pPts[0].x, pPts[0].y, FXPT_MOVETO);
- for (FX_INT32 i=1; i<nCount; i++)
+ for (int32_t i=1; i<nCount; i++)
path.SetPoint(i, pPts[i].x, pPts[i].y, FXPT_LINETO);
pDevice->DrawPath(&path, pUser2Device, NULL, color, 0, FXFILL_ALTERNATE);
@@ -1468,14 +1468,14 @@ void CPWL_Utils::DrawStrokeLine(CFX_RenderDevice* pDevice, CPDF_Matrix* pUser2De
}
void CPWL_Utils::DrawFillRect(CFX_RenderDevice* pDevice, CPDF_Matrix* pUser2Device,const CPDF_Rect & rect,
- const CPWL_Color & color, FX_INT32 nTransparancy)
+ const CPWL_Color & color, int32_t nTransparancy)
{
CPWL_Utils::DrawFillRect(pDevice,pUser2Device,rect,PWLColorToFXColor(color,nTransparancy));
}
void CPWL_Utils::DrawShadow(CFX_RenderDevice* pDevice, CPDF_Matrix* pUser2Device,
FX_BOOL bVertical, FX_BOOL bHorizontal, CPDF_Rect rect,
- FX_INT32 nTransparancy, FX_INT32 nStartGray, FX_INT32 nEndGray)
+ int32_t nTransparancy, int32_t nStartGray, int32_t nEndGray)
{
FX_FLOAT fStepGray = 1.0f;
@@ -1485,7 +1485,7 @@ void CPWL_Utils::DrawShadow(CFX_RenderDevice* pDevice, CPDF_Matrix* pUser2Device
for (FX_FLOAT fy=rect.bottom+0.5f; fy<=rect.top-0.5f; fy+=1.0f)
{
- FX_INT32 nGray = nStartGray + (FX_INT32)(fStepGray * (fy-rect.bottom));
+ int32_t nGray = nStartGray + (int32_t)(fStepGray * (fy-rect.bottom));
CPWL_Utils::DrawStrokeLine(pDevice, pUser2Device, CPDF_Point(rect.left, fy),
CPDF_Point(rect.right, fy), ArgbEncode(nTransparancy, nGray, nGray, nGray), 1.5f);
}
@@ -1497,7 +1497,7 @@ void CPWL_Utils::DrawShadow(CFX_RenderDevice* pDevice, CPDF_Matrix* pUser2Device
for (FX_FLOAT fx=rect.left+0.5f; fx<=rect.right-0.5f; fx+=1.0f)
{
- FX_INT32 nGray = nStartGray + (FX_INT32)(fStepGray * (fx-rect.left));
+ int32_t nGray = nStartGray + (int32_t)(fStepGray * (fx-rect.left));
CPWL_Utils::DrawStrokeLine(pDevice, pUser2Device, CPDF_Point(fx, rect.bottom),
CPDF_Point(fx, rect.top), ArgbEncode(nTransparancy, nGray, nGray, nGray), 1.5f);
}
@@ -1507,7 +1507,7 @@ void CPWL_Utils::DrawShadow(CFX_RenderDevice* pDevice, CPDF_Matrix* pUser2Device
void CPWL_Utils::DrawBorder(CFX_RenderDevice* pDevice, CPDF_Matrix* pUser2Device,
const CPDF_Rect & rect, FX_FLOAT fWidth,
const CPWL_Color & color, const CPWL_Color & crLeftTop, const CPWL_Color & crRightBottom,
- FX_INT32 nStyle, const CPWL_Dash & dash, FX_INT32 nTransparancy)
+ int32_t nStyle, const CPWL_Dash & dash, int32_t nTransparancy)
{
FX_FLOAT fLeft = rect.left;
FX_FLOAT fRight = rect.right;
@@ -1622,7 +1622,7 @@ static void AddSquigglyPath(CFX_PathData & PathData, FX_FLOAT fStartX, FX_FLOAT
PathData.SetPoint(PathData.GetPointCount() - 1, fStartX, fY, FXPT_MOVETO);
FX_FLOAT fx;
- FX_INT32 i;
+ int32_t i;
for (i=1,fx=fStartX+fStep; fx<fEndX; fx+=fStep,i++)
{
@@ -1713,10 +1713,10 @@ void CPWL_Utils::DrawEditSpellCheck(CFX_RenderDevice* pDevice, CPDF_Matrix* pUse
CPDF_Rect rcTemp = rcClip;
pUser2Device->TransformRect(rcTemp);
FX_RECT rcDevClip;
- rcDevClip.left = (FX_INT32)rcTemp.left;
- rcDevClip.right = (FX_INT32)rcTemp.right;
- rcDevClip.top = (FX_INT32)rcTemp.top;
- rcDevClip.bottom = (FX_INT32)rcTemp.bottom;
+ rcDevClip.left = (int32_t)rcTemp.left;
+ rcDevClip.right = (int32_t)rcTemp.right;
+ rcDevClip.top = (int32_t)rcTemp.top;
+ rcDevClip.bottom = (int32_t)rcTemp.bottom;
pDevice->SetClip_Rect(&rcDevClip);
}
@@ -1848,7 +1848,7 @@ CPWL_Color CPWL_Utils::GetReverseColor(const CPWL_Color& color)
return crRet;
}
-CFX_ByteString CPWL_Utils::GetIconAppStream(FX_INT32 nType, const CPDF_Rect& rect, const CPWL_Color& crFill,
+CFX_ByteString CPWL_Utils::GetIconAppStream(int32_t nType, const CPDF_Rect& rect, const CPWL_Color& crFill,
const CPWL_Color& crStroke)
{
CFX_ByteString sAppStream = CPWL_Utils::GetColorAppStream(crStroke, FALSE);
@@ -1931,7 +1931,7 @@ CFX_ByteString CPWL_Utils::GetIconAppStream(FX_INT32 nType, const CPDF_Rect& rec
}
void CPWL_Utils::DrawIconAppStream(CFX_RenderDevice* pDevice, CPDF_Matrix* pUser2Device,
- FX_INT32 nType, const CPDF_Rect & rect, const CPWL_Color& crFill, const CPWL_Color& crStroke, const FX_INT32 nTransparancy)
+ int32_t nType, const CPDF_Rect & rect, const CPWL_Color& crFill, const CPWL_Color& crStroke, const int32_t nTransparancy)
{
CFX_GraphStateData gsd;
gsd.m_LineWidth = 1.0f;
@@ -2477,7 +2477,7 @@ void CPWL_Utils::GetGraphics_Star(CFX_ByteString& sPathData, CFX_PathData& path,
FX_FLOAT fAngel = PWL_PI/10.0f;
- for (FX_INT32 i=0; i<5; i++)
+ for (int32_t i=0; i<5; i++)
{
px1[i] = ptCenter.x + fLongRadius * (FX_FLOAT)cos(fAngel);
py1[i] = ptCenter.y + fLongRadius * (FX_FLOAT)sin(fAngel);
@@ -2487,7 +2487,7 @@ void CPWL_Utils::GetGraphics_Star(CFX_ByteString& sPathData, CFX_PathData& path,
fAngel = PWL_PI/5.0f + PWL_PI/10.0f;
- for (FX_INT32 j=0; j<5; j++)
+ for (int32_t j=0; j<5; j++)
{
px2[j] = ptCenter.x + fShortRadius * (FX_FLOAT)cos(fAngel);
py2[j] = ptCenter.y + fShortRadius * (FX_FLOAT)sin(fAngel);
@@ -2499,7 +2499,7 @@ void CPWL_Utils::GetGraphics_Star(CFX_ByteString& sPathData, CFX_PathData& path,
PathArray[0] = CPWL_PathData(CPWL_Point(px1[0], py1[0]), PWLPT_MOVETO);
PathArray[1] = CPWL_PathData(CPWL_Point(px2[0], py2[0]), PWLPT_LINETO);
- for(FX_INT32 k = 0; k < 4; k++)
+ for(int32_t k = 0; k < 4; k++)
{
PathArray[(k+1)*2] = CPWL_PathData(CPWL_Point(px1[k+1], py1[k+1]), PWLPT_LINETO);
PathArray[(k+1)*2 + 1] = CPWL_PathData(CPWL_Point(px2[k+1], py2[k+1]), PWLPT_LINETO);
@@ -2795,7 +2795,7 @@ void CPWL_Utils::GetGraphics_Foxit(CFX_ByteString& sPathData, CFX_PathData& path
GetPathDataFromArray(path, PathArray, 23);
}
-void CPWL_Color::ConvertColorType(FX_INT32 nColorType)
+void CPWL_Color::ConvertColorType(int32_t nColorType)
{
switch (this->nColorType)
{
diff --git a/fpdfsdk/src/pdfwindow/PWL_Wnd.cpp b/fpdfsdk/src/pdfwindow/PWL_Wnd.cpp
index 69535d7d85..c621508885 100644
--- a/fpdfsdk/src/pdfwindow/PWL_Wnd.cpp
+++ b/fpdfsdk/src/pdfwindow/PWL_Wnd.cpp
@@ -11,10 +11,10 @@
/* -------------------------- CPWL_Timer -------------------------- */
-static CFX_MapPtrTemplate<FX_INT32, CPWL_Timer*>& GetPWLTimeMap()
+static CFX_MapPtrTemplate<int32_t, CPWL_Timer*>& GetPWLTimeMap()
{
// Leak the object at shutdown.
- static auto timeMap = new CFX_MapPtrTemplate<FX_INT32, CPWL_Timer*>;
+ static auto timeMap = new CFX_MapPtrTemplate<int32_t, CPWL_Timer*>;
return *timeMap;
}
@@ -32,7 +32,7 @@ CPWL_Timer::~CPWL_Timer()
KillPWLTimer();
}
-FX_INT32 CPWL_Timer::SetPWLTimer(FX_INT32 nElapse)
+int32_t CPWL_Timer::SetPWLTimer(int32_t nElapse)
{
if (m_nTimerID != 0) KillPWLTimer();
m_nTimerID = m_pSystemHandler->SetTimer(nElapse, TimerProc);
@@ -50,7 +50,7 @@ void CPWL_Timer::KillPWLTimer()
}
}
-void CPWL_Timer::TimerProc(FX_INT32 idEvent)
+void CPWL_Timer::TimerProc(int32_t idEvent)
{
CPWL_Timer* pTimer = NULL;
if (GetPWLTimeMap().Lookup(idEvent, pTimer))
@@ -74,7 +74,7 @@ CPWL_TimerHandler::~CPWL_TimerHandler()
if (m_pTimer) delete m_pTimer;
}
-void CPWL_TimerHandler::BeginTimer(FX_INT32 nElapse)
+void CPWL_TimerHandler::BeginTimer(int32_t nElapse)
{
if (!m_pTimer)
m_pTimer = new CPWL_Timer(this, GetSystemHandler());
@@ -134,7 +134,7 @@ public:
FX_BOOL IsWndCaptureMouse(const CPWL_Wnd * pWnd) const
{
if (pWnd)
- for( FX_INT32 i=0,sz=m_aMousePath.GetSize(); i<sz; i++)
+ for( int32_t i=0,sz=m_aMousePath.GetSize(); i<sz; i++)
if (m_aMousePath.GetAt(i) == pWnd)
return TRUE;
@@ -150,7 +150,7 @@ public:
FX_BOOL IsWndCaptureKeyboard(const CPWL_Wnd * pWnd) const
{
if (pWnd)
- for( FX_INT32 i=0,sz=m_aKeyboardPath.GetSize(); i<sz; i++)
+ for( int32_t i=0,sz=m_aKeyboardPath.GetSize(); i<sz; i++)
if (m_aKeyboardPath.GetAt(i) == pWnd)
return TRUE;
@@ -294,7 +294,7 @@ void CPWL_Wnd::Destroy()
if (m_bCreated)
{
- for (FX_INT32 i = m_aChildren.GetSize()-1; i >= 0; i --)
+ for (int32_t i = m_aChildren.GetSize()-1; i >= 0; i --)
{
if (CPWL_Wnd * pChild = m_aChildren[i])
{
@@ -355,7 +355,7 @@ void CPWL_Wnd::InvalidateRectMove(const CPDF_Rect & rcOld, const CPDF_Rect & rc
CPDF_Rect SubArray[4];
rcOld.Substract4(rcNew,SubArray);
- for (FX_INT32 i=0;i<4;i++)
+ for (int32_t i=0;i<4;i++)
{
if (SubArray[i].left == 0 &&
SubArray[i].right == 0 &&
@@ -366,7 +366,7 @@ void CPWL_Wnd::InvalidateRectMove(const CPDF_Rect & rcOld, const CPDF_Rect & rc
}
rcNew.Substract4(rcOld,SubArray);
- for (FX_INT32 j=0;j<4;j++)
+ for (int32_t j=0;j<4;j++)
{
if (SubArray[j].left == 0 &&
SubArray[j].right == 0 &&
@@ -423,7 +423,7 @@ void CPWL_Wnd::GetThisAppearanceStream(CFX_ByteTextBuf & sAppStream)
void CPWL_Wnd::GetChildAppearanceStream(CFX_ByteTextBuf & sAppStream)
{
- for (FX_INT32 i=0,sz=m_aChildren.GetSize(); i<sz; i++)
+ for (int32_t i=0,sz=m_aChildren.GetSize(); i<sz; i++)
{
if (CPWL_Wnd * pChild = m_aChildren.GetAt(i))
{
@@ -468,7 +468,7 @@ void CPWL_Wnd::DrawThisAppearance(CFX_RenderDevice* pDevice, CPDF_Matrix* pUser2
void CPWL_Wnd::DrawChildAppearance(CFX_RenderDevice* pDevice, CPDF_Matrix* pUser2Device)
{
- for (FX_INT32 i=0,sz=m_aChildren.GetSize(); i<sz; i++)
+ for (int32_t i=0,sz=m_aChildren.GetSize(); i<sz; i++)
{
if (CPWL_Wnd * pChild = m_aChildren.GetAt(i))
{
@@ -524,7 +524,7 @@ FX_BOOL CPWL_Wnd::key_method_name(FX_WORD nChar, FX_DWORD nFlag)\
{\
if (IsWndCaptureKeyboard(this))\
{\
- for (FX_INT32 i=0,sz=m_aChildren.GetSize(); i<sz; i++)\
+ for (int32_t i=0,sz=m_aChildren.GetSize(); i<sz; i++)\
{\
if (CPWL_Wnd * pChild = m_aChildren.GetAt(i))\
{\
@@ -546,7 +546,7 @@ FX_BOOL CPWL_Wnd::mouse_method_name(const CPDF_Point & point, FX_DWORD nFlag)\
{\
if (IsWndCaptureMouse(this))\
{\
- for (FX_INT32 i=0,sz=m_aChildren.GetSize(); i<sz; i++)\
+ for (int32_t i=0,sz=m_aChildren.GetSize(); i<sz; i++)\
{\
if (CPWL_Wnd * pChild = m_aChildren.GetAt(i))\
{\
@@ -560,7 +560,7 @@ FX_BOOL CPWL_Wnd::mouse_method_name(const CPDF_Point & point, FX_DWORD nFlag)\
}\
else\
{\
- for (FX_INT32 i=0,sz=m_aChildren.GetSize(); i<sz; i++)\
+ for (int32_t i=0,sz=m_aChildren.GetSize(); i<sz; i++)\
{\
if (CPWL_Wnd * pChild = m_aChildren.GetAt(i))\
{\
@@ -599,7 +599,7 @@ FX_BOOL CPWL_Wnd::OnMouseWheel(short zDelta, const CPDF_Point & point, FX_DWORD
SetCursor();
if (IsWndCaptureKeyboard(this))
{
- for (FX_INT32 i=0,sz=m_aChildren.GetSize(); i<sz; i++)
+ for (int32_t i=0,sz=m_aChildren.GetSize(); i<sz; i++)
{
if (CPWL_Wnd * pChild = m_aChildren.GetAt(i))
{
@@ -621,7 +621,7 @@ void CPWL_Wnd::AddChild(CPWL_Wnd * pWnd)
void CPWL_Wnd::RemoveChild(CPWL_Wnd * pWnd)
{
- for (FX_INT32 i = m_aChildren.GetSize()-1; i >= 0; i --)
+ for (int32_t i = m_aChildren.GetSize()-1; i >= 0; i --)
{
if (CPWL_Wnd* pChild = m_aChildren.GetAt(i))
{
@@ -634,7 +634,7 @@ void CPWL_Wnd::RemoveChild(CPWL_Wnd * pWnd)
}
}
-void CPWL_Wnd::OnNotify(CPWL_Wnd* pWnd, FX_DWORD msg, FX_INTPTR wParam, FX_INTPTR lParam)
+void CPWL_Wnd::OnNotify(CPWL_Wnd* pWnd, FX_DWORD msg, intptr_t wParam, intptr_t lParam)
{
switch (msg)
{
@@ -753,18 +753,18 @@ CPWL_Color CPWL_Wnd::GetTextStrokeColor() const
return m_sPrivateParam.sTextStrokeColor;
}
-FX_INT32 CPWL_Wnd::GetBorderStyle() const
+int32_t CPWL_Wnd::GetBorderStyle() const
{
return m_sPrivateParam.nBorderStyle;
}
-void CPWL_Wnd::SetBorderStyle(FX_INT32 nBorderStyle)
+void CPWL_Wnd::SetBorderStyle(int32_t nBorderStyle)
{
if (HasFlag(PWS_BORDER))
m_sPrivateParam.nBorderStyle = nBorderStyle;
}
-FX_INT32 CPWL_Wnd::GetBorderWidth() const
+int32_t CPWL_Wnd::GetBorderWidth() const
{
if (HasFlag(PWS_BORDER))
return m_sPrivateParam.dwBorderWidth;
@@ -772,7 +772,7 @@ FX_INT32 CPWL_Wnd::GetBorderWidth() const
return 0;
}
-FX_INT32 CPWL_Wnd::GetInnerBorderWidth() const
+int32_t CPWL_Wnd::GetInnerBorderWidth() const
{
/*
switch (GetBorderStyle())
@@ -785,7 +785,7 @@ FX_INT32 CPWL_Wnd::GetInnerBorderWidth() const
return 0;
}
-void CPWL_Wnd::SetBorderWidth(FX_INT32 nBorderWidth)
+void CPWL_Wnd::SetBorderWidth(int32_t nBorderWidth)
{
if (HasFlag(PWS_BORDER))
m_sPrivateParam.dwBorderWidth = nBorderWidth;
@@ -861,7 +861,7 @@ void CPWL_Wnd::SetCapture()
void CPWL_Wnd::ReleaseCapture()
{
- for (FX_INT32 i=0,sz=m_aChildren.GetSize(); i<sz; i++)
+ for (int32_t i=0,sz=m_aChildren.GetSize(); i<sz; i++)
if (CPWL_Wnd* pChild = m_aChildren.GetAt(i))
pChild->ReleaseCapture();
@@ -918,7 +918,7 @@ void CPWL_Wnd::SetVisible(FX_BOOL bVisible)
{
if (IsValid())
{
- for (FX_INT32 i=0,sz=m_aChildren.GetSize(); i<sz; i++)
+ for (int32_t i=0,sz=m_aChildren.GetSize(); i<sz; i++)
{
if (CPWL_Wnd* pChild = m_aChildren.GetAt(i))
{
@@ -975,7 +975,7 @@ void CPWL_Wnd::SetCursor()
{
if (IFX_SystemHandler* pSH = GetSystemHandler())
{
- FX_INT32 nCursorType = this->GetCreationParam().eCursorType;
+ int32_t nCursorType = this->GetCreationParam().eCursorType;
pSH->SetCursor(nCursorType);
}
}
@@ -1063,7 +1063,7 @@ IFX_Edit_FontMap* CPWL_Wnd::GetFontMap() const
return m_sPrivateParam.pFontMap;
}
-CPWL_Color CPWL_Wnd::GetBorderLeftTopColor(FX_INT32 nBorderStyle) const
+CPWL_Color CPWL_Wnd::GetBorderLeftTopColor(int32_t nBorderStyle) const
{
CPWL_Color color;
@@ -1086,7 +1086,7 @@ CPWL_Color CPWL_Wnd::GetBorderLeftTopColor(FX_INT32 nBorderStyle) const
return color;
}
-CPWL_Color CPWL_Wnd::GetBorderRightBottomColor(FX_INT32 nBorderStyle) const
+CPWL_Color CPWL_Wnd::GetBorderRightBottomColor(int32_t nBorderStyle) const
{
CPWL_Color color;
@@ -1111,14 +1111,14 @@ CPWL_Color CPWL_Wnd::GetBorderRightBottomColor(FX_INT32 nBorderStyle) const
/* ----------------------------------------------------------------- */
-FX_INT32 CPWL_Wnd::GetTransparency()
+int32_t CPWL_Wnd::GetTransparency()
{
return m_sPrivateParam.nTransparency;
}
-void CPWL_Wnd::SetTransparency(FX_INT32 nTransparency)
+void CPWL_Wnd::SetTransparency(int32_t nTransparency)
{
- for (FX_INT32 i=0,sz=m_aChildren.GetSize(); i<sz; i++)
+ for (int32_t i=0,sz=m_aChildren.GetSize(); i<sz; i++)
{
if (CPWL_Wnd* pChild = m_aChildren.GetAt(i))
{
@@ -1155,13 +1155,13 @@ CPDF_Matrix CPWL_Wnd::GetWindowMatrix() const
return mt;
}
-void CPWL_Wnd::PWLtoWnd(const CPDF_Point& point, FX_INT32& x, FX_INT32& y) const
+void CPWL_Wnd::PWLtoWnd(const CPDF_Point& point, int32_t& x, int32_t& y) const
{
CPDF_Matrix mt = GetWindowMatrix();
CPDF_Point pt = point;
mt.Transform(pt.x,pt.y);
- x = (FX_INT32)(pt.x+0.5);
- y = (FX_INT32)(pt.y+0.5);
+ x = (int32_t)(pt.x+0.5);
+ y = (int32_t)(pt.y+0.5);
}
FX_RECT CPWL_Wnd::PWLtoWnd(const CPDF_Rect & rect) const
@@ -1169,7 +1169,7 @@ FX_RECT CPWL_Wnd::PWLtoWnd(const CPDF_Rect & rect) const
CPDF_Rect rcTemp = rect;
CPDF_Matrix mt = GetWindowMatrix();
mt.TransformRect(rcTemp);
- return FX_RECT((FX_INT32)(rcTemp.left+0.5), (FX_INT32)(rcTemp.bottom+0.5), (FX_INT32)(rcTemp.right+0.5), (FX_INT32)(rcTemp.top+0.5));
+ return FX_RECT((int32_t)(rcTemp.left+0.5), (int32_t)(rcTemp.bottom+0.5), (int32_t)(rcTemp.right+0.5), (int32_t)(rcTemp.top+0.5));
}
FX_HWND CPWL_Wnd::GetAttachedHWnd() const
@@ -1275,7 +1275,7 @@ void CPWL_Wnd::EnableWindow(FX_BOOL bEnable)
{
if (m_bEnabled != bEnable)
{
- for (FX_INT32 i=0,sz=m_aChildren.GetSize(); i<sz; i++)
+ for (int32_t i=0,sz=m_aChildren.GetSize(); i<sz; i++)
{
if (CPWL_Wnd* pChild = m_aChildren.GetAt(i))
{