summaryrefslogtreecommitdiff
path: root/fpdfsdk
diff options
context:
space:
mode:
Diffstat (limited to 'fpdfsdk')
-rw-r--r--fpdfsdk/include/formfiller/FFL_CBA_Fontmap.h4
-rw-r--r--fpdfsdk/include/formfiller/FFL_IFormFiller.h6
-rw-r--r--fpdfsdk/include/formfiller/FFL_Notify.h2
-rw-r--r--fpdfsdk/include/fpdfxfa/fpdfxfa_app.h8
-rw-r--r--fpdfsdk/include/fpdfxfa/fpdfxfa_doc.h18
-rw-r--r--fpdfsdk/include/fpdfxfa/fpdfxfa_util.h4
-rw-r--r--fpdfsdk/include/fsdk_baseannot.h16
-rw-r--r--fpdfsdk/include/fsdk_baseform.h14
-rw-r--r--fpdfsdk/include/fsdk_define.h4
-rw-r--r--fpdfsdk/include/fx_systemhandler.h28
-rw-r--r--fpdfsdk/include/fxedit/fx_edit.h86
-rw-r--r--fpdfsdk/include/fxedit/fxet_edit.h122
-rw-r--r--fpdfsdk/include/fxedit/fxet_list.h90
-rw-r--r--fpdfsdk/include/javascript/Field.h4
-rw-r--r--fpdfsdk/include/javascript/IJavaScript.h2
-rw-r--r--fpdfsdk/include/javascript/JS_Define.h2
-rw-r--r--fpdfsdk/include/javascript/JS_GlobalData.h6
-rw-r--r--fpdfsdk/include/javascript/util.h2
-rw-r--r--fpdfsdk/include/pdfwindow/PWL_Caret.h2
-rw-r--r--fpdfsdk/include/pdfwindow/PWL_ComboBox.h14
-rw-r--r--fpdfsdk/include/pdfwindow/PWL_Edit.h14
-rw-r--r--fpdfsdk/include/pdfwindow/PWL_EditCtrl.h34
-rw-r--r--fpdfsdk/include/pdfwindow/PWL_FontMap.h46
-rw-r--r--fpdfsdk/include/pdfwindow/PWL_Icon.h2
-rw-r--r--fpdfsdk/include/pdfwindow/PWL_IconList.h50
-rw-r--r--fpdfsdk/include/pdfwindow/PWL_Label.h6
-rw-r--r--fpdfsdk/include/pdfwindow/PWL_ListBox.h22
-rw-r--r--fpdfsdk/include/pdfwindow/PWL_ListCtrl.h6
-rw-r--r--fpdfsdk/include/pdfwindow/PWL_Note.h36
-rw-r--r--fpdfsdk/include/pdfwindow/PWL_ScrollBar.h2
-rw-r--r--fpdfsdk/include/pdfwindow/PWL_Utils.h36
-rw-r--r--fpdfsdk/include/pdfwindow/PWL_Wnd.h56
-rw-r--r--fpdfsdk/src/formfiller/FFL_CBA_Fontmap.cpp16
-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.cpp8
-rw-r--r--fpdfsdk/src/fpdfxfa/fpdfxfa_app.cpp10
-rw-r--r--fpdfsdk/src/fpdfxfa/fpdfxfa_doc.cpp10
-rw-r--r--fpdfsdk/src/fpdfxfa/fpdfxfa_util.cpp10
-rw-r--r--fpdfsdk/src/fsdk_actionhandler.cpp12
-rw-r--r--fpdfsdk/src/fsdk_baseannot.cpp56
-rw-r--r--fpdfsdk/src/fsdk_baseform.cpp52
-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
73 files changed, 941 insertions, 941 deletions
diff --git a/fpdfsdk/include/formfiller/FFL_CBA_Fontmap.h b/fpdfsdk/include/formfiller/FFL_CBA_Fontmap.h
index 5e596657ec..a51e9efbe1 100644
--- a/fpdfsdk/include/formfiller/FFL_CBA_Fontmap.h
+++ b/fpdfsdk/include/formfiller/FFL_CBA_Fontmap.h
@@ -29,12 +29,12 @@ public:
void SetAPType(const CFX_ByteString& sAPType);
protected:
- virtual CPDF_Font* FindFontSameCharset(CFX_ByteString& sFontAlias, FX_INT32 nCharset);
+ virtual CPDF_Font* FindFontSameCharset(CFX_ByteString& sFontAlias, int32_t nCharset);
virtual void AddedFont(CPDF_Font* pFont, const CFX_ByteString& sFontAlias);
virtual CPDF_Document* GetDocument();
private:
CPDF_Font* FindResFontSameCharset(CPDF_Dictionary* pResDict, CFX_ByteString& sFontAlias,
- FX_INT32 nCharset);
+ int32_t nCharset);
CPDF_Font* GetAnnotDefaultFont(CFX_ByteString &csNameTag);
void AddFontToAnnotDict(CPDF_Font* pFont, const CFX_ByteString& sAlias);
diff --git a/fpdfsdk/include/formfiller/FFL_IFormFiller.h b/fpdfsdk/include/formfiller/FFL_IFormFiller.h
index 6e3e58139d..7b5f119f50 100644
--- a/fpdfsdk/include/formfiller/FFL_IFormFiller.h
+++ b/fpdfsdk/include/formfiller/FFL_IFormFiller.h
@@ -67,15 +67,15 @@ public:
virtual FX_BOOL OnKillFocus(CPDFSDK_Annot* pAnnot, FX_UINT nFlag);
public:
- virtual void QueryWherePopup(void* pPrivateData, FX_FLOAT fPopupMin,FX_FLOAT fPopupMax, FX_INT32 & nRet, FX_FLOAT & fPopupRet);
- virtual void OnBeforeKeyStroke(FX_BOOL bEditOrList, void* pPrivateData, FX_INT32 nKeyCode,
+ virtual void QueryWherePopup(void* pPrivateData, FX_FLOAT fPopupMin,FX_FLOAT fPopupMax, int32_t & nRet, FX_FLOAT & fPopupRet);
+ virtual void 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);
virtual void OnAfterKeyStroke(FX_BOOL bEditOrList, void* pPrivateData, FX_BOOL & bExit, FX_DWORD nFlag) ;
virtual void OnSetWindowRect(void* pPrivateData, const CPDF_Rect & rcWindow);
- virtual void OnKeyStroke(FX_BOOL bEditOrList, void* pPrivateData, FX_INT32 nKeyCode, CFX_WideString & strChange,
+ virtual void 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);
virtual void OnPopupPreOpen(void* pPrivateData, FX_BOOL& bExit, FX_DWORD nFlag);
virtual void OnPopupPostOpen(void* pPrivateData, FX_BOOL& bExit, FX_DWORD nFlag);
diff --git a/fpdfsdk/include/formfiller/FFL_Notify.h b/fpdfsdk/include/formfiller/FFL_Notify.h
index 4e66c3a991..ae7b3dcf9b 100644
--- a/fpdfsdk/include/formfiller/FFL_Notify.h
+++ b/fpdfsdk/include/formfiller/FFL_Notify.h
@@ -50,7 +50,7 @@ private:
CFFL_FormFiller * m_pFormFiller;
FX_BOOL m_bDoActioning;
- FX_INT32 m_nNotifyFlag;
+ int32_t m_nNotifyFlag;
};
#endif // FPDFSDK_INCLUDE_FORMFILLER_FFL_NOTIFY_H_
diff --git a/fpdfsdk/include/fpdfxfa/fpdfxfa_app.h b/fpdfsdk/include/fpdfxfa/fpdfxfa_app.h
index 37a7ec17a5..1a8a6b41b0 100644
--- a/fpdfsdk/include/fpdfxfa/fpdfxfa_app.h
+++ b/fpdfsdk/include/fpdfxfa/fpdfxfa_app.h
@@ -49,19 +49,19 @@ public:
}
void Beep(FX_DWORD dwType) override;
- FX_INT32 MsgBox(FX_WSTR wsMessage, FX_WSTR wsTitle, FX_DWORD dwIconType, FX_DWORD dwButtonType) override;
+ int32_t MsgBox(FX_WSTR wsMessage, FX_WSTR wsTitle, FX_DWORD dwIconType, FX_DWORD dwButtonType) override;
void Response(CFX_WideString &wsAnswer, FX_WSTR wsQuestion, FX_WSTR wsTitle,
FX_WSTR wsDefaultAnswer, FX_BOOL bMark) override;
- FX_INT32 GetDocumentCountInBatch() override;
- FX_INT32 GetCurDocumentInBatch() override;
+ int32_t GetDocumentCountInBatch() override;
+ int32_t GetCurDocumentInBatch() override;
IFX_FileRead* DownloadURL(FX_WSTR wsURL) override;
FX_BOOL PostRequestURL(FX_WSTR wsURL, FX_WSTR wsData, FX_WSTR wsContentType,
FX_WSTR wsEncode, FX_WSTR wsHeader, CFX_WideString &wsResponse) override;
FX_BOOL PutRequestURL(FX_WSTR wsURL, FX_WSTR wsData, FX_WSTR wsEncode) override;
- void LoadString(FX_INT32 iStringID, CFX_WideString &wsString) override;
+ void LoadString(int32_t iStringID, CFX_WideString &wsString) override;
FX_BOOL ShowFileDialog(FX_WSTR wsTitle, FX_WSTR wsFilter, CFX_WideStringArray &wsPathArr, FX_BOOL bOpen) override;
IFWL_AdapterTimerMgr* GetTimerMgr() override;
diff --git a/fpdfsdk/include/fpdfxfa/fpdfxfa_doc.h b/fpdfsdk/include/fpdfxfa/fpdfxfa_doc.h
index 9158b8236a..d8cda3953f 100644
--- a/fpdfsdk/include/fpdfxfa/fpdfxfa_doc.h
+++ b/fpdfsdk/include/fpdfxfa/fpdfxfa_doc.h
@@ -62,9 +62,9 @@ public:
virtual FX_BOOL RenderCustomWidget(IXFA_Widget* hWidget, CFX_Graphics* pGS, CFX_Matrix* pMatrix, const CFX_RectF& rtUI){return FALSE;}
//host method
- virtual FX_INT32 CountPages(IXFA_Doc* hDoc);
- virtual FX_INT32 GetCurrentPage(IXFA_Doc* hDoc);
- virtual void SetCurrentPage(IXFA_Doc* hDoc, FX_INT32 iCurPage);
+ virtual int32_t CountPages(IXFA_Doc* hDoc);
+ virtual int32_t GetCurrentPage(IXFA_Doc* hDoc);
+ virtual void SetCurrentPage(IXFA_Doc* hDoc, int32_t iCurPage);
virtual FX_BOOL IsCalculationsEnabled(IXFA_Doc* hDoc);
virtual void SetCalculationsEnabled(IXFA_Doc* hDoc, FX_BOOL bEnabled);
virtual void GetTitle(IXFA_Doc* hDoc, CFX_WideString &wsTitle);
@@ -75,17 +75,17 @@ public:
virtual FX_BOOL IsValidationsEnabled(IXFA_Doc* hDoc);
virtual void SetValidationsEnabled(IXFA_Doc* hDoc, FX_BOOL bEnabled);
virtual void SetFocusWidget(IXFA_Doc* hDoc, IXFA_Widget* hWidget);
- virtual void Print(IXFA_Doc* hDoc, FX_INT32 nStartPage, FX_INT32 nEndPage, FX_DWORD dwOptions);
+ virtual void Print(IXFA_Doc* hDoc, int32_t nStartPage, int32_t nEndPage, FX_DWORD dwOptions);
//LayoutPseudo method
- virtual FX_INT32 AbsPageCountInBatch(IXFA_Doc* hDoc){return 0;}
- virtual FX_INT32 AbsPageInBatch(IXFA_Doc* hDoc, IXFA_Widget* hWidget){return 0;}
- virtual FX_INT32 SheetCountInBatch(IXFA_Doc* hDoc){return 0;}
- virtual FX_INT32 SheetInBatch(IXFA_Doc* hDoc, IXFA_Widget* hWidget){return 0;}
+ virtual int32_t AbsPageCountInBatch(IXFA_Doc* hDoc){return 0;}
+ virtual int32_t AbsPageInBatch(IXFA_Doc* hDoc, IXFA_Widget* hWidget){return 0;}
+ virtual int32_t SheetCountInBatch(IXFA_Doc* hDoc){return 0;}
+ virtual int32_t SheetInBatch(IXFA_Doc* hDoc, IXFA_Widget* hWidget){return 0;}
//SignaturePseudoModel method
//TODO:
- virtual FX_INT32 Verify(IXFA_Doc* hDoc, CXFA_Node* pSigNode, FX_BOOL bUsed = TRUE/*, SecurityHandler* pHandler, SignatureInfo &info*/) {return 0;}
+ virtual int32_t Verify(IXFA_Doc* hDoc, CXFA_Node* pSigNode, FX_BOOL bUsed = TRUE/*, SecurityHandler* pHandler, SignatureInfo &info*/) {return 0;}
virtual FX_BOOL Sign(IXFA_Doc* hDoc, CXFA_NodeList* pNodeList, FX_WSTR wsExpression, FX_WSTR wsXMLIdent, FX_WSTR wsValue = FX_WSTRC(L"open"), FX_BOOL bUsed = TRUE/*, SecurityHandler* pHandler = NULL, SignatureInfo &info*/) {return 0;}
virtual CXFA_NodeList* Enumerate(IXFA_Doc* hDoc) {return 0;}
virtual FX_BOOL Clear(IXFA_Doc* hDoc, CXFA_Node* pSigNode, FX_BOOL bCleared = TRUE) {return 0;}
diff --git a/fpdfsdk/include/fpdfxfa/fpdfxfa_util.h b/fpdfsdk/include/fpdfxfa/fpdfxfa_util.h
index 6c3d15e4f1..9676b1399f 100644
--- a/fpdfsdk/include/fpdfxfa/fpdfxfa_util.h
+++ b/fpdfsdk/include/fpdfxfa/fpdfxfa_util.h
@@ -23,7 +23,7 @@ public:
virtual FWL_ERR Stop(FWL_HTIMER hTimer);
protected:
- static void TimerProc(FX_INT32 idEvent);
+ static void TimerProc(int32_t idEvent);
static CFX_PtrArray ms_timerArray;
CPDFDoc_Environment* m_pEnv;
@@ -37,7 +37,7 @@ public:
{
}
- FX_UINT32 uIDEvent;
+ uint32_t uIDEvent;
IFWL_Timer *pTimer;
};
diff --git a/fpdfsdk/include/fsdk_baseannot.h b/fpdfsdk/include/fsdk_baseannot.h
index d2ce977a6c..04b384d596 100644
--- a/fpdfsdk/include/fsdk_baseannot.h
+++ b/fpdfsdk/include/fsdk_baseannot.h
@@ -58,14 +58,14 @@ public:
struct FX_DATETIME
{
- FX_SHORT year;
- FX_BYTE month;
- FX_BYTE day;
- FX_BYTE hour;
- FX_BYTE minute;
- FX_BYTE second;
- FX_INT8 tzHour;
- FX_BYTE tzMinute;
+ int16_t year;
+ uint8_t month;
+ uint8_t day;
+ uint8_t hour;
+ uint8_t minute;
+ uint8_t second;
+ int8_t tzHour;
+ uint8_t tzMinute;
}dt;
};
diff --git a/fpdfsdk/include/fsdk_baseform.h b/fpdfsdk/include/fsdk_baseform.h
index 67c67fc37a..88192aad31 100644
--- a/fpdfsdk/include/fsdk_baseform.h
+++ b/fpdfsdk/include/fsdk_baseform.h
@@ -156,8 +156,8 @@ public:
void ClearAppModified();
FX_BOOL IsAppModified() const;
- FX_INT32 GetAppearanceAge() const;
- FX_INT32 GetValueAge() const;
+ int32_t GetAppearanceAge() const;
+ int32_t GetValueAge() const;
private:
void ResetAppearance_PushButton();
@@ -189,8 +189,8 @@ public:
private:
CPDFSDK_InterForm* m_pInterForm;
FX_BOOL m_bAppModified;
- FX_INT32 m_nAppAge;
- FX_INT32 m_nValueAge;
+ int32_t m_nAppAge;
+ int32_t m_nValueAge;
IXFA_Widget* m_hMixXFAWidget;
IXFA_WidgetHandler* m_pWidgetHandler;
@@ -317,13 +317,13 @@ private:
public:
FX_BOOL IsNeedHighLight(int nFieldType);
void RemoveAllHighLight();
- void SetHighlightAlpha(FX_BYTE alpha) {m_iHighlightAlpha = alpha;}
- FX_BYTE GetHighlightAlpha() {return m_iHighlightAlpha;}
+ void SetHighlightAlpha(uint8_t alpha) {m_iHighlightAlpha = alpha;}
+ uint8_t GetHighlightAlpha() {return m_iHighlightAlpha;}
void SetHighlightColor(FX_COLORREF clr, int nFieldType);
FX_COLORREF GetHighlightColor(int nFieldType);
private:
FX_COLORREF m_aHighlightColor[7];
- FX_BYTE m_iHighlightAlpha;
+ uint8_t m_iHighlightAlpha;
FX_BOOL m_bNeedHightlight[7];
};
diff --git a/fpdfsdk/include/fsdk_define.h b/fpdfsdk/include/fsdk_define.h
index fd6beca527..12ef8133a2 100644
--- a/fpdfsdk/include/fsdk_define.h
+++ b/fpdfsdk/include/fsdk_define.h
@@ -84,13 +84,13 @@ public:
virtual CFX_ByteString GetFullPath() { return ""; }
virtual FX_FILESIZE GetSize() override { return m_FileAccess.m_FileLen; }
- virtual FX_BOOL GetByte(FX_DWORD pos, FX_BYTE& ch);
+ virtual FX_BOOL GetByte(FX_DWORD pos, uint8_t& ch);
virtual FX_BOOL GetBlock(FX_DWORD pos, FX_LPBYTE pBuf, FX_DWORD size);
virtual void Release() override { delete this; }
virtual FX_BOOL ReadBlock(void* buffer, FX_FILESIZE offset, size_t size) override;
FPDF_FILEACCESS m_FileAccess;
- FX_BYTE m_Buffer[512];
+ uint8_t m_Buffer[512];
FX_DWORD m_BufferOffset;
};
diff --git a/fpdfsdk/include/fx_systemhandler.h b/fpdfsdk/include/fx_systemhandler.h
index f8df723ad0..276019eae5 100644
--- a/fpdfsdk/include/fx_systemhandler.h
+++ b/fpdfsdk/include/fx_systemhandler.h
@@ -9,7 +9,7 @@
typedef FX_LPVOID FX_HWND;
typedef FX_LPVOID FX_HMENU;
-typedef void (*TimerCallback)(FX_INT32 idEvent);
+typedef void (*TimerCallback)(int32_t idEvent);
typedef struct _FX_SYSTEMTIME
{
@@ -52,8 +52,8 @@ public:
virtual CFX_WideString GetClipboardText(FX_HWND hWnd) = 0;
virtual FX_BOOL SetClipboardText(FX_HWND hWnd, CFX_WideString string) = 0;
- virtual void ClientToScreen(FX_HWND hWnd, FX_INT32& x, FX_INT32& y) = 0;
- virtual void ScreenToClient(FX_HWND hWnd, FX_INT32& x, FX_INT32& y) = 0;
+ virtual void ClientToScreen(FX_HWND hWnd, int32_t& x, int32_t& y) = 0;
+ virtual void ScreenToClient(FX_HWND hWnd, int32_t& x, int32_t& y) = 0;
/*cursor style
FXCT_ARROW
@@ -63,20 +63,20 @@ public:
FXCT_HBEAM
FXCT_HAND
*/
- virtual void SetCursor(FX_INT32 nCursorType) = 0;
+ virtual void SetCursor(int32_t nCursorType) = 0;
virtual FX_HMENU CreatePopupMenu() = 0;
- virtual FX_BOOL AppendMenuItem(FX_HMENU hMenu, FX_INT32 nIDNewItem, CFX_WideString string) = 0;
- virtual FX_BOOL EnableMenuItem(FX_HMENU hMenu, FX_INT32 nIDItem, FX_BOOL bEnabled) = 0;
- virtual FX_INT32 TrackPopupMenu(FX_HMENU hMenu, FX_INT32 x, FX_INT32 y, FX_HWND hParent) = 0;
+ virtual FX_BOOL AppendMenuItem(FX_HMENU hMenu, int32_t nIDNewItem, CFX_WideString string) = 0;
+ virtual FX_BOOL EnableMenuItem(FX_HMENU hMenu, int32_t nIDItem, FX_BOOL bEnabled) = 0;
+ virtual int32_t TrackPopupMenu(FX_HMENU hMenu, int32_t x, int32_t y, FX_HWND hParent) = 0;
virtual void DestroyMenu(FX_HMENU hMenu) = 0;
- virtual CFX_ByteString GetNativeTrueTypeFont(FX_INT32 nCharset) = 0;
- virtual FX_BOOL FindNativeTrueTypeFont(FX_INT32 nCharset, CFX_ByteString sFontFaceName) = 0;
- virtual CPDF_Font* AddNativeTrueTypeFontToPDF(CPDF_Document* pDoc, CFX_ByteString sFontFaceName, FX_BYTE nCharset) = 0;
+ virtual CFX_ByteString GetNativeTrueTypeFont(int32_t nCharset) = 0;
+ virtual FX_BOOL FindNativeTrueTypeFont(int32_t nCharset, CFX_ByteString sFontFaceName) = 0;
+ virtual CPDF_Font* AddNativeTrueTypeFontToPDF(CPDF_Document* pDoc, CFX_ByteString sFontFaceName, uint8_t nCharset) = 0;
- virtual FX_INT32 SetTimer(FX_INT32 uElapse, TimerCallback lpTimerFunc) = 0;
- virtual void KillTimer(FX_INT32 nID) = 0;
+ virtual int32_t SetTimer(int32_t uElapse, TimerCallback lpTimerFunc) = 0;
+ virtual void KillTimer(int32_t nID) = 0;
virtual FX_BOOL IsSHIFTKeyDown(FX_DWORD nFlag) = 0;
@@ -86,8 +86,8 @@ public:
virtual FX_SYSTEMTIME GetLocalTime() = 0;
- virtual FX_INT32 GetCharSet() = 0;
- virtual void SetCharSet(FX_INT32 nCharSet) = 0;
+ virtual int32_t GetCharSet() = 0;
+ virtual void SetCharSet(int32_t nCharSet) = 0;
};
#endif // FPDFSDK_INCLUDE_FX_SYSTEMHANDLER_H_
diff --git a/fpdfsdk/include/fxedit/fx_edit.h b/fpdfsdk/include/fxedit/fx_edit.h
index 31ede0564b..0da6fe6f9e 100644
--- a/fpdfsdk/include/fxedit/fx_edit.h
+++ b/fpdfsdk/include/fxedit/fx_edit.h
@@ -65,15 +65,15 @@ class IFX_Edit_FontMap
public:
virtual ~IFX_Edit_FontMap() { }
//map a fontindex to pdf font.
- virtual CPDF_Font * GetPDFFont(FX_INT32 nFontIndex) = 0;
+ virtual CPDF_Font * GetPDFFont(int32_t nFontIndex) = 0;
//get the alias of a pdf font.
- virtual CFX_ByteString GetPDFFontAlias(FX_INT32 nFontIndex) = 0;
+ virtual CFX_ByteString GetPDFFontAlias(int32_t nFontIndex) = 0;
//get the index of a font that can show a word.
- virtual FX_INT32 GetWordFontIndex(FX_WORD word, FX_INT32 charset, FX_INT32 nFontIndex) = 0;
+ virtual int32_t GetWordFontIndex(FX_WORD word, int32_t charset, int32_t nFontIndex) = 0;
//get the charcode of word from unicode
- virtual FX_INT32 CharCodeFromUnicode(FX_INT32 nFontIndex, FX_WORD word) = 0;
+ virtual int32_t CharCodeFromUnicode(int32_t nFontIndex, FX_WORD word) = 0;
//get the charset of unicode
- virtual FX_INT32 CharSetFromUnicode(FX_WORD word, FX_INT32 nOldCharset) = 0;
+ virtual int32_t CharSetFromUnicode(FX_WORD word, int32_t nOldCharset) = 0;
};
class IFX_Edit_Notify
@@ -151,7 +151,7 @@ public:
//get the information of the current section.
virtual FX_BOOL GetSection(CPVT_Section & section) const = 0;
//set the current position.
- virtual void SetAt(FX_INT32 nWordIndex) = 0;
+ virtual void SetAt(int32_t nWordIndex) = 0;
//set the current position.
virtual void SetAt(const CPVT_WordPlace & place) = 0;
//get the current position.
@@ -200,19 +200,19 @@ public:
virtual void SetScrollPos(const CPDF_Point & point) = 0;
//set the horizontal text alignment in text box, nFormat (0:left 1:middle 2:right).
- virtual void SetAlignmentH(FX_INT32 nFormat = 0, FX_BOOL bPaint = TRUE) = 0;
+ virtual void SetAlignmentH(int32_t nFormat = 0, FX_BOOL bPaint = TRUE) = 0;
//set the vertical text alignment in text box, nFormat (0:top 1:center 2:bottom).
- virtual void SetAlignmentV(FX_INT32 nFormat = 0, FX_BOOL bPaint = TRUE) = 0;
+ virtual void SetAlignmentV(int32_t nFormat = 0, FX_BOOL bPaint = TRUE) = 0;
//if the text is shown in secret , set a character for substitute.
virtual void SetPasswordChar(FX_WORD wSubWord = '*', FX_BOOL bPaint = TRUE) = 0;
//set the maximal count of words of the text.
- virtual void SetLimitChar(FX_INT32 nLimitChar = 0, FX_BOOL bPaint = TRUE) = 0;
+ virtual void SetLimitChar(int32_t nLimitChar = 0, FX_BOOL bPaint = TRUE) = 0;
//if set the count of charArray , then all words is shown in equal space.
- virtual void SetCharArray(FX_INT32 nCharArray = 0, FX_BOOL bPaint = TRUE) = 0;
+ virtual void SetCharArray(int32_t nCharArray = 0, FX_BOOL bPaint = TRUE) = 0;
//set the space of two characters.
virtual void SetCharSpace(FX_FLOAT fCharSpace = 0.0f, FX_BOOL bPaint = TRUE) = 0;
//set the horizontal scale of all characters.
- virtual void SetHorzScale(FX_INT32 nHorzScale = 100, FX_BOOL bPaint = TRUE) = 0;
+ virtual void SetHorzScale(int32_t nHorzScale = 100, FX_BOOL bPaint = TRUE) = 0;
//set the leading of all lines
virtual void SetLineLeading(FX_FLOAT fLineLeading, FX_BOOL bPaint = TRUE) = 0;
//if set, CRLF is allowed.
@@ -235,11 +235,11 @@ public:
//set the fontsize of selected text.
virtual FX_BOOL SetRichFontSize(FX_FLOAT fFontSize) = 0;
//set the fontindex of selected text, user can change the font of selected text.
- virtual FX_BOOL SetRichFontIndex(FX_INT32 nFontIndex) = 0;
+ virtual FX_BOOL SetRichFontIndex(int32_t nFontIndex) = 0;
//set the textcolor of selected text.
virtual FX_BOOL SetRichTextColor(FX_COLORREF dwColor) = 0;
//set the text script type of selected text. (0:normal 1:superscript 2:subscript)
- virtual FX_BOOL SetRichTextScript(FX_INT32 nScriptType) = 0;
+ virtual FX_BOOL SetRichTextScript(int32_t nScriptType) = 0;
//set the bold font style of selected text.
virtual FX_BOOL SetRichTextBold(FX_BOOL bBold = TRUE) = 0;
//set the italic font style of selected text.
@@ -251,25 +251,25 @@ public:
//set the charspace of selected text, in user coordinate.
virtual FX_BOOL SetRichTextCharSpace(FX_FLOAT fCharSpace) = 0;
//set the horizontal scale of selected text, default value is 100.
- virtual FX_BOOL SetRichTextHorzScale(FX_INT32 nHorzScale = 100) = 0;
+ virtual FX_BOOL SetRichTextHorzScale(int32_t nHorzScale = 100) = 0;
//set the leading of selected section, in user coordinate.
virtual FX_BOOL SetRichTextLineLeading(FX_FLOAT fLineLeading) = 0;
//set the indent of selected section, in user coordinate.
virtual FX_BOOL SetRichTextLineIndent(FX_FLOAT fLineIndent) = 0;
//set the alignment of selected section, nAlignment(0:left 1:middle 2:right)
- virtual FX_BOOL SetRichTextAlignment(FX_INT32 nAlignment) = 0;
+ virtual FX_BOOL SetRichTextAlignment(int32_t nAlignment) = 0;
//set the selected range of text.
//if nStartChar == 0 and nEndChar == -1, select all the text.
- virtual void SetSel(FX_INT32 nStartChar,FX_INT32 nEndChar) = 0;
+ virtual void SetSel(int32_t nStartChar,int32_t nEndChar) = 0;
//get the selected range of text.
- virtual void GetSel(FX_INT32 & nStartChar, FX_INT32 & nEndChar) const = 0;
+ virtual void GetSel(int32_t & nStartChar, int32_t & nEndChar) const = 0;
//select all the text.
virtual void SelectAll() = 0;
//set text is not selected.
virtual void SelectNone() = 0;
//get the caret position.
- virtual FX_INT32 GetCaret() const = 0;
+ virtual int32_t GetCaret() const = 0;
virtual CPVT_WordPlace GetCaretWordPlace() const = 0;
//get the string of selected text.
virtual CFX_WideString GetSelText() const = 0;
@@ -309,14 +309,14 @@ public:
virtual void OnVK_END(FX_BOOL bShift,FX_BOOL bCtrl) = 0;
//put text into edit.
- virtual void SetText(FX_LPCWSTR text,FX_INT32 charset = DEFAULT_CHARSET,
+ virtual void SetText(FX_LPCWSTR text,int32_t charset = DEFAULT_CHARSET,
const CPVT_SecProps * pSecProps = NULL,const CPVT_WordProps * pWordProps = NULL) = 0;
//insert a word into the edit.
- virtual FX_BOOL InsertWord(FX_WORD word, FX_INT32 charset = DEFAULT_CHARSET, const CPVT_WordProps * pWordProps = NULL) = 0;
+ virtual FX_BOOL InsertWord(FX_WORD word, int32_t charset = DEFAULT_CHARSET, const CPVT_WordProps * pWordProps = NULL) = 0;
//insert a return into the edit.
virtual FX_BOOL InsertReturn(const CPVT_SecProps * pSecProps = NULL,const CPVT_WordProps * pWordProps = NULL) = 0;
//insert text into the edit.
- virtual FX_BOOL InsertText(FX_LPCWSTR text, FX_INT32 charset = DEFAULT_CHARSET,
+ virtual FX_BOOL InsertText(FX_LPCWSTR text, int32_t charset = DEFAULT_CHARSET,
const CPVT_SecProps * pSecProps = NULL,const CPVT_WordProps * pWordProps = NULL) = 0;
//do backspace operation.
virtual FX_BOOL Backspace() = 0;
@@ -330,7 +330,7 @@ public:
//do Undo operation.
virtual FX_BOOL Undo() = 0;
//move caret
- virtual void SetCaret(FX_INT32 nPos) = 0;
+ virtual void SetCaret(int32_t nPos) = 0;
//arrange all words over again
virtual void Paint() = 0;
@@ -350,9 +350,9 @@ public:
virtual void EnableOprNotify(FX_BOOL bNotify) = 0;
//map word place to word index.
- virtual FX_INT32 WordPlaceToWordIndex(const CPVT_WordPlace & place) const = 0;
+ virtual int32_t WordPlaceToWordIndex(const CPVT_WordPlace & place) const = 0;
//map word index to word place.
- virtual CPVT_WordPlace WordIndexToWordPlace(FX_INT32 index) const = 0;
+ virtual CPVT_WordPlace WordIndexToWordPlace(int32_t index) const = 0;
//get the beginning position of a line
virtual CPVT_WordPlace GetLineBeginPlace(const CPVT_WordPlace & place) const = 0;
@@ -374,9 +374,9 @@ public:
//get the mask character.
virtual FX_WORD GetPasswordChar() const = 0;
//get the count of charArray
- virtual FX_INT32 GetCharArray() const = 0;
+ virtual int32_t GetCharArray() const = 0;
//get the horizontal scale of all characters
- virtual FX_INT32 GetHorzScale() const = 0;
+ virtual int32_t GetHorzScale() const = 0;
//get the space of two characters
virtual FX_FLOAT GetCharSpace() const = 0;
//get the latin words of specified range
@@ -388,7 +388,7 @@ public:
//if the content is changed after settext?
virtual FX_BOOL IsModified() const = 0;
//get the total words in edit
- virtual FX_INT32 GetTotalWords() const = 0;
+ virtual int32_t GetTotalWords() const = 0;
virtual void AddUndoItem(IFX_Edit_UndoItem* pUndoItem) = 0;
@@ -449,29 +449,29 @@ public:
virtual CPDF_Rect GetContentRect() const = 0;
virtual FX_FLOAT GetFontSize() const = 0;
- virtual IFX_Edit* GetItemEdit(FX_INT32 nIndex) const = 0;
- virtual FX_INT32 GetCount() const = 0;
- virtual FX_BOOL IsItemSelected(FX_INT32 nIndex) const = 0;
+ virtual IFX_Edit* GetItemEdit(int32_t nIndex) const = 0;
+ virtual int32_t GetCount() const = 0;
+ virtual FX_BOOL IsItemSelected(int32_t nIndex) const = 0;
virtual FX_FLOAT GetFirstHeight() const = 0;
virtual void SetMultipleSel(FX_BOOL bMultiple) = 0;
virtual FX_BOOL IsMultipleSel() const = 0;
- virtual FX_BOOL IsValid(FX_INT32 nItemIndex) const = 0;
- virtual FX_INT32 FindNext(FX_INT32 nIndex,FX_WCHAR nChar) const = 0;
+ virtual FX_BOOL IsValid(int32_t nItemIndex) const = 0;
+ virtual int32_t FindNext(int32_t nIndex,FX_WCHAR nChar) const = 0;
virtual void SetScrollPos(const CPDF_Point & point) = 0;
- virtual void ScrollToListItem(FX_INT32 nItemIndex) = 0;
- virtual CPDF_Rect GetItemRect(FX_INT32 nIndex) const = 0;
- virtual FX_INT32 GetCaret() const = 0;
- virtual FX_INT32 GetSelect() const = 0;
- virtual FX_INT32 GetTopItem() const = 0;
- virtual FX_INT32 GetItemIndex(const CPDF_Point & point) const = 0;
- virtual FX_INT32 GetFirstSelected() const = 0;
+ virtual void ScrollToListItem(int32_t nItemIndex) = 0;
+ virtual CPDF_Rect GetItemRect(int32_t nIndex) const = 0;
+ virtual int32_t GetCaret() const = 0;
+ virtual int32_t GetSelect() const = 0;
+ virtual int32_t GetTopItem() const = 0;
+ virtual int32_t GetItemIndex(const CPDF_Point & point) const = 0;
+ virtual int32_t GetFirstSelected() const = 0;
virtual void AddString(FX_LPCWSTR string) = 0;
- virtual void SetTopItem(FX_INT32 nIndex) = 0;
- virtual void Select(FX_INT32 nItemIndex) = 0;
- virtual void SetCaret(FX_INT32 nItemIndex) = 0;
+ virtual void SetTopItem(int32_t nIndex) = 0;
+ virtual void Select(int32_t nItemIndex) = 0;
+ virtual void SetCaret(int32_t nItemIndex) = 0;
virtual void Empty() = 0;
virtual void Cancel() = 0;
virtual CFX_WideString GetText() const = 0;
@@ -485,7 +485,7 @@ public:
virtual void OnVK_RIGHT(FX_BOOL bShift,FX_BOOL bCtrl) = 0;
virtual void OnVK_HOME(FX_BOOL bShift,FX_BOOL bCtrl) = 0;
virtual void OnVK_END(FX_BOOL bShift,FX_BOOL bCtrl) = 0;
- virtual void OnVK(FX_INT32 nItemIndex,FX_BOOL bShift,FX_BOOL bCtrl) = 0;
+ virtual void OnVK(int32_t nItemIndex,FX_BOOL bShift,FX_BOOL bCtrl) = 0;
virtual FX_BOOL OnChar(FX_WORD nChar,FX_BOOL bShift,FX_BOOL bCtrl) = 0;
protected:
diff --git a/fpdfsdk/include/fxedit/fxet_edit.h b/fpdfsdk/include/fxedit/fxet_edit.h
index 237aa66b53..6fd7b9a4ee 100644
--- a/fpdfsdk/include/fxedit/fxet_edit.h
+++ b/fpdfsdk/include/fxedit/fxet_edit.h
@@ -111,7 +111,7 @@ public:
void Empty()
{
- for (FX_INT32 i = 0, sz = m_LineRects.GetSize(); i < sz; i++)
+ for (int32_t i = 0, sz = m_LineRects.GetSize(); i < sz; i++)
delete m_LineRects.GetAt(i);
m_LineRects.RemoveAll();
@@ -125,7 +125,7 @@ public:
void operator = (CFX_Edit_LineRectArray & rects)
{
Empty();
- for (FX_INT32 i = 0, sz = rects.GetSize(); i < sz; i++)
+ for (int32_t i = 0, sz = rects.GetSize(); i < sz; i++)
m_LineRects.Add(rects.GetAt(i));
rects.RemoveAll();
@@ -137,12 +137,12 @@ public:
m_LineRects.Add(pRect);
}
- FX_INT32 GetSize() const
+ int32_t GetSize() const
{
return m_LineRects.GetSize();
}
- CFX_Edit_LineRect * GetAt(FX_INT32 nIndex) const
+ CFX_Edit_LineRect * GetAt(int32_t nIndex) const
{
if (nIndex < 0 || nIndex >= m_LineRects.GetSize())
return NULL;
@@ -167,7 +167,7 @@ public:
void Empty()
{
- for (FX_INT32 i = 0, sz = m_Rects.GetSize(); i < sz; i++)
+ for (int32_t i = 0, sz = m_Rects.GetSize(); i < sz; i++)
delete m_Rects.GetAt(i);
this->m_Rects.RemoveAll();
@@ -176,7 +176,7 @@ public:
void Add(const CPDF_Rect & rect)
{
//check for overlaped area
- for (FX_INT32 i = 0, sz = m_Rects.GetSize(); i < sz; i++)
+ for (int32_t i = 0, sz = m_Rects.GetSize(); i < sz; i++)
if (CPDF_Rect * pRect = m_Rects.GetAt(i))
if (pRect->Contains(rect))return;
@@ -184,12 +184,12 @@ public:
m_Rects.Add(pNewRect);
}
- FX_INT32 GetSize() const
+ int32_t GetSize() const
{
return m_Rects.GetSize();
}
- CPDF_Rect * GetAt(FX_INT32 nIndex) const
+ CPDF_Rect * GetAt(int32_t nIndex) const
{
if (nIndex < 0 || nIndex >= m_Rects.GetSize())
return NULL;
@@ -209,7 +209,7 @@ public:
void BeginRefresh();
void Push(const CPVT_WordRange & linerange,const CPDF_Rect & rect);
void NoAnalyse();
- void Analyse(FX_INT32 nAlignment);
+ void Analyse(int32_t nAlignment);
void AddRefresh(const CPDF_Rect & rect);
const CFX_Edit_RectArray * GetRefreshRects() const;
void EndRefresh();
@@ -285,7 +285,7 @@ public:
class CFX_Edit_Undo
{
public:
- CFX_Edit_Undo(FX_INT32 nBufsize = 10000);
+ CFX_Edit_Undo(int32_t nBufsize = 10000);
virtual ~CFX_Edit_Undo();
void Undo();
@@ -300,13 +300,13 @@ public:
void Reset();
- IFX_Edit_UndoItem* GetItem(FX_INT32 nIndex);
- FX_INT32 GetItemCount(){return m_UndoItemStack.GetSize();}
- FX_INT32 GetCurUndoPos(){return m_nCurUndoPos;}
+ IFX_Edit_UndoItem* GetItem(int32_t nIndex);
+ int32_t GetItemCount(){return m_UndoItemStack.GetSize();}
+ int32_t GetCurUndoPos(){return m_nCurUndoPos;}
private:
- void SetBufSize(FX_INT32 nSize){m_nBufSize = nSize;}
- FX_INT32 GetBufSize(){return m_nBufSize;}
+ void SetBufSize(int32_t nSize){m_nBufSize = nSize;}
+ int32_t GetBufSize(){return m_nBufSize;}
void RemoveHeads();
void RemoveTails();
@@ -314,8 +314,8 @@ private:
private:
CFX_ArrayTemplate<IFX_Edit_UndoItem*> m_UndoItemStack;
- FX_INT32 m_nCurUndoPos;
- FX_INT32 m_nBufSize;
+ int32_t m_nCurUndoPos;
+ int32_t m_nBufSize;
FX_BOOL m_bModified;
FX_BOOL m_bVirgin;
FX_BOOL m_bWorking;
@@ -362,7 +362,7 @@ class CFXEU_InsertWord : public CFX_Edit_UndoItem
{
public:
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);
virtual ~CFXEU_InsertWord();
void Redo();
@@ -374,7 +374,7 @@ private:
CPVT_WordPlace m_wpOld;
CPVT_WordPlace m_wpNew;
FX_WORD m_Word;
- FX_INT32 m_nCharset;
+ int32_t m_nCharset;
CPVT_WordProps m_WordProps;
};
@@ -401,7 +401,7 @@ class CFXEU_Backspace : public CFX_Edit_UndoItem
{
public:
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);
virtual ~CFXEU_Backspace();
@@ -414,7 +414,7 @@ private:
CPVT_WordPlace m_wpOld;
CPVT_WordPlace m_wpNew;
FX_WORD m_Word;
- FX_INT32 m_nCharset;
+ int32_t m_nCharset;
CPVT_SecProps m_SecProps;
CPVT_WordProps m_WordProps;
};
@@ -423,7 +423,7 @@ class CFXEU_Delete : public CFX_Edit_UndoItem
{
public:
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);
virtual ~CFXEU_Delete();
@@ -436,7 +436,7 @@ private:
CPVT_WordPlace m_wpOld;
CPVT_WordPlace m_wpNew;
FX_WORD m_Word;
- FX_INT32 m_nCharset;
+ int32_t m_nCharset;
CPVT_SecProps m_SecProps;
CPVT_WordProps m_WordProps;
FX_BOOL m_bSecEnd;
@@ -463,7 +463,7 @@ class CFXEU_ClearRich : public CFX_Edit_UndoItem
public:
CFXEU_ClearRich(CFX_Edit * pEdit, const CPVT_WordPlace & wpOldPlace, const CPVT_WordPlace & wpNewPlace,
const CPVT_WordRange & wrSel,
- FX_WORD word, FX_INT32 charset,
+ FX_WORD word, int32_t charset,
const CPVT_SecProps & SecProps, const CPVT_WordProps & WordProps);
virtual ~CFXEU_ClearRich();
@@ -477,7 +477,7 @@ private:
CPVT_WordPlace m_wpNew;
CPVT_WordRange m_wrSel;
FX_WORD m_Word;
- FX_INT32 m_nCharset;
+ int32_t m_nCharset;
CPVT_SecProps m_SecProps;
CPVT_WordProps m_WordProps;
};
@@ -486,7 +486,7 @@ class CFXEU_InsertText : public CFX_Edit_UndoItem
{
public:
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);
virtual ~CFXEU_InsertText();
@@ -499,7 +499,7 @@ private:
CPVT_WordPlace m_wpOld;
CPVT_WordPlace m_wpNew;
CFX_WideString m_swText;
- FX_INT32 m_nCharset;
+ int32_t m_nCharset;
CPVT_SecProps m_SecProps;
CPVT_WordProps m_WordProps;
};
@@ -578,13 +578,13 @@ public:
void SetPlateRect(const CPDF_Rect & rect, FX_BOOL bPaint = TRUE);
void SetScrollPos(const CPDF_Point & point);
- void SetAlignmentH(FX_INT32 nFormat = 0, FX_BOOL bPaint = TRUE);
- void SetAlignmentV(FX_INT32 nFormat = 0, FX_BOOL bPaint = TRUE);
+ void SetAlignmentH(int32_t nFormat = 0, FX_BOOL bPaint = TRUE);
+ void SetAlignmentV(int32_t nFormat = 0, FX_BOOL bPaint = TRUE);
void SetPasswordChar(FX_WORD wSubWord = '*', FX_BOOL bPaint = TRUE);
- void SetLimitChar(FX_INT32 nLimitChar = 0, FX_BOOL bPaint = TRUE);
- void SetCharArray(FX_INT32 nCharArray = 0, FX_BOOL bPaint = TRUE);
+ void SetLimitChar(int32_t nLimitChar = 0, FX_BOOL bPaint = TRUE);
+ void SetCharArray(int32_t nCharArray = 0, FX_BOOL bPaint = TRUE);
void SetCharSpace(FX_FLOAT fCharSpace = 0.0f, FX_BOOL bPaint = TRUE);
- void SetHorzScale(FX_INT32 nHorzScale = 100, FX_BOOL bPaint = TRUE);
+ void SetHorzScale(int32_t nHorzScale = 100, FX_BOOL bPaint = TRUE);
void SetLineLeading(FX_FLOAT fLineLeading, FX_BOOL bPaint = TRUE);
void SetMultiLine(FX_BOOL bMultiLine = TRUE, FX_BOOL bPaint = TRUE);
void SetAutoReturn(FX_BOOL bAuto = TRUE, FX_BOOL bPaint = TRUE);
@@ -596,18 +596,18 @@ public:
FX_BOOL IsRichText() const;
void SetRichText(FX_BOOL bRichText = TRUE, FX_BOOL bPaint = TRUE);
FX_BOOL SetRichFontSize(FX_FLOAT fFontSize);
- FX_BOOL SetRichFontIndex(FX_INT32 nFontIndex);
+ FX_BOOL SetRichFontIndex(int32_t nFontIndex);
FX_BOOL SetRichTextColor(FX_COLORREF dwColor);
- FX_BOOL SetRichTextScript(FX_INT32 nScriptType);
+ FX_BOOL SetRichTextScript(int32_t nScriptType);
FX_BOOL SetRichTextBold(FX_BOOL bBold = TRUE);
FX_BOOL SetRichTextItalic(FX_BOOL bItalic = TRUE);
FX_BOOL SetRichTextUnderline(FX_BOOL bUnderline = TRUE);
FX_BOOL SetRichTextCrossout(FX_BOOL bCrossout = TRUE);
FX_BOOL SetRichTextCharSpace(FX_FLOAT fCharSpace);
- FX_BOOL SetRichTextHorzScale(FX_INT32 nHorzScale = 100);
+ FX_BOOL SetRichTextHorzScale(int32_t nHorzScale = 100);
FX_BOOL SetRichTextLineLeading(FX_FLOAT fLineLeading);
FX_BOOL SetRichTextLineIndent(FX_FLOAT fLineIndent);
- FX_BOOL SetRichTextAlignment(FX_INT32 nAlignment);
+ FX_BOOL SetRichTextAlignment(int32_t nAlignment);
void OnMouseDown(const CPDF_Point & point,FX_BOOL bShift,FX_BOOL bCtrl);
void OnMouseMove(const CPDF_Point & point,FX_BOOL bShift,FX_BOOL bCtrl);
@@ -618,24 +618,24 @@ public:
void OnVK_HOME(FX_BOOL bShift,FX_BOOL bCtrl);
void OnVK_END(FX_BOOL bShift,FX_BOOL bCtrl);
- void SetText(FX_LPCWSTR text,FX_INT32 charset = DEFAULT_CHARSET,
+ void SetText(FX_LPCWSTR text,int32_t charset = DEFAULT_CHARSET,
const CPVT_SecProps * pSecProps = NULL,const CPVT_WordProps * pWordProps = NULL);
- FX_BOOL InsertWord(FX_WORD word, FX_INT32 charset = DEFAULT_CHARSET, const CPVT_WordProps * pWordProps = NULL);
+ FX_BOOL InsertWord(FX_WORD word, int32_t charset = DEFAULT_CHARSET, const CPVT_WordProps * pWordProps = NULL);
FX_BOOL InsertReturn(const CPVT_SecProps * pSecProps = NULL,const CPVT_WordProps * pWordProps = NULL);
FX_BOOL Backspace();
FX_BOOL Delete();
FX_BOOL Clear();
FX_BOOL Empty();
- FX_BOOL InsertText(FX_LPCWSTR text, FX_INT32 charset = DEFAULT_CHARSET,
+ FX_BOOL InsertText(FX_LPCWSTR text, int32_t charset = DEFAULT_CHARSET,
const CPVT_SecProps * pSecProps = NULL,const CPVT_WordProps * pWordProps = NULL);
FX_BOOL Redo();
FX_BOOL Undo();
- CPVT_WordPlace DoInsertText(const CPVT_WordPlace& place, FX_LPCWSTR text, FX_INT32 charset,
+ CPVT_WordPlace DoInsertText(const CPVT_WordPlace& place, FX_LPCWSTR text, int32_t charset,
const CPVT_SecProps * pSecProps, const CPVT_WordProps * pWordProps);
- FX_INT32 GetCharSetFromUnicode(FX_WORD word, FX_INT32 nOldCharset);
+ int32_t GetCharSetFromUnicode(FX_WORD word, int32_t nOldCharset);
- FX_INT32 WordPlaceToWordIndex(const CPVT_WordPlace & place) const;
- CPVT_WordPlace WordIndexToWordPlace(FX_INT32 index) const;
+ int32_t WordPlaceToWordIndex(const CPVT_WordPlace & place) const;
+ CPVT_WordPlace WordIndexToWordPlace(int32_t index) const;
CPVT_WordPlace GetLineBeginPlace(const CPVT_WordPlace & place) const;
CPVT_WordPlace GetLineEndPlace(const CPVT_WordPlace & place) const;
@@ -643,24 +643,24 @@ public:
CPVT_WordPlace GetSectionEndPlace(const CPVT_WordPlace & place) const;
CPVT_WordPlace SearchWordPlace(const CPDF_Point& point) const;
- FX_INT32 GetCaret() const;
+ int32_t GetCaret() const;
CPVT_WordPlace GetCaretWordPlace() const;
CFX_WideString GetSelText() const;
CFX_WideString GetText() const;
FX_FLOAT GetFontSize() const;
FX_WORD GetPasswordChar() const;
CPDF_Point GetScrollPos() const;
- FX_INT32 GetCharArray() const;
+ int32_t GetCharArray() const;
CPDF_Rect GetPlateRect() const;
CPDF_Rect GetContentRect() const;
CFX_WideString GetRangeText(const CPVT_WordRange & range) const;
- FX_INT32 GetHorzScale() const;
+ int32_t GetHorzScale() const;
FX_FLOAT GetCharSpace() const;
- FX_INT32 GetTotalWords() const;
- FX_INT32 GetTotalLines() const;
+ int32_t GetTotalWords() const;
+ int32_t GetTotalLines() const;
- void SetSel(FX_INT32 nStartChar,FX_INT32 nEndChar);
- void GetSel(FX_INT32 & nStartChar, FX_INT32 & nEndChar) const;
+ void SetSel(int32_t nStartChar,int32_t nEndChar);
+ void GetSel(int32_t & nStartChar, int32_t & nEndChar) const;
private:
void SelectAll();
@@ -679,14 +679,14 @@ private:
void SetContentChanged();
void EnableNotify(FX_BOOL bNotify);
- void SetText(FX_LPCWSTR text,FX_INT32 charset,
+ void SetText(FX_LPCWSTR text,int32_t charset,
const CPVT_SecProps * pSecProps,const CPVT_WordProps * pWordProps,FX_BOOL bAddUndo, FX_BOOL bPaint);
- FX_BOOL InsertWord(FX_WORD word, FX_INT32 charset, const CPVT_WordProps * pWordProps,FX_BOOL bAddUndo, FX_BOOL bPaint);
+ FX_BOOL InsertWord(FX_WORD word, int32_t charset, const CPVT_WordProps * pWordProps,FX_BOOL bAddUndo, FX_BOOL bPaint);
FX_BOOL InsertReturn(const CPVT_SecProps * pSecProps,const CPVT_WordProps * pWordProps,FX_BOOL bAddUndo, FX_BOOL bPaint);
FX_BOOL Backspace(FX_BOOL bAddUndo, FX_BOOL bPaint);
FX_BOOL Delete(FX_BOOL bAddUndo, FX_BOOL bPaint);
FX_BOOL Clear(FX_BOOL bAddUndo, FX_BOOL bPaint);
- FX_BOOL InsertText(FX_LPCWSTR text, FX_INT32 charset,
+ FX_BOOL InsertText(FX_LPCWSTR text, int32_t charset,
const CPVT_SecProps * pSecProps,const CPVT_WordProps * pWordProps,FX_BOOL bAddUndo, FX_BOOL bPaint);
FX_BOOL SetRichTextProps(EDIT_PROPS_E eProps,
const CPVT_SecProps * pSecProps, const CPVT_WordProps * pWordProps);
@@ -708,7 +708,7 @@ private:
void RefreshPushRandomRects(const CPVT_WordRange & wr);
void RefreshWordRange(const CPVT_WordRange& wr);
- void SetCaret(FX_INT32 nPos);
+ void SetCaret(int32_t nPos);
void SetCaret(const CPVT_WordPlace & place);
void SetCaretInfo();
void SetCaretOrigin();
@@ -756,7 +756,7 @@ private:
CFX_Edit_Refresh m_Refresh;
CPDF_Point m_ptCaret;
CFX_Edit_Undo m_Undo;
- FX_INT32 m_nAlignment;
+ int32_t m_nAlignment;
FX_BOOL m_bNotifyFlag;
FX_BOOL m_bEnableOverflow;
FX_BOOL m_bEnableRefresh;
@@ -785,7 +785,7 @@ public:
FX_BOOL GetWord(CPVT_Word & word) const;
FX_BOOL GetLine(CPVT_Line & line) const;
FX_BOOL GetSection(CPVT_Section & section) const;
- void SetAt(FX_INT32 nWordIndex);
+ void SetAt(int32_t nWordIndex);
void SetAt(const CPVT_WordPlace & place);
const CPVT_WordPlace & GetAt() const;
IFX_Edit* GetEdit() const;
@@ -803,11 +803,11 @@ public:
IFX_Edit_FontMap* GetFontMap();
- FX_INT32 GetCharWidth(FX_INT32 nFontIndex, FX_WORD word, FX_INT32 nWordStyle);
- FX_INT32 GetTypeAscent(FX_INT32 nFontIndex);
- FX_INT32 GetTypeDescent(FX_INT32 nFontIndex);
- FX_INT32 GetWordFontIndex(FX_WORD word, FX_INT32 charset, FX_INT32 nFontIndex);
- FX_INT32 GetDefaultFontIndex();
+ int32_t GetCharWidth(int32_t nFontIndex, FX_WORD word, int32_t nWordStyle);
+ int32_t GetTypeAscent(int32_t nFontIndex);
+ int32_t GetTypeDescent(int32_t nFontIndex);
+ int32_t GetWordFontIndex(FX_WORD word, int32_t charset, int32_t nFontIndex);
+ int32_t GetDefaultFontIndex();
FX_BOOL IsLatinWord(FX_WORD word);
private:
diff --git a/fpdfsdk/include/fxedit/fxet_list.h b/fpdfsdk/include/fxedit/fxet_list.h
index 5c689ed439..b7888eaf3b 100644
--- a/fpdfsdk/include/fxedit/fxet_list.h
+++ b/fpdfsdk/include/fxedit/fxet_list.h
@@ -209,8 +209,8 @@ template<class TYPE> class CLST_ArrayTemplate : public CFX_ArrayTemplate<TYPE>
{
public:
FX_BOOL IsEmpty() { return CFX_ArrayTemplate<TYPE>::GetSize() <= 0; }
- TYPE GetAt(FX_INT32 nIndex) const { if (nIndex >= 0 && nIndex < CFX_ArrayTemplate<TYPE>::GetSize()) return CFX_ArrayTemplate<TYPE>::GetAt(nIndex); return NULL;}
- void RemoveAt(FX_INT32 nIndex){if (nIndex >= 0 && nIndex < CFX_ArrayTemplate<TYPE>::GetSize()) CFX_ArrayTemplate<TYPE>::RemoveAt(nIndex);}
+ TYPE GetAt(int32_t nIndex) const { if (nIndex >= 0 && nIndex < CFX_ArrayTemplate<TYPE>::GetSize()) return CFX_ArrayTemplate<TYPE>::GetAt(nIndex); return NULL;}
+ void RemoveAt(int32_t nIndex){if (nIndex >= 0 && nIndex < CFX_ArrayTemplate<TYPE>::GetSize()) CFX_ArrayTemplate<TYPE>::RemoveAt(nIndex);}
};
class CFX_List : protected CFX_ListContainer , public IFX_List
@@ -227,31 +227,31 @@ public:
virtual CPDF_Rect GetContentRect() const;
virtual FX_FLOAT GetFontSize() const;
- virtual IFX_Edit* GetItemEdit(FX_INT32 nIndex) const;
- virtual FX_INT32 GetCount() const;
- virtual FX_BOOL IsItemSelected(FX_INT32 nIndex) const;
+ virtual IFX_Edit* GetItemEdit(int32_t nIndex) const;
+ virtual int32_t GetCount() const;
+ virtual FX_BOOL IsItemSelected(int32_t nIndex) const;
virtual FX_FLOAT GetFirstHeight() const;
virtual void SetMultipleSel(FX_BOOL bMultiple);
virtual FX_BOOL IsMultipleSel() const;
- virtual FX_BOOL IsValid(FX_INT32 nItemIndex) const;
- virtual FX_INT32 FindNext(FX_INT32 nIndex,FX_WCHAR nChar) const;
+ virtual FX_BOOL IsValid(int32_t nItemIndex) const;
+ virtual int32_t FindNext(int32_t nIndex,FX_WCHAR nChar) const;
protected:
virtual void Empty();
void AddItem(FX_LPCWSTR str);
- virtual void ReArrange(FX_INT32 nItemIndex);
+ virtual void ReArrange(int32_t nItemIndex);
- virtual CPDF_Rect GetItemRect(FX_INT32 nIndex) const;
- CFX_WideString GetItemText(FX_INT32 nIndex) const;
+ virtual CPDF_Rect GetItemRect(int32_t nIndex) const;
+ CFX_WideString GetItemText(int32_t nIndex) const;
- void SetItemSelect(FX_INT32 nItemIndex, FX_BOOL bSelected);
- void SetItemCaret(FX_INT32 nItemIndex, FX_BOOL bCaret);
+ void SetItemSelect(int32_t nItemIndex, FX_BOOL bSelected);
+ void SetItemCaret(int32_t nItemIndex, FX_BOOL bCaret);
- virtual FX_INT32 GetItemIndex(const CPDF_Point & point) const;
- FX_INT32 GetFirstSelected() const;
- FX_INT32 GetLastSelected() const;
+ virtual int32_t GetItemIndex(const CPDF_Point & point) const;
+ int32_t GetFirstSelected() const;
+ int32_t GetLastSelected() const;
FX_WCHAR Toupper(FX_WCHAR c) const;
private:
@@ -263,14 +263,14 @@ private:
struct CPLST_Select_Item
{
- CPLST_Select_Item(FX_INT32 nItemIndex,FX_INT32 nState)
+ CPLST_Select_Item(int32_t nItemIndex,int32_t nState)
{
this->nItemIndex = nItemIndex;
this->nState = nState;
}
- FX_INT32 nItemIndex;
- FX_INT32 nState; //0:normal select -1:to deselect 1: to select
+ int32_t nItemIndex;
+ int32_t nState; //0:normal select -1:to deselect 1: to select
};
class CPLST_Select
@@ -280,15 +280,15 @@ public:
virtual ~CPLST_Select();
public:
- void Add(FX_INT32 nItemIndex);
- void Add(FX_INT32 nBeginIndex, FX_INT32 nEndIndex);
- void Sub(FX_INT32 nItemIndex);
- void Sub(FX_INT32 nBeginIndex, FX_INT32 nEndIndex);
- FX_BOOL IsExist(FX_INT32 nItemIndex) const;
- FX_INT32 Find(FX_INT32 nItemIndex) const;
- FX_INT32 GetCount() const;
- FX_INT32 GetItemIndex(FX_INT32 nIndex) const;
- FX_INT32 GetState(FX_INT32 nIndex) const;
+ void Add(int32_t nItemIndex);
+ void Add(int32_t nBeginIndex, int32_t nEndIndex);
+ void Sub(int32_t nItemIndex);
+ void Sub(int32_t nBeginIndex, int32_t nEndIndex);
+ FX_BOOL IsExist(int32_t nItemIndex) const;
+ int32_t Find(int32_t nItemIndex) const;
+ int32_t GetCount() const;
+ int32_t GetItemIndex(int32_t nIndex) const;
+ int32_t GetState(int32_t nIndex) const;
void Done();
void DeselectAll();
@@ -313,7 +313,7 @@ public:
void OnVK_RIGHT(FX_BOOL bShift,FX_BOOL bCtrl);
void OnVK_HOME(FX_BOOL bShift,FX_BOOL bCtrl);
void OnVK_END(FX_BOOL bShift,FX_BOOL bCtrl);
- void OnVK(FX_INT32 nItemIndex,FX_BOOL bShift,FX_BOOL bCtrl);
+ void OnVK(int32_t nItemIndex,FX_BOOL bShift,FX_BOOL bCtrl);
FX_BOOL OnChar(FX_WORD nChar,FX_BOOL bShift,FX_BOOL bCtrl);
virtual CPDF_Point InToOut(const CPDF_Point & point) const;
@@ -323,41 +323,41 @@ public:
virtual void SetPlateRect(const CPDF_Rect & rect);
void SetScrollPos(const CPDF_Point & point);
- void ScrollToListItem(FX_INT32 nItemIndex);
- virtual CPDF_Rect GetItemRect(FX_INT32 nIndex) const;
- FX_INT32 GetCaret() const {return m_nCaretIndex;}
- FX_INT32 GetSelect() const {return m_nSelItem;}
- FX_INT32 GetTopItem() const;
+ void ScrollToListItem(int32_t nItemIndex);
+ virtual CPDF_Rect GetItemRect(int32_t nIndex) const;
+ int32_t GetCaret() const {return m_nCaretIndex;}
+ int32_t GetSelect() const {return m_nSelItem;}
+ int32_t GetTopItem() const;
virtual CPDF_Rect GetContentRect() const;
- virtual FX_INT32 GetItemIndex(const CPDF_Point & point) const;
+ virtual int32_t GetItemIndex(const CPDF_Point & point) const;
void AddString(FX_LPCWSTR string);
- void SetTopItem(FX_INT32 nIndex);
- void Select(FX_INT32 nItemIndex);
- virtual void SetCaret(FX_INT32 nItemIndex);
+ void SetTopItem(int32_t nIndex);
+ void Select(int32_t nItemIndex);
+ virtual void SetCaret(int32_t nItemIndex);
virtual void Empty();
virtual void Cancel();
CFX_WideString GetText() const;
private:
- void SetMultipleSelect(FX_INT32 nItemIndex, FX_BOOL bSelected);
- void SetSingleSelect(FX_INT32 nItemIndex);
- void InvalidateItem(FX_INT32 nItemIndex);
+ void SetMultipleSelect(int32_t nItemIndex, FX_BOOL bSelected);
+ void SetSingleSelect(int32_t nItemIndex);
+ void InvalidateItem(int32_t nItemIndex);
void SelectItems();
- FX_BOOL IsItemVisible(FX_INT32 nItemIndex) const;
+ FX_BOOL IsItemVisible(int32_t nItemIndex) const;
void SetScrollInfo();
void SetScrollPosY(FX_FLOAT fy);
- virtual void ReArrange(FX_INT32 nItemIndex);
+ virtual void ReArrange(int32_t nItemIndex);
private:
IFX_List_Notify* m_pNotify;
FX_BOOL m_bNotifyFlag;
CPDF_Point m_ptScrollPos;
CPLST_Select m_aSelItems; //for multiple
- FX_INT32 m_nSelItem; //for single
- FX_INT32 m_nFootIndex; //for multiple
+ int32_t m_nSelItem; //for single
+ int32_t m_nFootIndex; //for multiple
FX_BOOL m_bCtrlSel; //for multiple
- FX_INT32 m_nCaretIndex; //for multiple
+ int32_t m_nCaretIndex; //for multiple
};
#endif // FPDFSDK_INCLUDE_FXEDIT_FXET_LIST_H_
diff --git a/fpdfsdk/include/javascript/Field.h b/fpdfsdk/include/javascript/Field.h
index 0da08b6e95..573fb392c0 100644
--- a/fpdfsdk/include/javascript/Field.h
+++ b/fpdfsdk/include/javascript/Field.h
@@ -87,7 +87,7 @@ struct CJS_DelayData
CFX_WideString sFieldName;
int nControlIndex;
enum FIELD_PROP eProp;
- FX_INT32 num;
+ int32_t num;
bool b;
CFX_ByteString string;
CFX_WideString widestring;
@@ -244,7 +244,7 @@ protected:
CPDF_FormControl* GetSmartFieldControl(CPDF_FormField* pFormField);
FX_BOOL ValueIsOccur(CPDF_FormField* pFormField, CFX_WideString csOptLabel);
- void AddDelay_Int(enum FIELD_PROP prop, FX_INT32 n);
+ void AddDelay_Int(enum FIELD_PROP prop, int32_t n);
void AddDelay_Bool(enum FIELD_PROP prop,bool b);
void AddDelay_String(enum FIELD_PROP prop, const CFX_ByteString& string);
void AddDelay_WideString(enum FIELD_PROP prop, const CFX_WideString& string);
diff --git a/fpdfsdk/include/javascript/IJavaScript.h b/fpdfsdk/include/javascript/IJavaScript.h
index eea2e6a7ca..d62b68bf50 100644
--- a/fpdfsdk/include/javascript/IJavaScript.h
+++ b/fpdfsdk/include/javascript/IJavaScript.h
@@ -111,7 +111,7 @@ private:
FX_BOOL m_bInit;
int m_nRef;
CJS_GlobalData* m_pGlobalData;
- FX_INT32 m_nGlobalDataCount;
+ int32_t m_nGlobalDataCount;
};
#endif // FPDFSDK_INCLUDE_JAVASCRIPT_IJAVASCRIPT_H_
diff --git a/fpdfsdk/include/javascript/JS_Define.h b/fpdfsdk/include/javascript/JS_Define.h
index fc68e58755..15f236d681 100644
--- a/fpdfsdk/include/javascript/JS_Define.h
+++ b/fpdfsdk/include/javascript/JS_Define.h
@@ -17,7 +17,7 @@ struct JSConstSpec
const wchar_t* pName;
double number;
const wchar_t* string;
- FX_BYTE t; //0:double 1:str
+ uint8_t t; //0:double 1:str
};
struct JSPropertySpec
diff --git a/fpdfsdk/include/javascript/JS_GlobalData.h b/fpdfsdk/include/javascript/JS_GlobalData.h
index 4f09d87531..4e1073d15a 100644
--- a/fpdfsdk/include/javascript/JS_GlobalData.h
+++ b/fpdfsdk/include/javascript/JS_GlobalData.h
@@ -75,7 +75,7 @@ public:
FX_BOOL SetGlobalVariablePersistent(FX_LPCSTR propname, FX_BOOL bPersistent);
FX_BOOL DeleteGlobalVariable(FX_LPCSTR propname);
- FX_INT32 GetSize() const;
+ int32_t GetSize() const;
CJS_GlobalData_Element* GetAt(int index) const;
private:
@@ -85,8 +85,8 @@ private:
CJS_GlobalData_Element* GetGlobalVariable(FX_LPCSTR propname);
int FindGlobalVariable(FX_LPCSTR propname);
- void LoadFileBuffer(FX_LPCWSTR sFilePath, FX_LPBYTE& pBuffer, FX_INT32& nLength);
- void WriteFileBuffer(FX_LPCWSTR sFilePath, FX_LPCSTR pBuffer, FX_INT32 nLength);
+ void LoadFileBuffer(FX_LPCWSTR sFilePath, FX_LPBYTE& pBuffer, int32_t& nLength);
+ void WriteFileBuffer(FX_LPCWSTR sFilePath, FX_LPCSTR pBuffer, int32_t nLength);
void MakeByteString(const CFX_ByteString& name, CJS_KeyValue* pData, CFX_BinaryBuf& sData);
private:
diff --git a/fpdfsdk/include/javascript/util.h b/fpdfsdk/include/javascript/util.h
index b621067bc3..07f52ab8ce 100644
--- a/fpdfsdk/include/javascript/util.h
+++ b/fpdfsdk/include/javascript/util.h
@@ -45,6 +45,6 @@ public:
JS_STATIC_METHOD(byteToChar, util);
};
-FX_INT64 FX_atoi64(const char *nptr);
+int64_t FX_atoi64(const char *nptr);
#endif // FPDFSDK_INCLUDE_JAVASCRIPT_UTIL_H_
diff --git a/fpdfsdk/include/pdfwindow/PWL_Caret.h b/fpdfsdk/include/pdfwindow/PWL_Caret.h
index b827f18d3f..8efbf79341 100644
--- a/fpdfsdk/include/pdfwindow/PWL_Caret.h
+++ b/fpdfsdk/include/pdfwindow/PWL_Caret.h
@@ -46,7 +46,7 @@ private:
CPDF_Point m_ptHead;
CPDF_Point m_ptFoot;
FX_FLOAT m_fWidth;
- FX_INT32 m_nDelay;
+ int32_t m_nDelay;
CPDF_Rect m_rcInvalid;
};
diff --git a/fpdfsdk/include/pdfwindow/PWL_ComboBox.h b/fpdfsdk/include/pdfwindow/PWL_ComboBox.h
index 826f4dcc3e..7abdeeffce 100644
--- a/fpdfsdk/include/pdfwindow/PWL_ComboBox.h
+++ b/fpdfsdk/include/pdfwindow/PWL_ComboBox.h
@@ -61,7 +61,7 @@ public:
virtual FX_BOOL OnKeyDown(FX_WORD nChar, FX_DWORD nFlag);
virtual FX_BOOL OnChar(FX_WORD nChar, FX_DWORD nFlag);
- virtual void OnNotify(CPWL_Wnd* pWnd, FX_DWORD msg, FX_INTPTR wParam = 0, FX_INTPTR lParam = 0);
+ virtual void OnNotify(CPWL_Wnd* pWnd, FX_DWORD msg, intptr_t wParam = 0, intptr_t lParam = 0);
virtual void CreateChildWnd(const PWL_CREATEPARAM & cp);
virtual void RePosChildWnd();
@@ -80,11 +80,11 @@ public:
void SetText(FX_LPCWSTR text);
void AddString(FX_LPCWSTR string);
- FX_INT32 GetSelect() const;
- void SetSelect(FX_INT32 nItemIndex);
+ int32_t GetSelect() const;
+ void SetSelect(int32_t nItemIndex);
- void SetEditSel(FX_INT32 nStartChar,FX_INT32 nEndChar);
- void GetEditSel(FX_INT32 & nStartChar, FX_INT32 & nEndChar ) const;
+ void SetEditSel(int32_t nStartChar,int32_t nEndChar);
+ void GetEditSel(int32_t & nStartChar, int32_t & nEndChar ) const;
void Clear();
void SelectAll();
FX_BOOL IsPopup() const;
@@ -105,8 +105,8 @@ private:
FX_BOOL m_bPopup;
CPDF_Rect m_rcOldWindow;
- FX_INT32 m_nPopupWhere;
- FX_INT32 m_nSelectItem;
+ int32_t m_nPopupWhere;
+ int32_t m_nSelectItem;
IPWL_Filler_Notify* m_pFillerNotify;
public:
diff --git a/fpdfsdk/include/pdfwindow/PWL_Edit.h b/fpdfsdk/include/pdfwindow/PWL_Edit.h
index 5b0e7dd1ff..93db6f09bd 100644
--- a/fpdfsdk/include/pdfwindow/PWL_Edit.h
+++ b/fpdfsdk/include/pdfwindow/PWL_Edit.h
@@ -20,8 +20,8 @@ class IPWL_Filler_Notify
public:
virtual ~IPWL_Filler_Notify() { }
virtual void QueryWherePopup(void* pPrivateData, FX_FLOAT fPopupMin,FX_FLOAT fPopupMax,
- FX_INT32 & nRet, FX_FLOAT & fPopupRet) = 0; //nRet: (0:bottom 1:top)
- virtual void OnBeforeKeyStroke(FX_BOOL bEditOrList, void* pPrivateData, FX_INT32 nKeyCode,
+ int32_t & nRet, FX_FLOAT & fPopupRet) = 0; //nRet: (0:bottom 1:top)
+ virtual void 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) = 0;
@@ -61,10 +61,10 @@ public:
void SetAlignFormatH(PWL_EDIT_ALIGNFORMAT_H nFormat = PEAH_LEFT, FX_BOOL bPaint = TRUE); //0:left 1:right 2:middle
void SetAlignFormatV(PWL_EDIT_ALIGNFORMAT_V nFormat = PEAV_TOP, FX_BOOL bPaint = TRUE); //0:top 1:bottom 2:center
- void SetCharArray(FX_INT32 nCharArray);
- void SetLimitChar(FX_INT32 nLimitChar);
+ void SetCharArray(int32_t nCharArray);
+ void SetLimitChar(int32_t nLimitChar);
- void SetHorzScale(FX_INT32 nHorzScale, FX_BOOL bPaint = TRUE);
+ void SetHorzScale(int32_t nHorzScale, FX_BOOL bPaint = TRUE);
void SetCharSpace(FX_FLOAT fCharSpace, FX_BOOL bPaint = TRUE);
void SetLineLeading(FX_FLOAT fLineLeading, FX_BOOL bPaint = TRUE);
@@ -90,7 +90,7 @@ public:
FX_BOOL IsTextFull() const;
- static FX_FLOAT GetCharArrayAutoFontSize(CPDF_Font* pFont, const CPDF_Rect& rcPlate, FX_INT32 nCharArray);
+ static FX_FLOAT GetCharArrayAutoFontSize(CPDF_Font* pFont, const CPDF_Rect& rcPlate, int32_t nCharArray);
void SetFillerNotify(IPWL_Filler_Notify* pNotify) {m_pFillerNotify = pNotify;}
@@ -119,7 +119,7 @@ private:
FX_BOOL IsVScrollBarVisible() const;
void SetParamByFlag();
- FX_FLOAT GetCharArrayAutoFontSize(FX_INT32 nCharArray);
+ FX_FLOAT GetCharArrayAutoFontSize(int32_t nCharArray);
CPDF_Point GetWordRightBottomPoint(const CPVT_WordPlace& wpWord);
CPVT_WordRange CombineWordRange(const CPVT_WordRange& wr1, const CPVT_WordRange& wr2);
diff --git a/fpdfsdk/include/pdfwindow/PWL_EditCtrl.h b/fpdfsdk/include/pdfwindow/PWL_EditCtrl.h
index 600c348446..2eb779ddc8 100644
--- a/fpdfsdk/include/pdfwindow/PWL_EditCtrl.h
+++ b/fpdfsdk/include/pdfwindow/PWL_EditCtrl.h
@@ -37,7 +37,7 @@ class IPWL_Edit_Notify
public:
virtual ~IPWL_Edit_Notify() { }
//when the position of caret is changed in edit
- virtual void OnCaretMove(FX_INT32 x1, FX_INT32 y1, FX_INT32 x2, FX_INT32 y2) {}
+ virtual void OnCaretMove(int32_t x1, int32_t y1, int32_t x2, int32_t y2) {}
virtual void OnContentChange(const CPDF_Rect& rcContent){}
//OprType: 0 InsertWord
//1 InsertReturn
@@ -73,7 +73,7 @@ public:
virtual FX_BOOL OnLButtonDown(const CPDF_Point & point, FX_DWORD nFlag);
virtual FX_BOOL OnLButtonUp(const CPDF_Point & point, FX_DWORD nFlag);
virtual FX_BOOL OnMouseMove(const CPDF_Point & point, FX_DWORD nFlag);
- virtual void OnNotify(CPWL_Wnd* pWnd, FX_DWORD msg, FX_INTPTR wParam = 0, FX_INTPTR lParam = 0);
+ virtual void OnNotify(CPWL_Wnd* pWnd, FX_DWORD msg, intptr_t wParam = 0, intptr_t lParam = 0);
virtual void CreateChildWnd(const PWL_CREATEPARAM & cp);
virtual void RePosChildWnd();
@@ -88,20 +88,20 @@ public:
virtual void CutText();
CPDF_Rect GetContentRect() const;
- void GetCaretPos(FX_INT32& x, FX_INT32& y) const;
+ void GetCaretPos(int32_t& x, int32_t& y) const;
FX_BOOL IsModified() const;
CFX_WideString GetText() const;
- void SetSel(FX_INT32 nStartChar,FX_INT32 nEndChar);
- void GetSel(FX_INT32 & nStartChar, FX_INT32 & nEndChar ) const;
- void GetTextRange(const CPDF_Rect& rect, FX_INT32 & nStartChar, FX_INT32 & nEndChar) const;
- CFX_WideString GetText(FX_INT32 & nStartChar, FX_INT32 & nEndChar) const;
+ void SetSel(int32_t nStartChar,int32_t nEndChar);
+ void GetSel(int32_t & nStartChar, int32_t & nEndChar ) const;
+ void GetTextRange(const CPDF_Rect& rect, int32_t & nStartChar, int32_t & nEndChar) const;
+ CFX_WideString GetText(int32_t & nStartChar, int32_t & nEndChar) const;
void Clear();
void SelectAll();
- FX_INT32 GetCaret() const;
- void SetCaret(FX_INT32 nPos);
- FX_INT32 GetTotalWords() const;
+ int32_t GetCaret() const;
+ void SetCaret(int32_t nPos);
+ int32_t GetTotalWords() const;
void Paint();
@@ -111,11 +111,11 @@ public:
void SetEditNotify(IPWL_Edit_Notify* pNotify) {m_pEditNotify = pNotify;}
- void SetCharSet(FX_BYTE nCharSet){m_nCharSet = nCharSet;}
- FX_INT32 GetCharSet() const;
+ void SetCharSet(uint8_t nCharSet){m_nCharSet = nCharSet;}
+ int32_t GetCharSet() const;
- void SetCodePage(FX_INT32 nCodePage){m_nCodePage = nCodePage;}
- FX_INT32 GetCodePage() const {return m_nCodePage;}
+ void SetCodePage(int32_t nCodePage){m_nCodePage = nCodePage;}
+ int32_t GetCodePage() const {return m_nCodePage;}
CPDF_Font * GetCaretFont() const;
FX_FLOAT GetCaretFontSize() const;
@@ -129,7 +129,7 @@ public:
protected:
virtual void ShowVScrollBar(FX_BOOL bShow);
- virtual void InsertWord(FX_WORD word, FX_INT32 nCharset);
+ virtual void InsertWord(FX_WORD word, int32_t nCharset);
virtual void InsertReturn();
virtual void InsertText(FX_LPCWSTR csText);
@@ -169,8 +169,8 @@ protected:
IPWL_Edit_Notify* m_pEditNotify;
private:
- FX_INT32 m_nCharSet;
- FX_INT32 m_nCodePage;
+ int32_t m_nCharSet;
+ int32_t m_nCodePage;
};
#endif // FPDFSDK_INCLUDE_PDFWINDOW_PWL_EDITCTRL_H_
diff --git a/fpdfsdk/include/pdfwindow/PWL_FontMap.h b/fpdfsdk/include/pdfwindow/PWL_FontMap.h
index cdce862b29..4f44660cb2 100644
--- a/fpdfsdk/include/pdfwindow/PWL_FontMap.h
+++ b/fpdfsdk/include/pdfwindow/PWL_FontMap.h
@@ -16,13 +16,13 @@ class IFX_SystemHandler;
struct CPWL_FontMap_Data
{
CPDF_Font* pFont;
- FX_INT32 nCharset;
+ int32_t nCharset;
CFX_ByteString sFontName;
};
struct CPWL_FontMap_Native
{
- FX_INT32 nCharset;
+ int32_t nCharset;
CFX_ByteString sFontName;
};
@@ -65,51 +65,51 @@ public:
CPWL_FontMap(IFX_SystemHandler* pSystemHandler);
virtual ~CPWL_FontMap();
- virtual CPDF_Font* GetPDFFont(FX_INT32 nFontIndex);
- virtual CFX_ByteString GetPDFFontAlias(FX_INT32 nFontIndex);
- virtual FX_INT32 GetWordFontIndex(FX_WORD word, FX_INT32 nCharset, FX_INT32 nFontIndex);
- virtual FX_INT32 CharCodeFromUnicode(FX_INT32 nFontIndex, FX_WORD word);
- virtual FX_INT32 CharSetFromUnicode(FX_WORD word, FX_INT32 nOldCharset);
+ virtual CPDF_Font* GetPDFFont(int32_t nFontIndex);
+ virtual CFX_ByteString GetPDFFontAlias(int32_t nFontIndex);
+ virtual int32_t GetWordFontIndex(FX_WORD word, int32_t nCharset, int32_t nFontIndex);
+ virtual int32_t CharCodeFromUnicode(int32_t nFontIndex, FX_WORD word);
+ virtual int32_t CharSetFromUnicode(FX_WORD word, int32_t nOldCharset);
public:
virtual void Initial(FX_LPCSTR fontname = NULL);
void SetSystemHandler(IFX_SystemHandler* pSystemHandler);
- FX_INT32 GetFontMapCount() const;
- const CPWL_FontMap_Data* GetFontMapData(FX_INT32 nIndex) const;
+ int32_t GetFontMapCount() const;
+ const CPWL_FontMap_Data* GetFontMapData(int32_t nIndex) const;
public:
- static FX_INT32 GetNativeCharset();
- CFX_ByteString GetNativeFontName(FX_INT32 nCharset);
+ static int32_t GetNativeCharset();
+ CFX_ByteString GetNativeFontName(int32_t nCharset);
- static CFX_ByteString GetDefaultFontByCharset(FX_INT32 nCharset);
+ static CFX_ByteString GetDefaultFontByCharset(int32_t nCharset);
- CPDF_Font* AddFontToDocument(CPDF_Document* pDoc, CFX_ByteString& sFontName, FX_BYTE nCharset);
+ CPDF_Font* AddFontToDocument(CPDF_Document* pDoc, CFX_ByteString& sFontName, uint8_t nCharset);
static FX_BOOL IsStandardFont(const CFX_ByteString& sFontName);
CPDF_Font* AddStandardFont(CPDF_Document* pDoc, CFX_ByteString& sFontName);
CPDF_Font* AddSystemFont(CPDF_Document* pDoc, CFX_ByteString& sFontName,
- FX_BYTE nCharset);
+ uint8_t nCharset);
protected:
- virtual CPDF_Font* FindFontSameCharset(CFX_ByteString& sFontAlias, FX_INT32 nCharset);
+ virtual CPDF_Font* FindFontSameCharset(CFX_ByteString& sFontAlias, int32_t nCharset);
virtual void AddedFont(CPDF_Font* pFont, const CFX_ByteString& sFontAlias);
- FX_BOOL KnowWord(FX_INT32 nFontIndex, FX_WORD word);
+ FX_BOOL KnowWord(int32_t nFontIndex, FX_WORD word);
virtual CPDF_Document* GetDocument();
void Empty();
- FX_INT32 GetFontIndex(const CFX_ByteString& sFontName, FX_INT32 nCharset, FX_BOOL bFind);
- FX_INT32 GetPWLFontIndex(FX_WORD word, FX_INT32 nCharset);
- FX_INT32 AddFontData(CPDF_Font* pFont, const CFX_ByteString& sFontAlias, FX_INT32 nCharset = DEFAULT_CHARSET);
+ int32_t GetFontIndex(const CFX_ByteString& sFontName, int32_t nCharset, FX_BOOL bFind);
+ int32_t GetPWLFontIndex(FX_WORD word, int32_t nCharset);
+ int32_t AddFontData(CPDF_Font* pFont, const CFX_ByteString& sFontAlias, int32_t nCharset = DEFAULT_CHARSET);
- CFX_ByteString EncodeFontAlias(const CFX_ByteString& sFontName, FX_INT32 nCharset);
+ CFX_ByteString EncodeFontAlias(const CFX_ByteString& sFontName, int32_t nCharset);
CFX_ByteString EncodeFontAlias(const CFX_ByteString& sFontName);
private:
- CFX_ByteString GetFontName(FX_INT32 nFontIndex);
- FX_INT32 FindFont(const CFX_ByteString& sFontName, FX_INT32 nCharset = DEFAULT_CHARSET);
+ CFX_ByteString GetFontName(int32_t nFontIndex);
+ int32_t FindFont(const CFX_ByteString& sFontName, int32_t nCharset = DEFAULT_CHARSET);
- CFX_ByteString GetNativeFont(FX_INT32 nCharset);
+ CFX_ByteString GetNativeFont(int32_t nCharset);
public:
using CharsetFontMap = FPDF_CharsetFontMap;
diff --git a/fpdfsdk/include/pdfwindow/PWL_Icon.h b/fpdfsdk/include/pdfwindow/PWL_Icon.h
index cb56a9929e..c09f7a9fe8 100644
--- a/fpdfsdk/include/pdfwindow/PWL_Icon.h
+++ b/fpdfsdk/include/pdfwindow/PWL_Icon.h
@@ -45,7 +45,7 @@ public:
virtual void GetScale(FX_FLOAT & fHScale,FX_FLOAT & fVScale);
virtual void GetImageOffset(FX_FLOAT & x,FX_FLOAT & y);
- FX_INT32 GetScaleMethod();
+ int32_t GetScaleMethod();
FX_BOOL IsProportionalScale();
void GetIconPosition(FX_FLOAT & fLeft, FX_FLOAT & fBottom);
FX_BOOL GetFittingBounds();
diff --git a/fpdfsdk/include/pdfwindow/PWL_IconList.h b/fpdfsdk/include/pdfwindow/PWL_IconList.h
index d074b76be1..74438c2afd 100644
--- a/fpdfsdk/include/pdfwindow/PWL_IconList.h
+++ b/fpdfsdk/include/pdfwindow/PWL_IconList.h
@@ -21,7 +21,7 @@ class IPWL_IconList_Notify
{
public:
virtual ~IPWL_IconList_Notify() { }
- virtual void OnNoteListSelChanged(FX_INT32 nItemIndex) = 0;
+ virtual void OnNoteListSelChanged(int32_t nItemIndex) = 0;
};
class CPWL_IconList_Item : public CPWL_Wnd
@@ -37,7 +37,7 @@ public:
void SetSelect(FX_BOOL bSelected);
FX_BOOL IsSelected() const;
void SetData(void* pData);
- void SetIcon(FX_INT32 nIconIndex);
+ void SetIcon(int32_t nIconIndex);
void SetText(const CFX_WideString& str);
void SetIconFillColor(const CPWL_Color& color);
CFX_WideString GetText() const;
@@ -50,7 +50,7 @@ protected:
virtual void OnDisabled();
private:
- FX_INT32 m_nIconIndex;
+ int32_t m_nIconIndex;
void* m_pData;
FX_BOOL m_bSelected;
CPWL_Label* m_pText;
@@ -60,20 +60,20 @@ private:
class CPWL_IconList_Content : public CPWL_ListCtrl
{
public:
- CPWL_IconList_Content(FX_INT32 nListCount);
+ CPWL_IconList_Content(int32_t nListCount);
virtual ~CPWL_IconList_Content();
- void SetSelect(FX_INT32 nIndex);
- FX_INT32 GetSelect() const;
+ void SetSelect(int32_t nIndex);
+ int32_t GetSelect() const;
void SetNotify(IPWL_IconList_Notify* pNotify);
void EnableNotify(FX_BOOL bNotify);
- void SetListData(FX_INT32 nItemIndex, void* pData);
- void SetListIcon(FX_INT32 nItemIndex, FX_INT32 nIconIndex);
- void SetListString(FX_INT32 nItemIndex, const CFX_WideString& str);
+ void SetListData(int32_t nItemIndex, void* pData);
+ void SetListIcon(int32_t nItemIndex, int32_t nIconIndex);
+ void SetListString(int32_t nItemIndex, const CFX_WideString& str);
void SetIconFillColor(const CPWL_Color& color);
- CFX_WideString GetListString(FX_INT32 nItemIndex) const;
+ CFX_WideString GetListString(int32_t nItemIndex) const;
IPWL_IconList_Notify* GetNotify() const;
- void ScrollToItem(FX_INT32 nItemIndex);
+ void ScrollToItem(int32_t nItemIndex);
protected:
virtual void CreateChildWnd(const PWL_CREATEPARAM & cp);
@@ -83,46 +83,46 @@ protected:
virtual FX_BOOL OnKeyDown(FX_WORD nChar, FX_DWORD nFlag);
private:
- CPWL_IconList_Item* GetListItem(FX_INT32 nItemIndex) const;
- void SelectItem(FX_INT32 nItemIndex, FX_BOOL bSelect);
- FX_INT32 FindItemIndex(const CPDF_Point& point);
+ CPWL_IconList_Item* GetListItem(int32_t nItemIndex) const;
+ void SelectItem(int32_t nItemIndex, FX_BOOL bSelect);
+ int32_t FindItemIndex(const CPDF_Point& point);
FX_BOOL m_nSelectIndex;
IPWL_IconList_Notify* m_pNotify;
FX_BOOL m_bEnableNotify;
FX_BOOL m_bMouseDown;
- FX_INT32 m_nListCount;
+ int32_t m_nListCount;
};
class PWL_CLASS CPWL_IconList : public CPWL_Wnd
{
public:
- CPWL_IconList(FX_INT32 nListCount);
+ CPWL_IconList(int32_t nListCount);
virtual ~CPWL_IconList();
virtual FX_BOOL OnMouseWheel(short zDelta, const CPDF_Point & point, FX_DWORD nFlag);
- void SetSelect(FX_INT32 nIndex);
- void SetTopItem(FX_INT32 nIndex);
- FX_INT32 GetSelect() const;
+ void SetSelect(int32_t nIndex);
+ void SetTopItem(int32_t nIndex);
+ int32_t GetSelect() const;
void SetNotify(IPWL_IconList_Notify* pNotify);
void EnableNotify(FX_BOOL bNotify);
- void SetListData(FX_INT32 nItemIndex, void* pData);
- void SetListIcon(FX_INT32 nItemIndex, FX_INT32 nIconIndex);
- void SetListString(FX_INT32 nItemIndex, const CFX_WideString& str);
+ void SetListData(int32_t nItemIndex, void* pData);
+ void SetListIcon(int32_t nItemIndex, int32_t nIconIndex);
+ void SetListString(int32_t nItemIndex, const CFX_WideString& str);
void SetIconFillColor(const CPWL_Color& color);
- CFX_WideString GetListString(FX_INT32 nItemIndex) const;
+ CFX_WideString GetListString(int32_t nItemIndex) const;
protected:
virtual void OnCreated();
virtual void RePosChildWnd();
virtual void CreateChildWnd(const PWL_CREATEPARAM & cp);
- virtual void OnNotify(CPWL_Wnd* pWnd, FX_DWORD msg, FX_INTPTR wParam = 0, FX_INTPTR lParam = 0);
+ virtual void OnNotify(CPWL_Wnd* pWnd, FX_DWORD msg, intptr_t wParam = 0, intptr_t lParam = 0);
private:
CPWL_IconList_Content* m_pListContent;
- FX_INT32 m_nListCount;
+ int32_t m_nListCount;
};
#endif // FPDFSDK_INCLUDE_PDFWINDOW_PWL_ICONLIST_H_
diff --git a/fpdfsdk/include/pdfwindow/PWL_Label.h b/fpdfsdk/include/pdfwindow/PWL_Label.h
index f724a0a82b..be083db486 100644
--- a/fpdfsdk/include/pdfwindow/PWL_Label.h
+++ b/fpdfsdk/include/pdfwindow/PWL_Label.h
@@ -23,11 +23,11 @@ public:
void SetText(FX_LPCWSTR csText);
CFX_WideString GetText() const;
- void SetLimitChar(FX_INT32 nLimitChar);
- void SetHorzScale(FX_INT32 nHorzScale);
+ void SetLimitChar(int32_t nLimitChar);
+ void SetHorzScale(int32_t nHorzScale);
void SetCharSpace(FX_FLOAT fCharSpace);
CPDF_Rect GetContentRect() const;
- FX_INT32 GetTotalWords();
+ int32_t GetTotalWords();
CFX_ByteString GetTextAppearanceStream(const CPDF_Point & ptOffset) const;
protected:
diff --git a/fpdfsdk/include/pdfwindow/PWL_ListBox.h b/fpdfsdk/include/pdfwindow/PWL_ListBox.h
index e8e9036b8e..c5a6df76dd 100644
--- a/fpdfsdk/include/pdfwindow/PWL_ListBox.h
+++ b/fpdfsdk/include/pdfwindow/PWL_ListBox.h
@@ -57,7 +57,7 @@ public:
virtual FX_BOOL OnMouseWheel(short zDelta, const CPDF_Point & point, FX_DWORD nFlag);
virtual void KillFocus();
- virtual void OnNotify(CPWL_Wnd* pWnd, FX_DWORD msg, FX_INTPTR wParam = 0, FX_INTPTR lParam = 0);
+ virtual void OnNotify(CPWL_Wnd* pWnd, FX_DWORD msg, intptr_t wParam = 0, intptr_t lParam = 0);
virtual void RePosChildWnd();
virtual void SetText(FX_LPCWSTR csText,FX_BOOL bRefresh = TRUE);
virtual CFX_WideString GetText() const;
@@ -68,21 +68,21 @@ public:
void OnNotifySelChanged(FX_BOOL bKeyDown, FX_BOOL & bExit , FX_DWORD nFlag);
void AddString(FX_LPCWSTR string);
- void SetTopVisibleIndex(FX_INT32 nItemIndex);
- void ScrollToListItem(FX_INT32 nItemIndex);
+ void SetTopVisibleIndex(int32_t nItemIndex);
+ void ScrollToListItem(int32_t nItemIndex);
void ResetContent();
void Reset();
- void Select(FX_INT32 nItemIndex);
- void SetCaret(FX_INT32 nItemIndex);
+ void Select(int32_t nItemIndex);
+ void SetCaret(int32_t nItemIndex);
void SetHoverSel(FX_BOOL bHoverSel);
- FX_INT32 GetCount() const;
+ int32_t GetCount() const;
FX_BOOL IsMultipleSel() const;
- FX_INT32 GetCaretIndex() const;
- FX_INT32 GetCurSel() const;
- FX_BOOL IsItemSelected(FX_INT32 nItemIndex) const;
- FX_INT32 GetTopVisibleIndex() const;
- FX_INT32 FindNext(FX_INT32 nIndex,FX_WCHAR nChar) const;
+ int32_t GetCaretIndex() const;
+ int32_t GetCurSel() const;
+ FX_BOOL IsItemSelected(int32_t nItemIndex) const;
+ int32_t GetTopVisibleIndex() const;
+ int32_t FindNext(int32_t nIndex,FX_WCHAR nChar) const;
CPDF_Rect GetContentRect() const;
FX_FLOAT GetFirstHeight() const;
CPDF_Rect GetListRect() const;
diff --git a/fpdfsdk/include/pdfwindow/PWL_ListCtrl.h b/fpdfsdk/include/pdfwindow/PWL_ListCtrl.h
index 65df7aecfc..56a1fbf919 100644
--- a/fpdfsdk/include/pdfwindow/PWL_ListCtrl.h
+++ b/fpdfsdk/include/pdfwindow/PWL_ListCtrl.h
@@ -22,8 +22,8 @@ public:
void SetTopSpace(FX_FLOAT fSpace);
void SetBottomSpace(FX_FLOAT fSpace);
void ResetFace();
- void ResetContent(FX_INT32 nStart);
- FX_INT32 GetItemIndex(CPWL_Wnd* pItem);
+ void ResetContent(int32_t nStart);
+ int32_t GetItemIndex(CPWL_Wnd* pItem);
FX_FLOAT GetContentsHeight(FX_FLOAT fLimitWidth);
CPDF_Point InToOut(const CPDF_Point& point) const;
CPDF_Point OutToIn(const CPDF_Point& point) const;
@@ -35,7 +35,7 @@ protected:
virtual void DrawChildAppearance(CFX_RenderDevice* pDevice, CPDF_Matrix* pUser2Device);
private:
- void ResetAll(FX_BOOL bMove,FX_INT32 nStart);
+ void ResetAll(FX_BOOL bMove,int32_t nStart);
CPDF_Rect m_rcContent;
CPDF_Point m_ptScroll;
diff --git a/fpdfsdk/include/pdfwindow/PWL_Note.h b/fpdfsdk/include/pdfwindow/PWL_Note.h
index c5cdc4dd9c..a9e6dda05b 100644
--- a/fpdfsdk/include/pdfwindow/PWL_Note.h
+++ b/fpdfsdk/include/pdfwindow/PWL_Note.h
@@ -43,8 +43,8 @@ public:
virtual void OnSetContents(IPWL_NoteItem* pItem) = 0;
virtual void OnSetDateTime(IPWL_NoteItem* pItem) = 0;
virtual void OnSetSubjectName(IPWL_NoteItem* pItem) = 0;
- virtual void OnPopupMenu(FX_INT32 x, FX_INT32 y) = 0;
- virtual void OnPopupMenu(IPWL_NoteItem* pItem, FX_INT32 x, FX_INT32 y) = 0;
+ virtual void OnPopupMenu(int32_t x, int32_t y) = 0;
+ virtual void OnPopupMenu(IPWL_NoteItem* pItem, int32_t x, int32_t y) = 0;
};
class IPWL_NoteHandler
@@ -66,8 +66,8 @@ public:
virtual void SetContents(const CFX_WideString& sContents) = 0;
virtual IPWL_NoteItem* CreateSubItem() = 0;
- virtual FX_INT32 CountSubItems() const = 0;
- virtual IPWL_NoteItem* GetSubItems(FX_INT32 index) const = 0;
+ virtual int32_t CountSubItems() const = 0;
+ virtual IPWL_NoteItem* GetSubItems(int32_t index) const = 0;
virtual void DeleteSubItem(IPWL_NoteItem* pNoteItem) = 0;
virtual void SetFocus() = 0;
@@ -88,7 +88,7 @@ public:
CPWL_Note_Icon();
virtual ~CPWL_Note_Icon();
- void SetIconType(FX_INT32 nType);
+ void SetIconType(int32_t nType);
public:
@@ -96,7 +96,7 @@ protected:
virtual void DrawThisAppearance(CFX_RenderDevice* pDevice, CPDF_Matrix* pUser2Device);
private:
- FX_INT32 m_nType;
+ int32_t m_nType;
};
class CPWL_Note_CloseBox : public CPWL_Button
@@ -148,7 +148,7 @@ public:
virtual void SetText(FX_LPCWSTR csText);
protected:
- virtual void OnNotify(CPWL_Wnd* pWnd, FX_DWORD msg, FX_INTPTR wParam = 0, FX_INTPTR lParam = 0);
+ virtual void OnNotify(CPWL_Wnd* pWnd, FX_DWORD msg, intptr_t wParam = 0, intptr_t lParam = 0);
virtual void RePosChildWnd();
virtual void OnSetFocus();
virtual void OnKillFocus();
@@ -187,7 +187,7 @@ public:
virtual ~CPWL_Note_Contents();
virtual CFX_ByteString GetClassName() const;
- virtual void OnNotify(CPWL_Wnd* pWnd, FX_DWORD msg, FX_INTPTR wParam = 0, FX_INTPTR lParam = 0);
+ virtual void OnNotify(CPWL_Wnd* pWnd, FX_DWORD msg, intptr_t wParam = 0, intptr_t lParam = 0);
virtual FX_BOOL OnLButtonDown(const CPDF_Point& point, FX_DWORD nFlag);
void SetEditFocus(FX_BOOL bLast);
@@ -199,8 +199,8 @@ public:
CPWL_NoteItem* CreateSubItem();
void DeleteSubItem(IPWL_NoteItem* pNoteItem);
- FX_INT32 CountSubItems() const;
- IPWL_NoteItem* GetSubItems(FX_INT32 index) const;
+ int32_t CountSubItems() const;
+ IPWL_NoteItem* GetSubItems(int32_t index) const;
virtual IPWL_NoteItem* GetHitNoteItem(const CPDF_Point& point);
void EnableRead(FX_BOOL bEnabled);
@@ -228,8 +228,8 @@ public:
virtual void SetContents(const CFX_WideString& sContents);
virtual IPWL_NoteItem* CreateSubItem();
- virtual FX_INT32 CountSubItems() const;
- virtual IPWL_NoteItem* GetSubItems(FX_INT32 index) const;
+ virtual int32_t CountSubItems() const;
+ virtual IPWL_NoteItem* GetSubItems(int32_t index) const;
virtual void DeleteSubItem(IPWL_NoteItem* pNoteItem);
virtual void SetFocus(){SetNoteFocus(FALSE);}
@@ -250,7 +250,7 @@ public:
virtual IPWL_NoteItem* GetHitNoteItem(const CPDF_Point& point);
virtual IPWL_NoteItem* GetFocusedNoteItem() const;
- virtual void ResetSubjectName(FX_INT32 nItemIndex);
+ virtual void ResetSubjectName(int32_t nItemIndex);
void EnableRead(FX_BOOL bEnabled);
void EnableModify(FX_BOOL bEnabled);
@@ -258,7 +258,7 @@ protected:
virtual void RePosChildWnd();
virtual void CreateChildWnd(const PWL_CREATEPARAM & cp);
- virtual void OnNotify(CPWL_Wnd* pWnd, FX_DWORD msg, FX_INTPTR wParam = 0, FX_INTPTR lParam = 0);
+ virtual void OnNotify(CPWL_Wnd* pWnd, FX_DWORD msg, intptr_t wParam = 0, intptr_t lParam = 0);
public:
virtual FX_FLOAT GetItemHeight(FX_FLOAT fLimitWidth);
@@ -304,7 +304,7 @@ public:
virtual void SetAuthorName(const CFX_WideString& sName);
virtual CFX_WideString GetAuthorName() const;
virtual void SetBkColor(const CPWL_Color& color);
- virtual void ResetSubjectName(FX_INT32 nItemIndex){}
+ virtual void ResetSubjectName(int32_t nItemIndex){}
virtual FX_BOOL IsTopItem() const {return TRUE;}
virtual const CPWL_Note* GetNote() const;
virtual IPWL_NoteNotify* GetNoteNotify() const;
@@ -312,7 +312,7 @@ public:
public:
IPWL_NoteItem* Reply();
void EnableNotify(FX_BOOL bEnabled);
- void SetIconType(FX_INT32 nType);
+ void SetIconType(int32_t nType);
void SetOptionsText(const CFX_WideString& sText);
void EnableRead(FX_BOOL bEnabled);
void EnableModify(FX_BOOL bEnabled);
@@ -321,7 +321,7 @@ public:
void SetReplyString(const CFX_WideString& string);
//0-normal / 1-caption / 2-leftbottom corner / 3-rightbottom corner / 4-close / 5-options
- FX_INT32 NoteHitTest(const CPDF_Point& point) const;
+ int32_t NoteHitTest(const CPDF_Point& point) const;
CPDF_Rect GetCaptionRect() const {return m_rcCaption;}
IPopup_Note* GetPopupNote() const {return m_pPopupNote;}
@@ -334,7 +334,7 @@ protected:
virtual void RePosChildWnd();
virtual void CreateChildWnd(const PWL_CREATEPARAM & cp);
- virtual void OnNotify(CPWL_Wnd* pWnd, FX_DWORD msg, FX_INTPTR wParam = 0, FX_INTPTR lParam = 0);
+ virtual void OnNotify(CPWL_Wnd* pWnd, FX_DWORD msg, intptr_t wParam = 0, intptr_t lParam = 0);
FX_BOOL ResetScrollBar();
void RePosNoteChildren();
diff --git a/fpdfsdk/include/pdfwindow/PWL_ScrollBar.h b/fpdfsdk/include/pdfwindow/PWL_ScrollBar.h
index 2f0473f1d2..bf92399e88 100644
--- a/fpdfsdk/include/pdfwindow/PWL_ScrollBar.h
+++ b/fpdfsdk/include/pdfwindow/PWL_ScrollBar.h
@@ -112,7 +112,7 @@ public:
virtual FX_BOOL OnLButtonDown(const CPDF_Point & point, FX_DWORD nFlag);
virtual FX_BOOL OnLButtonUp(const CPDF_Point & point, FX_DWORD nFlag);
- virtual void OnNotify(CPWL_Wnd* pWnd, FX_DWORD msg, FX_INTPTR wParam = 0, FX_INTPTR lParam = 0);
+ virtual void OnNotify(CPWL_Wnd* pWnd, FX_DWORD msg, intptr_t wParam = 0, intptr_t lParam = 0);
virtual void CreateChildWnd(const PWL_CREATEPARAM & cp);
diff --git a/fpdfsdk/include/pdfwindow/PWL_Utils.h b/fpdfsdk/include/pdfwindow/PWL_Utils.h
index 51514f2513..9f121e80a8 100644
--- a/fpdfsdk/include/pdfwindow/PWL_Utils.h
+++ b/fpdfsdk/include/pdfwindow/PWL_Utils.h
@@ -18,7 +18,7 @@ struct CPWL_Color;
template<class T> T PWL_MIN (const T & i, const T & j) { return ((i < j) ? i : j); }
template<class T> T PWL_MAX (const T & i, const T & j) { return ((i > j) ? i : j); }
-#define PWL_PDF2WIN(color) (FX_BYTE(color*255))
+#define PWL_PDF2WIN(color) (uint8_t(color*255))
#define PWL_WIN2PDF(color) ((FX_FLOAT)((FX_FLOAT)color/255.0f))
#define PWL_MAKEDWORD(low,high) ((FX_DWORD)((FX_WORD)(low) | (FX_DWORD)(((FX_WORD)(high))<<16)))
@@ -119,17 +119,17 @@ public:
static CPDF_Rect MaxRect(const CPDF_Rect & rect1,const CPDF_Rect & rect2);
static CPDF_Rect OffsetRect(const CPDF_Rect & rect,FX_FLOAT x,FX_FLOAT y);
static CPDF_Point OffsetPoint(const CPDF_Point & point,FX_FLOAT x,FX_FLOAT y);
- static FX_COLORREF PWLColorToFXColor(const CPWL_Color& color, FX_INT32 nTransparancy = 255);
+ static FX_COLORREF PWLColorToFXColor(const CPWL_Color& color, int32_t nTransparancy = 255);
static FX_BOOL IsBlackOrWhite(const CPWL_Color& color);
static CPWL_Color GetReverseColor(const CPWL_Color& color);
static CFX_ByteString GetColorAppStream(const CPWL_Color & color,const FX_BOOL & bFillOrStroke = TRUE);
static CFX_ByteString 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);
static CFX_ByteString 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);
static CFX_ByteString GetRectFillAppStream(const CPDF_Rect & rect,const CPWL_Color & color);
static CFX_ByteString GetCircleFillAppStream(const CPDF_Rect & rect,const CPWL_Color & color);
@@ -140,12 +140,12 @@ public:
const CFX_WideString & sLabel,
const CPWL_Color & crText,
FX_FLOAT fFontSize,
- FX_INT32 nLayOut);
+ int32_t nLayOut);
static CFX_ByteString GetCheckBoxAppStream(const CPDF_Rect & rcBBox,
- FX_INT32 nStyle,
+ int32_t nStyle,
const CPWL_Color & crText);
static CFX_ByteString GetRadioButtonAppStream(const CPDF_Rect & rcBBox,
- FX_INT32 nStyle,
+ int32_t nStyle,
const CPWL_Color & crText);
static CFX_ByteString GetEditAppStream(IFX_Edit* pEdit, const CPDF_Point & ptOffset, const CPVT_WordRange * pRange = NULL,
@@ -156,12 +156,12 @@ public:
const CPDF_Point & ptOffset,
const CPVT_WordRange * pRange = NULL);
static CFX_ByteString 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);
static CFX_ByteString GetDropButtonAppStream(const CPDF_Rect & rcBBox);
static void 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);
static void DrawFillRect(CFX_RenderDevice* pDevice, CPDF_Matrix* pUser2Device,
const CPDF_Rect & rect,const FX_COLORREF & color);
static void DrawStrokeRect(CFX_RenderDevice* pDevice, CPDF_Matrix* pUser2Device,const CPDF_Rect & rect,
@@ -171,12 +171,12 @@ public:
static void 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);
static void 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);
static void 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);
static void DrawEditSpellCheck(CFX_RenderDevice* pDevice, CPDF_Matrix* pUser2Device, IFX_Edit* pEdit,
const CPDF_Rect& rcClip, const CPDF_Point& ptOffset, const CPVT_WordRange* pRange,
IPWL_SpellCheck* pSpellCheck);
@@ -190,18 +190,18 @@ public:
static void ConvertCMYK2GRAY(FX_FLOAT dC,FX_FLOAT dM,FX_FLOAT dY,FX_FLOAT dK,FX_FLOAT &dGray);
static void ConvertGRAY2CMYK(FX_FLOAT dGray,FX_FLOAT &dC,FX_FLOAT &dM,FX_FLOAT &dY,FX_FLOAT &dK);
- static void PWLColorToARGB(const CPWL_Color& color, FX_INT32& alpha, FX_FLOAT& red, FX_FLOAT& green, FX_FLOAT& blue);
+ static void PWLColorToARGB(const CPWL_Color& color, int32_t& alpha, FX_FLOAT& red, FX_FLOAT& green, FX_FLOAT& blue);
public:
- static CFX_ByteString GetIconAppStream(FX_INT32 nType, const CPDF_Rect& rect, const CPWL_Color& crFill,
+ static CFX_ByteString GetIconAppStream(int32_t nType, const CPDF_Rect& rect, const CPWL_Color& crFill,
const CPWL_Color& crStroke = PWL_DEFAULT_BLACKCOLOR);
static void 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);
private:
- static CFX_ByteString GetAppStreamFromArray(const CPWL_PathData* pPathData, FX_INT32 nCount);
- static void GetPathDataFromArray(CFX_PathData& path, const CPWL_PathData* pPathData, FX_INT32 nCount);
+ static CFX_ByteString GetAppStreamFromArray(const CPWL_PathData* pPathData, int32_t nCount);
+ static void GetPathDataFromArray(CFX_PathData& path, const CPWL_PathData* pPathData, int32_t nCount);
static CFX_ByteString GetAppStream_Check(const CPDF_Rect & rcBBox, const CPWL_Color & crText);
static CFX_ByteString GetAppStream_Circle(const CPDF_Rect & rcBBox, const CPWL_Color & crText);
diff --git a/fpdfsdk/include/pdfwindow/PWL_Wnd.h b/fpdfsdk/include/pdfwindow/PWL_Wnd.h
index 4fa1c7639b..970480f14a 100644
--- a/fpdfsdk/include/pdfwindow/PWL_Wnd.h
+++ b/fpdfsdk/include/pdfwindow/PWL_Wnd.h
@@ -107,25 +107,25 @@ class IPWL_SpellCheck;
struct CPWL_Dash
{
- CPWL_Dash(FX_INT32 dash, FX_INT32 gap, FX_INT32 phase) : nDash(dash), nGap(gap), nPhase(phase)
+ CPWL_Dash(int32_t dash, int32_t gap, int32_t phase) : nDash(dash), nGap(gap), nPhase(phase)
{}
- FX_INT32 nDash;
- FX_INT32 nGap;
- FX_INT32 nPhase;
+ int32_t nDash;
+ int32_t nGap;
+ int32_t nPhase;
};
struct PWL_CLASS CPWL_Color
{
- CPWL_Color(FX_INT32 type = COLORTYPE_TRANSPARENT, FX_FLOAT color1 = 0.0f, FX_FLOAT color2 = 0.0f, FX_FLOAT color3 = 0.0f, FX_FLOAT color4 = 0.0f)
+ CPWL_Color(int32_t type = COLORTYPE_TRANSPARENT, FX_FLOAT color1 = 0.0f, FX_FLOAT color2 = 0.0f, FX_FLOAT color3 = 0.0f, FX_FLOAT color4 = 0.0f)
: nColorType(type), fColor1(color1), fColor2(color2), fColor3(color3), fColor4(color4)
{}
- CPWL_Color(FX_INT32 r, FX_INT32 g, FX_INT32 b) :
+ CPWL_Color(int32_t r, int32_t g, int32_t b) :
nColorType(COLORTYPE_RGB), fColor1(r/255.0f), fColor2(g/255.0f), fColor3(b/255.0f), fColor4(0)
{}
- void ConvertColorType(FX_INT32 nColorType);
+ void ConvertColorType(int32_t nColorType);
/*
COLORTYPE_TRANSPARENT
@@ -133,7 +133,7 @@ struct PWL_CLASS CPWL_Color
COLORTYPE_CMYK
COLORTYPE_GRAY
*/
- FX_INT32 nColorType;
+ int32_t nColorType;
FX_FLOAT fColor1,fColor2,fColor3,fColor4;
};
@@ -194,7 +194,7 @@ public:
5 L"&Delete"
6 L"&Select All\tCtrl+A"
*/
- virtual CFX_WideString LoadPopupMenuString(FX_INT32 nIndex) = 0;
+ virtual CFX_WideString LoadPopupMenuString(int32_t nIndex) = 0;
};
class IPWL_FocusHandler
@@ -242,18 +242,18 @@ public:
CPWL_Color sBackgroundColor; //optional
FX_HWND hAttachedWnd; //required for no-reader framework
IPWL_SpellCheck* pSpellCheck; //required for spellchecking
- FX_INT32 nBorderStyle; //optional
- FX_INT32 dwBorderWidth; //optional
+ int32_t nBorderStyle; //optional
+ int32_t dwBorderWidth; //optional
CPWL_Color sBorderColor; //optional
CPWL_Color sTextColor; //optional
CPWL_Color sTextStrokeColor; //optional
- FX_INT32 nTransparency; //optional
+ int32_t nTransparency; //optional
FX_FLOAT fFontSize; //optional
CPWL_Dash sDash; //optional
void* pAttachedData; //optional
CPWL_Wnd* pParentWnd; //ignore
CPWL_MsgControl* pMsgControl; //ignore
- FX_INT32 eCursorType; //ignore
+ int32_t eCursorType; //ignore
CPDF_Matrix mtChild; //ignore
};
@@ -263,12 +263,12 @@ public:
CPWL_Timer(CPWL_TimerHandler* pAttached, IFX_SystemHandler* pSystemHandler);
virtual ~CPWL_Timer();
- FX_INT32 SetPWLTimer(FX_INT32 nElapse);
+ int32_t SetPWLTimer(int32_t nElapse);
void KillPWLTimer();
- static void TimerProc(FX_INT32 idEvent);
+ static void TimerProc(int32_t idEvent);
private:
- FX_INT32 m_nTimerID;
+ int32_t m_nTimerID;
CPWL_TimerHandler* m_pAttached;
IFX_SystemHandler* m_pSystemHandler;
};
@@ -279,7 +279,7 @@ public:
CPWL_TimerHandler();
virtual ~CPWL_TimerHandler();
- void BeginTimer(FX_INT32 nElapse);
+ void BeginTimer(int32_t nElapse);
void EndTimer();
virtual void TimerProc();
virtual IFX_SystemHandler* GetSystemHandler() const = 0;
@@ -324,7 +324,7 @@ public:
void SetCapture();
void ReleaseCapture();
- virtual void OnNotify(CPWL_Wnd* pWnd, FX_DWORD msg, FX_INTPTR wParam = 0, FX_INTPTR lParam = 0);
+ virtual void OnNotify(CPWL_Wnd* pWnd, FX_DWORD msg, intptr_t wParam = 0, intptr_t lParam = 0);
virtual void SetTextColor(const CPWL_Color & color);
virtual void SetTextStrokeColor(const CPWL_Color & color);
virtual void SetVisible(FX_BOOL bVisible);
@@ -335,9 +335,9 @@ public:
virtual CPWL_Color GetTextColor() const;
virtual CPWL_Color GetTextStrokeColor() const;
virtual FX_FLOAT GetFontSize() const;
- virtual FX_INT32 GetInnerBorderWidth() const;
- virtual CPWL_Color GetBorderLeftTopColor(FX_INT32 nBorderStyle) const;
- virtual CPWL_Color GetBorderRightBottomColor(FX_INT32 nBorderStyle) const;
+ virtual int32_t GetInnerBorderWidth() const;
+ virtual CPWL_Color GetBorderLeftTopColor(int32_t nBorderStyle) const;
+ virtual CPWL_Color GetBorderRightBottomColor(int32_t nBorderStyle) const;
virtual FX_BOOL IsModified() const {return FALSE;}
@@ -345,9 +345,9 @@ public:
void SetBackgroundColor(const CPWL_Color & color);
void SetBorderColor(const CPWL_Color & color);
- void SetBorderWidth(FX_INT32 nBorderWidth);
+ void SetBorderWidth(int32_t nBorderWidth);
void SetClipRect(const CPDF_Rect & rect);
- void SetBorderStyle(FX_INT32 eBorderStyle);
+ void SetBorderStyle(int32_t eBorderStyle);
void SetBorderDash(const CPWL_Dash & sDash);
CPDF_Rect GetOriginWindowRect() const;
@@ -356,14 +356,14 @@ public:
CPDF_Point GetCenterPoint() const;
CPDF_Rect GetClientCenterSquare() const;
CPDF_Rect GetWindowCenterSquare() const;
- FX_INT32 GetBorderWidth() const;
+ int32_t GetBorderWidth() const;
FX_BOOL IsVisible() const {return m_bVisible;}
FX_BOOL HasFlag(FX_DWORD dwFlags) const;
void AddFlag(FX_DWORD dwFlags);
void RemoveFlag(FX_DWORD dwFlags);
CPDF_Rect GetClipRect() const;
CPWL_Wnd* GetParentWindow() const;
- FX_INT32 GetBorderStyle() const;
+ int32_t GetBorderStyle() const;
CPWL_Dash GetBorderDash() const;
void* GetAttachedData() const;
@@ -381,8 +381,8 @@ public:
virtual IFX_SystemHandler* GetSystemHandler() const;
IPWL_FocusHandler* GetFocusHandler() const;
- FX_INT32 GetTransparency();
- void SetTransparency(FX_INT32 nTransparency);
+ int32_t GetTransparency();
+ void SetTransparency(int32_t nTransparency);
CPDF_Matrix GetChildToRoot() const;
CPDF_Matrix GetChildMatrix() const;
@@ -431,7 +431,7 @@ protected:
void InvalidateRectMove(const CPDF_Rect & rcOld, const CPDF_Rect & rcNew);
- void PWLtoWnd(const CPDF_Point & point, FX_INT32& x, FX_INT32& y) const;
+ void PWLtoWnd(const CPDF_Point & point, int32_t& x, int32_t& y) const;
FX_RECT PWLtoWnd(const CPDF_Rect & rect) const;
FX_HWND GetAttachedHWnd() const;
diff --git a/fpdfsdk/src/formfiller/FFL_CBA_Fontmap.cpp b/fpdfsdk/src/formfiller/FFL_CBA_Fontmap.cpp
index 9f04861e44..d73fbf45b0 100644
--- a/fpdfsdk/src/formfiller/FFL_CBA_Fontmap.cpp
+++ b/fpdfsdk/src/formfiller/FFL_CBA_Fontmap.cpp
@@ -45,7 +45,7 @@ void CBA_FontMap::Reset()
void CBA_FontMap::Initial(FX_LPCSTR fontname)
{
- FX_INT32 nCharset = DEFAULT_CHARSET;
+ int32_t nCharset = DEFAULT_CHARSET;
if (!m_pDefaultFont)
{
@@ -83,13 +83,13 @@ void CBA_FontMap::SetDefaultFont(CPDF_Font * pFont, const CFX_ByteString & sFont
// if (m_sDefaultFontName.IsEmpty())
// m_sDefaultFontName = pFont->GetFontTypeName();
- FX_INT32 nCharset = DEFAULT_CHARSET;
+ int32_t nCharset = DEFAULT_CHARSET;
if (const CFX_SubstFont* pSubstFont = m_pDefaultFont->GetSubstFont())
nCharset = pSubstFont->m_Charset;
AddFontData(m_pDefaultFont, m_sDefaultFontName, nCharset);
}
-CPDF_Font* CBA_FontMap::FindFontSameCharset(CFX_ByteString& sFontAlias, FX_INT32 nCharset)
+CPDF_Font* CBA_FontMap::FindFontSameCharset(CFX_ByteString& sFontAlias, int32_t nCharset)
{
ASSERT(m_pAnnotDict != NULL);
@@ -119,7 +119,7 @@ CPDF_Document* CBA_FontMap::GetDocument()
}
CPDF_Font* CBA_FontMap::FindResFontSameCharset(CPDF_Dictionary* pResDict, CFX_ByteString& sFontAlias,
- FX_INT32 nCharset)
+ int32_t nCharset)
{
if (!pResDict) return NULL;
@@ -186,8 +186,8 @@ void CBA_FontMap::AddFontToAnnotDict(CPDF_Font* pFont, const CFX_ByteString& sAl
CPDF_Stream* pStream = pAPDict->GetStream(m_sAPType);
if (pStream == NULL)
{
- pStream = FX_NEW CPDF_Stream(NULL, 0, NULL);
- FX_INT32 objnum = m_pDocument->AddIndirectObject(pStream);
+ pStream = new CPDF_Stream(NULL, 0, NULL);
+ int32_t objnum = m_pDocument->AddIndirectObject(pStream);
pAPDict->SetAtReference(m_sAPType, m_pDocument, objnum);
}
@@ -213,8 +213,8 @@ void CBA_FontMap::AddFontToAnnotDict(CPDF_Font* pFont, const CFX_ByteString& sAl
CPDF_Dictionary* pStreamResFontList = pStreamResList->GetDict("Font");
if (!pStreamResFontList)
{
- pStreamResFontList = FX_NEW CPDF_Dictionary;
- FX_INT32 objnum = m_pDocument->AddIndirectObject(pStreamResFontList);
+ pStreamResFontList = new CPDF_Dictionary;
+ int32_t objnum = m_pDocument->AddIndirectObject(pStreamResFontList);
pStreamResList->SetAtReference("Font", m_pDocument, objnum);
}
if (!pStreamResFontList->KeyExist(sAlias))
diff --git a/fpdfsdk/src/formfiller/FFL_CheckBox.cpp b/fpdfsdk/src/formfiller/FFL_CheckBox.cpp
index f8035c7ec9..dad485cac3 100644
--- a/fpdfsdk/src/formfiller/FFL_CheckBox.cpp
+++ b/fpdfsdk/src/formfiller/FFL_CheckBox.cpp
@@ -124,7 +124,7 @@ void CFFL_CheckBox::SaveData(CPDFSDK_PageView* pPageView)
CPDF_FormField* pField = m_pWidget->GetFormField();
ASSERT(pField != NULL);
- for (FX_INT32 i=0,sz=pField->CountControls(); i<sz; i++)
+ for (int32_t i=0,sz=pField->CountControls(); i<sz; i++)
{
if (CPDF_FormControl* pCtrl = pField->GetControl(i))
{
diff --git a/fpdfsdk/src/formfiller/FFL_ComboBox.cpp b/fpdfsdk/src/formfiller/FFL_ComboBox.cpp
index a86c2520b3..123c1cd24a 100644
--- a/fpdfsdk/src/formfiller/FFL_ComboBox.cpp
+++ b/fpdfsdk/src/formfiller/FFL_ComboBox.cpp
@@ -80,14 +80,14 @@ CPWL_Wnd* CFFL_ComboBox::NewPDFWindow(const PWL_CREATEPARAM& cp, CPDFSDK_PageVie
CFFL_IFormFiller* pFormFiller = m_pApp->GetIFormFiller();
pWnd->SetFillerNotify(pFormFiller);
- FX_INT32 nCurSel = m_pWidget->GetSelectedIndex(0);
+ int32_t nCurSel = m_pWidget->GetSelectedIndex(0);
CFX_WideString swText;
if (nCurSel < 0)
swText = m_pWidget->GetValue();
else
swText = m_pWidget->GetOptionLabel(nCurSel);
- for (FX_INT32 i=0,sz=m_pWidget->CountOptions(); i<sz; i++)
+ for (int32_t i=0,sz=m_pWidget->CountOptions(); i<sz; i++)
{
pWnd->AddString(m_pWidget->GetOptionLabel(i).c_str());
}
@@ -107,7 +107,7 @@ FX_BOOL CFFL_ComboBox::IsDataChanged(CPDFSDK_PageView* pPageView)
{
if (CPWL_ComboBox * pWnd = (CPWL_ComboBox*)GetPDFWindow(pPageView, FALSE))
{
- FX_INT32 nCurSel = pWnd->GetSelect();
+ int32_t nCurSel = pWnd->GetSelect();
ASSERT(m_pWidget != NULL);
@@ -138,7 +138,7 @@ void CFFL_ComboBox::SaveData(CPDFSDK_PageView* pPageView)
if (CPWL_ComboBox* pWnd = (CPWL_ComboBox*)GetPDFWindow(pPageView, FALSE))
{
CFX_WideString swText = pWnd->GetText();
- FX_INT32 nCurSel = pWnd->GetSelect();
+ int32_t nCurSel = pWnd->GetSelect();
//mantis:0004157
FX_BOOL bSetValue = TRUE;
diff --git a/fpdfsdk/src/formfiller/FFL_FormFiller.cpp b/fpdfsdk/src/formfiller/FFL_FormFiller.cpp
index c9dd6681d2..9fdcbbdc4a 100644
--- a/fpdfsdk/src/formfiller/FFL_FormFiller.cpp
+++ b/fpdfsdk/src/formfiller/FFL_FormFiller.cpp
@@ -9,9 +9,9 @@
#include "../../include/formfiller/FFL_Notify.h"
#include "../../include/formfiller/FFL_CBA_Fontmap.h"
-#define GetRed(rgb) ((FX_BYTE)(rgb))
-#define GetGreen(rgb) ((FX_BYTE)(((FX_WORD)(rgb)) >> 8))
-#define GetBlue(rgb) ((FX_BYTE)((rgb)>>16))
+#define GetRed(rgb) ((uint8_t)(rgb))
+#define GetGreen(rgb) ((uint8_t)(((FX_WORD)(rgb)) >> 8))
+#define GetBlue(rgb) ((uint8_t)((rgb)>>16))
#define FFL_HINT_ELAPSE 800
diff --git a/fpdfsdk/src/formfiller/FFL_IFormFiller.cpp b/fpdfsdk/src/formfiller/FFL_IFormFiller.cpp
index 42af6be574..6f96d33da8 100644
--- a/fpdfsdk/src/formfiller/FFL_IFormFiller.cpp
+++ b/fpdfsdk/src/formfiller/FFL_IFormFiller.cpp
@@ -722,7 +722,7 @@ void CFFL_IFormFiller::SetFocusAnnotTab(CPDFSDK_Annot* pWidget, FX_BOOL bSameFie
}
-void CFFL_IFormFiller::QueryWherePopup(void* pPrivateData, FX_FLOAT fPopupMin,FX_FLOAT fPopupMax, FX_INT32 & nRet, FX_FLOAT & fPopupRet)
+void CFFL_IFormFiller::QueryWherePopup(void* pPrivateData, FX_FLOAT fPopupMin,FX_FLOAT fPopupMax, int32_t & nRet, FX_FLOAT & fPopupRet)
{
ASSERT(pPrivateData != NULL);
@@ -837,7 +837,7 @@ void CFFL_IFormFiller::OnSetWindowRect(void* pPrivateData, const CPDF_Rect & rcW
}
}
-void CFFL_IFormFiller::OnKeyStroke(FX_BOOL bEditOrList, void* pPrivateData, FX_INT32 nKeyCode, CFX_WideString& strChange,
+void CFFL_IFormFiller::OnKeyStroke(FX_BOOL bEditOrList, void* pPrivateData, int32_t nKeyCode, CFX_WideString& strChange,
const CFX_WideString& strChangeEx, FX_BOOL bKeyDown,
FX_BOOL & bRC, FX_BOOL & bExit)
{
@@ -1284,7 +1284,7 @@ void CFFL_IFormFiller::DoPaste(CPDFSDK_Document* pDocument)
{
}
-void CFFL_IFormFiller::OnBeforeKeyStroke(FX_BOOL bEditOrList, void* pPrivateData, FX_INT32 nKeyCode,
+void CFFL_IFormFiller::OnBeforeKeyStroke(FX_BOOL bEditOrList, void* pPrivateData, int32_t nKeyCode,
CFX_WideString & strChange, const CFX_WideString& strChangeEx,
int nSelStart, int nSelEnd,
FX_BOOL bKeyDown, FX_BOOL & bRC, FX_BOOL & bExit, FX_DWORD nFlag)
diff --git a/fpdfsdk/src/formfiller/FFL_ListBox.cpp b/fpdfsdk/src/formfiller/FFL_ListBox.cpp
index dffd17538f..6b0aa1b347 100644
--- a/fpdfsdk/src/formfiller/FFL_ListBox.cpp
+++ b/fpdfsdk/src/formfiller/FFL_ListBox.cpp
@@ -76,7 +76,7 @@ CPWL_Wnd* CFFL_ListBox::NewPDFWindow(const PWL_CREATEPARAM& cp, CPDFSDK_PageView
CFFL_IFormFiller* pIFormFiller = m_pApp->GetIFormFiller();
pWnd->SetFillerNotify(pIFormFiller);
- for (FX_INT32 i=0,sz=m_pWidget->CountOptions(); i<sz; i++)
+ for (int32_t i=0,sz=m_pWidget->CountOptions(); i<sz; i++)
pWnd->AddString(m_pWidget->GetOptionLabel(i).c_str());
if (pWnd->HasFlag(PLBS_MULTIPLESEL))
@@ -84,7 +84,7 @@ CPWL_Wnd* CFFL_ListBox::NewPDFWindow(const PWL_CREATEPARAM& cp, CPDFSDK_PageView
m_OriginSelections.RemoveAll();
FX_BOOL bSetCaret = FALSE;
- for (FX_INT32 i=0,sz=m_pWidget->CountOptions(); i<sz; i++)
+ for (int32_t i=0,sz=m_pWidget->CountOptions(); i<sz; i++)
{
if (m_pWidget->IsOptionSelected(i))
{
@@ -130,7 +130,7 @@ FX_BOOL CFFL_ListBox::IsDataChanged(CPDFSDK_PageView* pPageView)
if (m_pWidget->GetFieldFlags() & FIELDFLAG_MULTISELECT)
{
int nSelCount = 0;
- for (FX_INT32 i=0,sz=pListBox->GetCount(); i<sz; i++)
+ for (int32_t i=0,sz=pListBox->GetCount(); i<sz; i++)
{
if (pListBox->IsItemSelected(i))
{
@@ -172,13 +172,13 @@ void CFFL_ListBox::SaveData(CPDFSDK_PageView* pPageView)
}
- FX_INT32 nNewTopIndex = pListBox->GetTopVisibleIndex();
+ int32_t nNewTopIndex = pListBox->GetTopVisibleIndex();
m_pWidget->ClearSelection(FALSE);
if (m_pWidget->GetFieldFlags() & FIELDFLAG_MULTISELECT)
{
- for (FX_INT32 i=0,sz=pListBox->GetCount(); i<sz; i++)
+ for (int32_t i=0,sz=pListBox->GetCount(); i<sz; i++)
{
if (pListBox->IsItemSelected(i))
{
@@ -215,7 +215,7 @@ void CFFL_ListBox::GetActionData(CPDFSDK_PageView* pPageView, CPDF_AAction::AAct
if (CPWL_ListBox* pListBox = (CPWL_ListBox*)GetPDFWindow(pPageView, FALSE))
{
ASSERT(m_pWidget != NULL);
- FX_INT32 nCurSel = pListBox->GetCurSel();
+ int32_t nCurSel = pListBox->GetCurSel();
if (nCurSel >= 0)
fa.sValue = m_pWidget->GetOptionLabel(nCurSel);
}
@@ -230,7 +230,7 @@ void CFFL_ListBox::GetActionData(CPDFSDK_PageView* pPageView, CPDF_AAction::AAct
else
{
ASSERT(m_pWidget != NULL);
- FX_INT32 nCurSel = m_pWidget->GetSelectedIndex(0);
+ int32_t nCurSel = m_pWidget->GetSelectedIndex(0);
if (nCurSel >= 0)
fa.sValue = m_pWidget->GetOptionLabel(nCurSel);
}
@@ -252,7 +252,7 @@ void CFFL_ListBox::SaveState(CPDFSDK_PageView* pPageView)
if (CPWL_ListBox* pListBox = (CPWL_ListBox*)GetPDFWindow(pPageView, FALSE))
{
- for (FX_INT32 i=0,sz=pListBox->GetCount(); i<sz; i++)
+ for (int32_t i=0,sz=pListBox->GetCount(); i<sz; i++)
{
if (pListBox->IsItemSelected(i))
{
diff --git a/fpdfsdk/src/formfiller/FFL_Notify.cpp b/fpdfsdk/src/formfiller/FFL_Notify.cpp
index 73ab5dbb85..406aa8d489 100644
--- a/fpdfsdk/src/formfiller/FFL_Notify.cpp
+++ b/fpdfsdk/src/formfiller/FFL_Notify.cpp
@@ -127,7 +127,7 @@ FX_BOOL CFFL_Notify::ExecuteActionTree(CPDF_AAction::AActionType eAAT,CPDF_Actio
if (!ExecuteAction(eAAT,action,bExit)) return FALSE;
if (bExit) return TRUE;
- for (FX_INT32 i=0,sz=action.GetSubActionsCount(); i<sz; i++)
+ for (int32_t i=0,sz=action.GetSubActionsCount(); i<sz; i++)
{
CPDF_Action subaction = action.GetSubAction(i);
if (!ExecuteActionTree(eAAT,subaction,bExit)) return FALSE;
diff --git a/fpdfsdk/src/formfiller/FFL_RadioButton.cpp b/fpdfsdk/src/formfiller/FFL_RadioButton.cpp
index aacb7d81e9..708d6df090 100644
--- a/fpdfsdk/src/formfiller/FFL_RadioButton.cpp
+++ b/fpdfsdk/src/formfiller/FFL_RadioButton.cpp
@@ -117,7 +117,7 @@ void CFFL_RadioButton::SaveData(CPDFSDK_PageView* pPageView)
CPDF_FormField* pField = m_pWidget->GetFormField();
ASSERT(pField != NULL);
- for (FX_INT32 i=0,sz=pField->CountControls(); i<sz; i++)
+ for (int32_t i=0,sz=pField->CountControls(); i<sz; i++)
{
if (CPDF_FormControl* pCtrl = pField->GetControl(i))
{
diff --git a/fpdfsdk/src/formfiller/FFL_TextField.cpp b/fpdfsdk/src/formfiller/FFL_TextField.cpp
index 46f738dc73..fb7fec9ea7 100644
--- a/fpdfsdk/src/formfiller/FFL_TextField.cpp
+++ b/fpdfsdk/src/formfiller/FFL_TextField.cpp
@@ -114,7 +114,7 @@ CPWL_Wnd* CFFL_TextField::NewPDFWindow(const PWL_CREATEPARAM& cp, CPDFSDK_PageVi
pWnd->SetFillerNotify(pIFormFiller);
ASSERT(m_pWidget != NULL);
- FX_INT32 nMaxLen = m_pWidget->GetMaxLen();
+ int32_t nMaxLen = m_pWidget->GetMaxLen();
CFX_WideString swValue = m_pWidget->GetValue();
if (nMaxLen > 0)
diff --git a/fpdfsdk/src/formfiller/FFL_Utils.cpp b/fpdfsdk/src/formfiller/FFL_Utils.cpp
index 196102bfb4..2f988b2f0b 100644
--- a/fpdfsdk/src/formfiller/FFL_Utils.cpp
+++ b/fpdfsdk/src/formfiller/FFL_Utils.cpp
@@ -93,7 +93,7 @@ FX_BOOL CFFL_Utils::TraceObject(CPDF_Object* pObj)
case PDFOBJ_BOOLEAN:
break;
case PDFOBJ_NUMBER:
- //TRACE("%d\n",(FX_INT32)pObj);
+ //TRACE("%d\n",(int32_t)pObj);
break;
case PDFOBJ_STRING:
//TRACE(((CPDF_String*)pObj)->GetString() + "\n");
diff --git a/fpdfsdk/src/fpdfppo.cpp b/fpdfsdk/src/fpdfppo.cpp
index 21cf647dd6..5c66e4bb69 100644
--- a/fpdfsdk/src/fpdfppo.cpp
+++ b/fpdfsdk/src/fpdfppo.cpp
@@ -179,7 +179,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 7e68740e59..fa6bb2ef53 100644
--- a/fpdfsdk/src/fpdfview.cpp
+++ b/fpdfsdk/src/fpdfview.cpp
@@ -104,7 +104,7 @@ CPDF_CustomAccess::CPDF_CustomAccess(FPDF_FILEACCESS* pFileAccess)
m_BufferOffset = (FX_DWORD)-1;
}
-FX_BOOL CPDF_CustomAccess::GetByte(FX_DWORD pos, FX_BYTE& ch)
+FX_BOOL CPDF_CustomAccess::GetByte(FX_DWORD pos, uint8_t& ch)
{
if (pos >= m_FileAccess.m_FileLen) return FALSE;
if (m_BufferOffset == (FX_DWORD)-1 || pos < m_BufferOffset || pos >= m_BufferOffset + 512) {
@@ -302,7 +302,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;}
@@ -320,14 +320,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 = FX_NEW CPDF_Parser;
pParser->SetPassword(password);
- CMemFile* pMemFile = FX_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/fpdfxfa/fpdfxfa_app.cpp b/fpdfsdk/src/fpdfxfa/fpdfxfa_app.cpp
index 2c096c7145..cf5db2b3c3 100644
--- a/fpdfsdk/src/fpdfxfa/fpdfxfa_app.cpp
+++ b/fpdfsdk/src/fpdfxfa/fpdfxfa_app.cpp
@@ -178,7 +178,7 @@ void CPDFXFA_App::Beep(FX_DWORD dwType)
}
}
-FX_INT32 CPDFXFA_App::MsgBox(FX_WSTR wsMessage, FX_WSTR wsTitle, FX_DWORD dwIconType, FX_DWORD dwButtonType)
+int32_t CPDFXFA_App::MsgBox(FX_WSTR wsMessage, FX_WSTR wsTitle, FX_DWORD dwIconType, FX_DWORD dwButtonType)
{
CPDFDoc_Environment* pEnv = m_pEnvList.GetAt(0);
if (!pEnv)
@@ -216,7 +216,7 @@ FX_INT32 CPDFXFA_App::MsgBox(FX_WSTR wsMessage, FX_WSTR wsTitle, FX_DWORD dwIcon
iButtonType |= 3;
break;
}
- FX_INT32 iRet = pEnv->JS_appAlert(wsMessage.GetPtr(), wsTitle.GetPtr(), iButtonType, iconType);
+ int32_t iRet = pEnv->JS_appAlert(wsMessage.GetPtr(), wsTitle.GetPtr(), iButtonType, iconType);
switch (iRet)
{
case 1:
@@ -250,7 +250,7 @@ void CPDFXFA_App::Response(CFX_WideString &wsAnswer, FX_WSTR wsQuestion, FX_WSTR
}
}
-FX_INT32 CPDFXFA_App::GetCurDocumentInBatch()
+int32_t CPDFXFA_App::GetCurDocumentInBatch()
{
CPDFDoc_Environment* pEnv = m_pEnvList.GetAt(0);
if (pEnv)
@@ -260,7 +260,7 @@ FX_INT32 CPDFXFA_App::GetCurDocumentInBatch()
return 0;
}
-FX_INT32 CPDFXFA_App::GetDocumentCountInBatch()
+int32_t CPDFXFA_App::GetDocumentCountInBatch()
{
CPDFDoc_Environment* pEnv = m_pEnvList.GetAt(0);
if (pEnv)
@@ -303,7 +303,7 @@ FX_BOOL CPDFXFA_App::PutRequestURL(FX_WSTR wsURL, FX_WSTR wsData, FX_WSTR wsEnco
return FALSE;
}
-void CPDFXFA_App::LoadString(FX_INT32 iStringID, CFX_WideString &wsString)
+void CPDFXFA_App::LoadString(int32_t iStringID, CFX_WideString &wsString)
{
switch (iStringID)
{
diff --git a/fpdfsdk/src/fpdfxfa/fpdfxfa_doc.cpp b/fpdfsdk/src/fpdfxfa/fpdfxfa_doc.cpp
index e64bde1a2a..106e3cbc12 100644
--- a/fpdfsdk/src/fpdfxfa/fpdfxfa_doc.cpp
+++ b/fpdfsdk/src/fpdfxfa/fpdfxfa_doc.cpp
@@ -633,7 +633,7 @@ void CPDFXFA_Document::WidgetEvent(IXFA_Widget* hWidget, CXFA_WidgetAcc* pWidget
}
}
-FX_INT32 CPDFXFA_Document::CountPages(IXFA_Doc* hDoc)
+int32_t CPDFXFA_Document::CountPages(IXFA_Doc* hDoc)
{
if (hDoc == m_pXFADoc && m_pSDKDoc)
{
@@ -641,7 +641,7 @@ FX_INT32 CPDFXFA_Document::CountPages(IXFA_Doc* hDoc)
}
return 0;
}
-FX_INT32 CPDFXFA_Document::GetCurrentPage(IXFA_Doc* hDoc)
+int32_t CPDFXFA_Document::GetCurrentPage(IXFA_Doc* hDoc)
{
if (hDoc != m_pXFADoc || !m_pSDKDoc)
return -1;
@@ -655,7 +655,7 @@ FX_INT32 CPDFXFA_Document::GetCurrentPage(IXFA_Doc* hDoc)
return pEnv->FFI_GetCurrentPageIndex(this);
}
-void CPDFXFA_Document::SetCurrentPage(IXFA_Doc* hDoc, FX_INT32 iCurPage)
+void CPDFXFA_Document::SetCurrentPage(IXFA_Doc* hDoc, int32_t iCurPage)
{
if (hDoc != m_pXFADoc || !m_pSDKDoc)
return;
@@ -896,7 +896,7 @@ void CPDFXFA_Document::SetFocusWidget(IXFA_Doc* hDoc, IXFA_Widget* hWidget)
}
}
}
-void CPDFXFA_Document::Print(IXFA_Doc* hDoc, FX_INT32 nStartPage, FX_INT32 nEndPage, FX_DWORD dwOptions)
+void CPDFXFA_Document::Print(IXFA_Doc* hDoc, int32_t nStartPage, int32_t nEndPage, FX_DWORD dwOptions)
{
if (hDoc != m_pXFADoc)
return;
@@ -935,7 +935,7 @@ FX_ARGB CPDFXFA_Document::GetHighlightColor(IXFA_Doc* hDoc)
if(CPDFSDK_InterForm* pInterForm = m_pSDKDoc->GetInterForm())
{
FX_COLORREF color = pInterForm->GetHighlightColor(FPDF_FORMFIELD_XFA);
- FX_BYTE alpha = pInterForm->GetHighlightAlpha();
+ uint8_t alpha = pInterForm->GetHighlightAlpha();
FX_ARGB argb = ArgbEncode((int)alpha, color);
return argb;
}
diff --git a/fpdfsdk/src/fpdfxfa/fpdfxfa_util.cpp b/fpdfsdk/src/fpdfxfa/fpdfxfa_util.cpp
index fb625d2738..ac5ef21f58 100644
--- a/fpdfsdk/src/fpdfxfa/fpdfxfa_util.cpp
+++ b/fpdfsdk/src/fpdfxfa/fpdfxfa_util.cpp
@@ -14,7 +14,7 @@ FWL_ERR CXFA_FWLAdapterTimerMgr::Start(IFWL_Timer *pTimer, FX_DWORD dwElapse, FW
{
if (m_pEnv)
{
- FX_UINT32 uIDEvent = m_pEnv->FFI_SetTimer(dwElapse, TimerProc);
+ uint32_t uIDEvent = m_pEnv->FFI_SetTimer(dwElapse, TimerProc);
CFWL_TimerInfo *pInfo = FX_NEW CFWL_TimerInfo;
pInfo->uIDEvent = uIDEvent;
pInfo->pTimer = pTimer;
@@ -37,7 +37,7 @@ FWL_ERR CXFA_FWLAdapterTimerMgr::Stop(FWL_HTIMER hTimer)
m_pEnv->FFI_KillTimer(pInfo->uIDEvent);
- FX_INT32 index = ms_timerArray.Find(pInfo);
+ int32_t index = ms_timerArray.Find(pInfo);
if (index >= 0)
{
ms_timerArray.RemoveAt(index);
@@ -49,11 +49,11 @@ FWL_ERR CXFA_FWLAdapterTimerMgr::Stop(FWL_HTIMER hTimer)
return FWL_ERR_Indefinite;
}
-void CXFA_FWLAdapterTimerMgr::TimerProc(FX_INT32 idEvent)
+void CXFA_FWLAdapterTimerMgr::TimerProc(int32_t idEvent)
{
CFWL_TimerInfo *pInfo = NULL;
- FX_INT32 iCount = CXFA_FWLAdapterTimerMgr::ms_timerArray.GetSize();
- for (FX_INT32 i = 0; i < iCount; i++)
+ int32_t iCount = CXFA_FWLAdapterTimerMgr::ms_timerArray.GetSize();
+ for (int32_t i = 0; i < iCount; i++)
{
CFWL_TimerInfo *pTemp = (CFWL_TimerInfo*)CXFA_FWLAdapterTimerMgr::ms_timerArray.GetAt(i);
if (pTemp->uIDEvent == idEvent)
diff --git a/fpdfsdk/src/fsdk_actionhandler.cpp b/fpdfsdk/src/fsdk_actionhandler.cpp
index 6f8ea0c60f..25f39ff8c7 100644
--- a/fpdfsdk/src/fsdk_actionhandler.cpp
+++ b/fpdfsdk/src/fsdk_actionhandler.cpp
@@ -159,7 +159,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;
@@ -214,7 +214,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;
@@ -255,7 +255,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;
@@ -310,7 +310,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;
@@ -400,7 +400,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;
@@ -455,7 +455,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 9a340a1a3a..91fd3ef0b2 100644
--- a/fpdfsdk/src/fsdk_baseannot.cpp
+++ b/fpdfsdk/src/fsdk_baseannot.cpp
@@ -13,24 +13,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:
@@ -118,12 +118,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;
@@ -235,7 +235,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;
@@ -248,7 +248,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;
@@ -261,7 +261,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;
@@ -274,7 +274,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;
@@ -287,7 +287,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;
@@ -300,7 +300,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 ++];
@@ -334,7 +334,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;
}
@@ -402,9 +402,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;
@@ -490,11 +490,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;
@@ -962,14 +962,14 @@ void CPDFSDK_BAAnnot::WriteAppearance(const CFX_ByteString& sAPType, const CPDF_
ASSERT(m_pPageView != NULL);
CPDF_Document* pDoc = m_pPageView->GetPDFDocument();
ASSERT(pDoc != NULL);
-
+
pStream = FX_NEW CPDF_Stream(NULL, 0, NULL);
- FX_INT32 objnum = pDoc->AddIndirectObject(pStream);
+ int32_t objnum = pDoc->AddIndirectObject(pStream);
//pAPDict->SetAtReference(sAPType, pDoc, objnum);
ASSERT(pParentDict != NULL);
pParentDict->SetAtReference(sAPType, pDoc, objnum);
}
-
+
CPDF_Dictionary * pStreamDict = pStream->GetDict();
if (!pStreamDict)
@@ -987,7 +987,7 @@ void CPDFSDK_BAAnnot::WriteAppearance(const CFX_ByteString& sAPType, const CPDF_
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 efdcfc0c85..5f9df4852b 100644
--- a/fpdfsdk/src/fsdk_baseform.cpp
+++ b/fpdfsdk/src/fsdk_baseform.cpp
@@ -284,7 +284,7 @@ FX_BOOL CPDFSDK_Widget::OnXFAAAction(PDFSDK_XFAAActionType eXFAAAT, PDFSDK_Field
{
CXFA_WidgetAcc* pAcc = pXFAWidgetHandler->GetDataAcc(hWidget);
param.m_pTarget = pAcc;
- FX_INT32 nRet = pXFAWidgetHandler->ProcessEvent(pAcc, &param);
+ int32_t nRet = pXFAWidgetHandler->ProcessEvent(pAcc, &param);
return nRet == XFA_EVENTERROR_Sucess;
}
}
@@ -292,7 +292,7 @@ FX_BOOL CPDFSDK_Widget::OnXFAAAction(PDFSDK_XFAAActionType eXFAAAT, PDFSDK_Field
{
CXFA_WidgetAcc* pAcc = pXFAWidgetHandler->GetDataAcc(hWidget);
param.m_pTarget = pAcc;
- FX_INT32 nRet = pXFAWidgetHandler->ProcessEvent(pAcc, &param);
+ int32_t nRet = pXFAWidgetHandler->ProcessEvent(pAcc, &param);
return nRet == XFA_EVENTERROR_Sucess;
}
@@ -1093,7 +1093,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());
@@ -1125,7 +1125,7 @@ void CPDFSDK_Widget::ResetAppearance_PushButton()
CPDF_Rect rcWindow = GetRotatedRect();
- FX_INT32 nLayout = 0;
+ int32_t nLayout = 0;
switch (pControl->GetTextPosition())
{
@@ -1166,7 +1166,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;
@@ -1372,7 +1372,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;
@@ -1412,7 +1412,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)
@@ -1504,7 +1504,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;
@@ -1544,7 +1544,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)
@@ -1706,7 +1706,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());
@@ -1780,14 +1780,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)
{
@@ -1954,7 +1954,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"
@@ -1979,7 +1979,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"
@@ -2059,7 +2059,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())
@@ -2134,7 +2134,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]);
@@ -2150,7 +2150,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)
@@ -2166,7 +2166,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)
@@ -2261,7 +2261,7 @@ FX_BOOL CPDFSDK_Widget::OnAAction(CPDF_AAction::AActionType type, PDFSDK_FieldAc
CXFA_WidgetAcc* pAcc = pXFAWidgetHandler->GetDataAcc(hWidget);
param.m_pTarget = pAcc;
- FX_INT32 nRet = pXFAWidgetHandler->ProcessEvent(pAcc, &param);
+ int32_t nRet = pXFAWidgetHandler->ProcessEvent(pAcc, &param);
if (IXFA_DocView* pDocView = pDoc->GetXFADocView())
{
@@ -2329,12 +2329,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;
}
@@ -2666,7 +2666,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);
}
@@ -3113,7 +3113,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 b0b398d563..dc454ee160 100644
--- a/fpdfsdk/src/fsdk_mgr.cpp
+++ b/fpdfsdk/src/fsdk_mgr.cpp
@@ -34,8 +34,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
@@ -45,20 +45,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);}
@@ -68,14 +68,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);
@@ -136,12 +136,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);
@@ -186,7 +186,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)
{
@@ -201,11 +201,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 c4a93ede61..9ea8029f60 100644
--- a/fpdfsdk/src/javascript/Document.cpp
+++ b/fpdfsdk/src/javascript/Document.cpp
@@ -1213,7 +1213,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 6b24366371..52126bc54c 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 b242ae8031..c4166762ee 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 33c95d4232..cbc2ba46ba 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;
@@ -506,7 +506,7 @@ void CPWL_ComboBox::SetPopup(FX_BOOL bPopup)
m_pFillerNotify->OnPopupPreOpen(GetAttachedData(), bExit, 0);
if (bExit) return;
- FX_INT32 nWhere = 0;
+ int32_t nWhere = 0;
FX_FLOAT fPopupRet = 0.0f;
FX_FLOAT fPopupMin = 0.0f;
if (m_pList->GetCount() > 3)
@@ -637,7 +637,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 10549d583e..085159f5f3 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))
{