From 62a70f90c49cf7714c960186eb063ad55333e6f3 Mon Sep 17 00:00:00 2001 From: Tom Sepez Date: Mon, 21 Mar 2016 15:00:20 -0700 Subject: Remove FX_WORD in favor of uint16_t. It isn't buying us anthing, and it looks strange in a struct when other uint types are already present. R=dsinclair@chromium.org Review URL: https://codereview.chromium.org/1821043003 . --- fpdfsdk/include/fsdk_mgr.h | 6 ++--- fpdfsdk/include/fx_systemhandler.h | 16 +++++++------- fpdfsdk/include/fxedit/fx_edit.h | 20 ++++++++--------- fpdfsdk/include/fxedit/fxet_edit.h | 32 +++++++++++++-------------- fpdfsdk/include/fxedit/fxet_list.h | 4 ++-- fpdfsdk/include/pdfwindow/PWL_ComboBox.h | 8 +++---- fpdfsdk/include/pdfwindow/PWL_Edit.h | 6 ++--- fpdfsdk/include/pdfwindow/PWL_EditCtrl.h | 6 ++--- fpdfsdk/include/pdfwindow/PWL_FontMap.h | 10 ++++----- fpdfsdk/include/pdfwindow/PWL_IconList.h | 2 +- fpdfsdk/include/pdfwindow/PWL_ListBox.h | 4 ++-- fpdfsdk/include/pdfwindow/PWL_SpecialButton.h | 4 ++-- fpdfsdk/include/pdfwindow/PWL_Utils.h | 8 +++---- fpdfsdk/include/pdfwindow/PWL_Wnd.h | 6 ++--- 14 files changed, 66 insertions(+), 66 deletions(-) (limited to 'fpdfsdk/include') diff --git a/fpdfsdk/include/fsdk_mgr.h b/fpdfsdk/include/fsdk_mgr.h index b80e797f18..17340753ea 100644 --- a/fpdfsdk/include/fsdk_mgr.h +++ b/fpdfsdk/include/fsdk_mgr.h @@ -513,14 +513,14 @@ class CPDFSDK_Document { FX_BOOL SetFocusAnnot(CPDFSDK_Annot* pAnnot, FX_UINT nFlag = 0); FX_BOOL KillFocusAnnot(FX_UINT nFlag = 0); - FX_BOOL ExtractPages(const std::vector& arrExtraPages, + FX_BOOL ExtractPages(const std::vector& arrExtraPages, CPDF_Document* pDstDoc); FX_BOOL InsertPages(int nInsertAt, const CPDF_Document* pSrcDoc, - const std::vector& arrSrcPages); + const std::vector& arrSrcPages); FX_BOOL ReplacePages(int nPage, const CPDF_Document* pSrcDoc, - const std::vector& arrSrcPages); + const std::vector& arrSrcPages); void OnCloseDocument(); diff --git a/fpdfsdk/include/fx_systemhandler.h b/fpdfsdk/include/fx_systemhandler.h index 4a1d61472e..ab0bc46017 100644 --- a/fpdfsdk/include/fx_systemhandler.h +++ b/fpdfsdk/include/fx_systemhandler.h @@ -27,14 +27,14 @@ struct FX_SYSTEMTIME { wMinute(0), wSecond(0), wMilliseconds(0) {} - FX_WORD wYear; - FX_WORD wMonth; - FX_WORD wDayOfWeek; - FX_WORD wDay; - FX_WORD wHour; - FX_WORD wMinute; - FX_WORD wSecond; - FX_WORD wMilliseconds; + uint16_t wYear; + uint16_t wMonth; + uint16_t wDayOfWeek; + uint16_t wDay; + uint16_t wHour; + uint16_t wMinute; + uint16_t wSecond; + uint16_t wMilliseconds; }; // cursor style diff --git a/fpdfsdk/include/fxedit/fx_edit.h b/fpdfsdk/include/fxedit/fx_edit.h index a70d0e7c4c..d2222a04af 100644 --- a/fpdfsdk/include/fxedit/fx_edit.h +++ b/fpdfsdk/include/fxedit/fx_edit.h @@ -59,13 +59,13 @@ class IFX_Edit_FontMap { // get the alias of a pdf font. virtual CFX_ByteString GetPDFFontAlias(int32_t nFontIndex) = 0; // get the index of a font that can show a word. - virtual int32_t GetWordFontIndex(FX_WORD word, + virtual int32_t GetWordFontIndex(uint16_t word, int32_t charset, int32_t nFontIndex) = 0; // get the charcode of word from unicode - virtual int32_t CharCodeFromUnicode(int32_t nFontIndex, FX_WORD word) = 0; + virtual int32_t CharCodeFromUnicode(int32_t nFontIndex, uint16_t word) = 0; // get the charset of unicode - virtual int32_t CharSetFromUnicode(FX_WORD word, int32_t nOldCharset) = 0; + virtual int32_t CharSetFromUnicode(uint16_t word, int32_t nOldCharset) = 0; }; class IFX_Edit_Notify { @@ -215,7 +215,7 @@ class IFX_Edit { // 2:bottom). 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 = '*', + virtual void SetPasswordChar(uint16_t wSubWord = '*', FX_BOOL bPaint = TRUE) = 0; // set the maximal count of words of the text. virtual void SetLimitChar(int32_t nLimitChar = 0, FX_BOOL bPaint = TRUE) = 0; @@ -336,7 +336,7 @@ class IFX_Edit { const CPVT_SecProps* pSecProps = NULL, const CPVT_WordProps* pWordProps = NULL) = 0; // insert a word into the edit. - virtual FX_BOOL InsertWord(FX_WORD word, + virtual FX_BOOL InsertWord(uint16_t word, int32_t charset = DEFAULT_CHARSET, const CPVT_WordProps* pWordProps = NULL) = 0; // insert a return into the edit. @@ -404,7 +404,7 @@ class IFX_Edit { // get the font size of non_rich text or default font size of richtext. virtual FX_FLOAT GetFontSize() const = 0; // get the mask character. - virtual FX_WORD GetPasswordChar() const = 0; + virtual uint16_t GetPasswordChar() const = 0; // get the count of charArray virtual int32_t GetCharArray() const = 0; // get the horizontal scale of all characters @@ -429,7 +429,7 @@ class IFX_Edit { const CFX_FloatPoint& ptOffset, const CPVT_WordRange* pRange = NULL, FX_BOOL bContinuous = TRUE, - FX_WORD SubWord = 0); + uint16_t SubWord = 0); static CFX_ByteString GetSelectAppearanceStream( IFX_Edit* pEdit, const CFX_FloatPoint& ptOffset, @@ -562,7 +562,7 @@ class IFX_List { 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(int32_t nItemIndex, FX_BOOL bShift, FX_BOOL bCtrl) = 0; - virtual FX_BOOL OnChar(FX_WORD nChar, FX_BOOL bShift, FX_BOOL bCtrl) = 0; + virtual FX_BOOL OnChar(uint16_t nChar, FX_BOOL bShift, FX_BOOL bCtrl) = 0; protected: virtual ~IFX_List() {} @@ -570,7 +570,7 @@ class IFX_List { CFX_ByteString GetPDFWordString(IFX_Edit_FontMap* pFontMap, int32_t nFontIndex, - FX_WORD Word, - FX_WORD SubWord); + uint16_t Word, + uint16_t SubWord); #endif // FPDFSDK_INCLUDE_FXEDIT_FX_EDIT_H_ diff --git a/fpdfsdk/include/fxedit/fxet_edit.h b/fpdfsdk/include/fxedit/fxet_edit.h index 9809ac9f7d..d3e354d0e8 100644 --- a/fpdfsdk/include/fxedit/fxet_edit.h +++ b/fpdfsdk/include/fxedit/fxet_edit.h @@ -287,7 +287,7 @@ class CFXEU_InsertWord : public CFX_Edit_UndoItem { CFXEU_InsertWord(CFX_Edit* pEdit, const CPVT_WordPlace& wpOldPlace, const CPVT_WordPlace& wpNewPlace, - FX_WORD word, + uint16_t word, int32_t charset, const CPVT_WordProps* pWordProps); ~CFXEU_InsertWord() override; @@ -301,7 +301,7 @@ class CFXEU_InsertWord : public CFX_Edit_UndoItem { CPVT_WordPlace m_wpOld; CPVT_WordPlace m_wpNew; - FX_WORD m_Word; + uint16_t m_Word; int32_t m_nCharset; CPVT_WordProps m_WordProps; }; @@ -333,7 +333,7 @@ class CFXEU_Backspace : public CFX_Edit_UndoItem { CFXEU_Backspace(CFX_Edit* pEdit, const CPVT_WordPlace& wpOldPlace, const CPVT_WordPlace& wpNewPlace, - FX_WORD word, + uint16_t word, int32_t charset, const CPVT_SecProps& SecProps, const CPVT_WordProps& WordProps); @@ -348,7 +348,7 @@ class CFXEU_Backspace : public CFX_Edit_UndoItem { CPVT_WordPlace m_wpOld; CPVT_WordPlace m_wpNew; - FX_WORD m_Word; + uint16_t m_Word; int32_t m_nCharset; CPVT_SecProps m_SecProps; CPVT_WordProps m_WordProps; @@ -359,7 +359,7 @@ class CFXEU_Delete : public CFX_Edit_UndoItem { CFXEU_Delete(CFX_Edit* pEdit, const CPVT_WordPlace& wpOldPlace, const CPVT_WordPlace& wpNewPlace, - FX_WORD word, + uint16_t word, int32_t charset, const CPVT_SecProps& SecProps, const CPVT_WordProps& WordProps, @@ -375,7 +375,7 @@ class CFXEU_Delete : public CFX_Edit_UndoItem { CPVT_WordPlace m_wpOld; CPVT_WordPlace m_wpNew; - FX_WORD m_Word; + uint16_t m_Word; int32_t m_nCharset; CPVT_SecProps m_SecProps; CPVT_WordProps m_WordProps; @@ -406,7 +406,7 @@ class CFXEU_ClearRich : public CFX_Edit_UndoItem { const CPVT_WordPlace& wpOldPlace, const CPVT_WordPlace& wpNewPlace, const CPVT_WordRange& wrSel, - FX_WORD word, + uint16_t word, int32_t charset, const CPVT_SecProps& SecProps, const CPVT_WordProps& WordProps); @@ -422,7 +422,7 @@ class CFXEU_ClearRich : public CFX_Edit_UndoItem { CPVT_WordPlace m_wpOld; CPVT_WordPlace m_wpNew; CPVT_WordRange m_wrSel; - FX_WORD m_Word; + uint16_t m_Word; int32_t m_nCharset; CPVT_SecProps m_SecProps; CPVT_WordProps m_WordProps; @@ -537,7 +537,7 @@ class CFX_Edit : public IFX_Edit { void SetScrollPos(const CFX_FloatPoint& point) override; void SetAlignmentH(int32_t nFormat = 0, FX_BOOL bPaint = TRUE) override; void SetAlignmentV(int32_t nFormat = 0, FX_BOOL bPaint = TRUE) override; - void SetPasswordChar(FX_WORD wSubWord = '*', FX_BOOL bPaint = TRUE) override; + void SetPasswordChar(uint16_t wSubWord = '*', FX_BOOL bPaint = TRUE) override; void SetLimitChar(int32_t nLimitChar = 0, FX_BOOL bPaint = TRUE) override; void SetCharArray(int32_t nCharArray = 0, FX_BOOL bPaint = TRUE) override; void SetCharSpace(FX_FLOAT fCharSpace = 0.0f, FX_BOOL bPaint = TRUE) override; @@ -581,7 +581,7 @@ class CFX_Edit : public IFX_Edit { int32_t charset = DEFAULT_CHARSET, const CPVT_SecProps* pSecProps = NULL, const CPVT_WordProps* pWordProps = NULL) override; - FX_BOOL InsertWord(FX_WORD word, + FX_BOOL InsertWord(uint16_t word, int32_t charset = DEFAULT_CHARSET, const CPVT_WordProps* pWordProps = NULL) override; FX_BOOL InsertReturn(const CPVT_SecProps* pSecProps = NULL, @@ -608,7 +608,7 @@ class CFX_Edit : public IFX_Edit { CFX_WideString GetSelText() const override; CFX_WideString GetText() const override; FX_FLOAT GetFontSize() const override; - FX_WORD GetPasswordChar() const override; + uint16_t GetPasswordChar() const override; CFX_FloatPoint GetScrollPos() const override; int32_t GetCharArray() const override; CFX_FloatRect GetPlateRect() const override; @@ -646,7 +646,7 @@ class CFX_Edit : public IFX_Edit { int32_t charset, const CPVT_SecProps* pSecProps, const CPVT_WordProps* pWordProps); - int32_t GetCharSetFromUnicode(FX_WORD word, int32_t nOldCharset); + int32_t GetCharSetFromUnicode(uint16_t word, int32_t nOldCharset); int32_t GetTotalLines() const; @@ -668,7 +668,7 @@ class CFX_Edit : public IFX_Edit { const CPVT_WordProps* pWordProps, FX_BOOL bAddUndo, FX_BOOL bPaint); - FX_BOOL InsertWord(FX_WORD word, + FX_BOOL InsertWord(uint16_t word, int32_t charset, const CPVT_WordProps* pWordProps, FX_BOOL bAddUndo, @@ -799,15 +799,15 @@ class CFX_Edit_Provider : public IPDF_VariableText_Provider { // IPDF_VariableText_Provider: int32_t GetCharWidth(int32_t nFontIndex, - FX_WORD word, + uint16_t word, int32_t nWordStyle) override; int32_t GetTypeAscent(int32_t nFontIndex) override; int32_t GetTypeDescent(int32_t nFontIndex) override; - int32_t GetWordFontIndex(FX_WORD word, + int32_t GetWordFontIndex(uint16_t word, int32_t charset, int32_t nFontIndex) override; int32_t GetDefaultFontIndex() override; - FX_BOOL IsLatinWord(FX_WORD word) override; + FX_BOOL IsLatinWord(uint16_t word) override; private: IFX_Edit_FontMap* m_pFontMap; diff --git a/fpdfsdk/include/fxedit/fxet_list.h b/fpdfsdk/include/fxedit/fxet_list.h index 05ba4f9e23..d86e6ffeee 100644 --- a/fpdfsdk/include/fxedit/fxet_list.h +++ b/fpdfsdk/include/fxedit/fxet_list.h @@ -134,7 +134,7 @@ class CFX_ListItem { FX_BOOL IsSelected() const; FX_BOOL IsCaret() const; FX_FLOAT GetItemHeight() const; - FX_WORD GetFirstChar() const; + uint16_t GetFirstChar() const; private: IFX_Edit* m_pEdit; @@ -296,7 +296,7 @@ class CFX_ListCtrl : public CFX_List { void OnVK_HOME(FX_BOOL bShift, FX_BOOL bCtrl) override; void OnVK_END(FX_BOOL bShift, FX_BOOL bCtrl) override; void OnVK(int32_t nItemIndex, FX_BOOL bShift, FX_BOOL bCtrl) override; - FX_BOOL OnChar(FX_WORD nChar, FX_BOOL bShift, FX_BOOL bCtrl) override; + FX_BOOL OnChar(uint16_t nChar, FX_BOOL bShift, FX_BOOL bCtrl) override; void SetPlateRect(const CFX_FloatRect& rect) override; void SetScrollPos(const CFX_FloatPoint& point) override; void ScrollToListItem(int32_t nItemIndex) override; diff --git a/fpdfsdk/include/pdfwindow/PWL_ComboBox.h b/fpdfsdk/include/pdfwindow/PWL_ComboBox.h index b08e954947..88b7213920 100644 --- a/fpdfsdk/include/pdfwindow/PWL_ComboBox.h +++ b/fpdfsdk/include/pdfwindow/PWL_ComboBox.h @@ -25,8 +25,8 @@ class CPWL_CBListBox : public CPWL_ListBox { // CPWL_ListBox FX_BOOL OnLButtonUp(const CFX_FloatPoint& point, FX_DWORD nFlag) override; - FX_BOOL OnKeyDownWithExit(FX_WORD nChar, FX_BOOL& bExit, FX_DWORD nFlag); - FX_BOOL OnCharWithExit(FX_WORD nChar, FX_BOOL& bExit, FX_DWORD nFlag); + FX_BOOL OnKeyDownWithExit(uint16_t nChar, FX_BOOL& bExit, FX_DWORD nFlag); + FX_BOOL OnCharWithExit(uint16_t nChar, FX_BOOL& bExit, FX_DWORD nFlag); }; #define PWL_COMBOBOX_BUTTON_WIDTH 13 @@ -54,8 +54,8 @@ class CPWL_ComboBox : public CPWL_Wnd { // CPWL_Wnd: CFX_ByteString GetClassName() const override; void OnCreate(PWL_CREATEPARAM& cp) override; - FX_BOOL OnKeyDown(FX_WORD nChar, FX_DWORD nFlag) override; - FX_BOOL OnChar(FX_WORD nChar, FX_DWORD nFlag) override; + FX_BOOL OnKeyDown(uint16_t nChar, FX_DWORD nFlag) override; + FX_BOOL OnChar(uint16_t nChar, FX_DWORD nFlag) override; void OnNotify(CPWL_Wnd* pWnd, FX_DWORD msg, intptr_t wParam = 0, diff --git a/fpdfsdk/include/pdfwindow/PWL_Edit.h b/fpdfsdk/include/pdfwindow/PWL_Edit.h index e93afaaa00..0d764c0f89 100644 --- a/fpdfsdk/include/pdfwindow/PWL_Edit.h +++ b/fpdfsdk/include/pdfwindow/PWL_Edit.h @@ -62,8 +62,8 @@ class CPWL_Edit : public CPWL_EditCtrl, public IFX_Edit_OprNotify { FX_BOOL OnMouseWheel(short zDelta, const CFX_FloatPoint& point, FX_DWORD nFlag) override; - FX_BOOL OnKeyDown(FX_WORD nChar, FX_DWORD nFlag) override; - FX_BOOL OnChar(FX_WORD nChar, FX_DWORD nFlag) override; + FX_BOOL OnKeyDown(uint16_t nChar, FX_DWORD nFlag) override; + FX_BOOL OnChar(uint16_t nChar, FX_DWORD nFlag) override; CFX_FloatRect GetFocusRect() const override; void OnSetFocus() override; void OnKillFocus() override; @@ -154,7 +154,7 @@ class CPWL_Edit : public CPWL_EditCtrl, public IFX_Edit_OprNotify { FX_BOOL bArabic) const; public: - FX_BOOL IsProceedtoOnChar(FX_WORD nKeyCode, FX_DWORD nFlag); + FX_BOOL IsProceedtoOnChar(uint16_t nKeyCode, FX_DWORD nFlag); private: IPWL_Filler_Notify* m_pFillerNotify; diff --git a/fpdfsdk/include/pdfwindow/PWL_EditCtrl.h b/fpdfsdk/include/pdfwindow/PWL_EditCtrl.h index f80033081e..f2e166385e 100644 --- a/fpdfsdk/include/pdfwindow/PWL_EditCtrl.h +++ b/fpdfsdk/include/pdfwindow/PWL_EditCtrl.h @@ -103,8 +103,8 @@ class CPWL_EditCtrl : public CPWL_Wnd, public IFX_Edit_Notify { // CPWL_Wnd void OnCreate(PWL_CREATEPARAM& cp) override; void OnCreated() override; - FX_BOOL OnKeyDown(FX_WORD nChar, FX_DWORD nFlag) override; - FX_BOOL OnChar(FX_WORD nChar, FX_DWORD nFlag) override; + FX_BOOL OnKeyDown(uint16_t nChar, FX_DWORD nFlag) override; + FX_BOOL OnChar(uint16_t nChar, FX_DWORD nFlag) override; FX_BOOL OnLButtonDown(const CFX_FloatPoint& point, FX_DWORD nFlag) override; FX_BOOL OnLButtonUp(const CFX_FloatPoint& point, FX_DWORD nFlag) override; FX_BOOL OnMouseMove(const CFX_FloatPoint& point, FX_DWORD nFlag) override; @@ -149,7 +149,7 @@ class CPWL_EditCtrl : public CPWL_Wnd, public IFX_Edit_Notify { void PasteText(); void CutText(); void ShowVScrollBar(FX_BOOL bShow); - void InsertWord(FX_WORD word, int32_t nCharset); + void InsertWord(uint16_t word, int32_t nCharset); void InsertReturn(); FX_BOOL IsWndHorV(); diff --git a/fpdfsdk/include/pdfwindow/PWL_FontMap.h b/fpdfsdk/include/pdfwindow/PWL_FontMap.h index c8c8722c11..a913571960 100644 --- a/fpdfsdk/include/pdfwindow/PWL_FontMap.h +++ b/fpdfsdk/include/pdfwindow/PWL_FontMap.h @@ -56,11 +56,11 @@ class CPWL_FontMap : public IFX_Edit_FontMap { // IFX_Edit_FontMap CPDF_Font* GetPDFFont(int32_t nFontIndex) override; CFX_ByteString GetPDFFontAlias(int32_t nFontIndex) override; - int32_t GetWordFontIndex(FX_WORD word, + int32_t GetWordFontIndex(uint16_t word, int32_t nCharset, int32_t nFontIndex) override; - int32_t CharCodeFromUnicode(int32_t nFontIndex, FX_WORD word) override; - int32_t CharSetFromUnicode(FX_WORD word, int32_t nOldCharset) override; + int32_t CharCodeFromUnicode(int32_t nFontIndex, uint16_t word) override; + int32_t CharSetFromUnicode(uint16_t word, int32_t nOldCharset) override; void SetSystemHandler(IFX_SystemHandler* pSystemHandler); int32_t GetFontMapCount() const; @@ -86,13 +86,13 @@ class CPWL_FontMap : public IFX_Edit_FontMap { int32_t nCharset); virtual void AddedFont(CPDF_Font* pFont, const CFX_ByteString& sFontAlias); - FX_BOOL KnowWord(int32_t nFontIndex, FX_WORD word); + FX_BOOL KnowWord(int32_t nFontIndex, uint16_t word); void Empty(); int32_t GetFontIndex(const CFX_ByteString& sFontName, int32_t nCharset, FX_BOOL bFind); - int32_t GetPWLFontIndex(FX_WORD word, int32_t nCharset); + int32_t GetPWLFontIndex(uint16_t word, int32_t nCharset); int32_t AddFontData(CPDF_Font* pFont, const CFX_ByteString& sFontAlias, int32_t nCharset = DEFAULT_CHARSET); diff --git a/fpdfsdk/include/pdfwindow/PWL_IconList.h b/fpdfsdk/include/pdfwindow/PWL_IconList.h index 71c9f4cb25..a11a73c41a 100644 --- a/fpdfsdk/include/pdfwindow/PWL_IconList.h +++ b/fpdfsdk/include/pdfwindow/PWL_IconList.h @@ -78,7 +78,7 @@ class CPWL_IconList_Content : public CPWL_ListCtrl { FX_BOOL OnLButtonDown(const CFX_FloatPoint& point, FX_DWORD nFlag) override; FX_BOOL OnLButtonUp(const CFX_FloatPoint& point, FX_DWORD nFlag) override; FX_BOOL OnMouseMove(const CFX_FloatPoint& point, FX_DWORD nFlag) override; - FX_BOOL OnKeyDown(FX_WORD nChar, FX_DWORD nFlag) override; + FX_BOOL OnKeyDown(uint16_t nChar, FX_DWORD nFlag) override; private: CPWL_IconList_Item* GetListItem(int32_t nItemIndex) const; diff --git a/fpdfsdk/include/pdfwindow/PWL_ListBox.h b/fpdfsdk/include/pdfwindow/PWL_ListBox.h index e12d727d58..d0d98b9bcc 100644 --- a/fpdfsdk/include/pdfwindow/PWL_ListBox.h +++ b/fpdfsdk/include/pdfwindow/PWL_ListBox.h @@ -59,8 +59,8 @@ class CPWL_ListBox : public CPWL_Wnd { void GetThisAppearanceStream(CFX_ByteTextBuf& sAppStream) override; void DrawThisAppearance(CFX_RenderDevice* pDevice, CFX_Matrix* pUser2Device) override; - FX_BOOL OnKeyDown(FX_WORD nChar, FX_DWORD nFlag) override; - FX_BOOL OnChar(FX_WORD nChar, FX_DWORD nFlag) override; + FX_BOOL OnKeyDown(uint16_t nChar, FX_DWORD nFlag) override; + FX_BOOL OnChar(uint16_t nChar, FX_DWORD nFlag) override; FX_BOOL OnLButtonDown(const CFX_FloatPoint& point, FX_DWORD nFlag) override; FX_BOOL OnLButtonUp(const CFX_FloatPoint& point, FX_DWORD nFlag) override; FX_BOOL OnMouseMove(const CFX_FloatPoint& point, FX_DWORD nFlag) override; diff --git a/fpdfsdk/include/pdfwindow/PWL_SpecialButton.h b/fpdfsdk/include/pdfwindow/PWL_SpecialButton.h index 8731562726..35b2c3f43e 100644 --- a/fpdfsdk/include/pdfwindow/PWL_SpecialButton.h +++ b/fpdfsdk/include/pdfwindow/PWL_SpecialButton.h @@ -27,7 +27,7 @@ class CPWL_CheckBox : public CPWL_Button { // CPWL_Button CFX_ByteString GetClassName() const override; FX_BOOL OnLButtonUp(const CFX_FloatPoint& point, FX_DWORD nFlag) override; - FX_BOOL OnChar(FX_WORD nChar, FX_DWORD nFlag) override; + FX_BOOL OnChar(uint16_t nChar, FX_DWORD nFlag) override; void SetCheck(bool bCheck); bool IsChecked() const; @@ -44,7 +44,7 @@ class CPWL_RadioButton : public CPWL_Button { // CPWL_Button CFX_ByteString GetClassName() const override; FX_BOOL OnLButtonUp(const CFX_FloatPoint& point, FX_DWORD nFlag) override; - FX_BOOL OnChar(FX_WORD nChar, FX_DWORD nFlag) override; + FX_BOOL OnChar(uint16_t nChar, FX_DWORD nFlag) override; void SetCheck(bool bCheck); bool IsChecked() const; diff --git a/fpdfsdk/include/pdfwindow/PWL_Utils.h b/fpdfsdk/include/pdfwindow/PWL_Utils.h index 7cce6c2b66..be51f18627 100644 --- a/fpdfsdk/include/pdfwindow/PWL_Utils.h +++ b/fpdfsdk/include/pdfwindow/PWL_Utils.h @@ -27,9 +27,9 @@ T PWL_MAX(const T& i, const T& j) { #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))) -#define PWL_GETLOWWORD(dword) ((FX_WORD)(dword)) -#define PWL_GETHIGHWORD(dword) ((FX_WORD)(dword >> 16)) + ((FX_DWORD)((uint16_t)(low) | (FX_DWORD)(((uint16_t)(high)) << 16))) +#define PWL_GETLOWWORD(dword) ((uint16_t)(dword)) +#define PWL_GETHIGHWORD(dword) ((uint16_t)(dword >> 16)) #define PWL_ICONTYPE_CHECKMARK 0 #define PWL_ICONTYPE_CIRCLE 1 @@ -171,7 +171,7 @@ class CPWL_Utils { const CFX_FloatPoint& ptOffset, const CPVT_WordRange* pRange = NULL, FX_BOOL bContinuous = TRUE, - FX_WORD SubWord = 0); + uint16_t SubWord = 0); static CFX_ByteString GetEditSelAppStream( IFX_Edit* pEdit, const CFX_FloatPoint& ptOffset, diff --git a/fpdfsdk/include/pdfwindow/PWL_Wnd.h b/fpdfsdk/include/pdfwindow/PWL_Wnd.h index 493cdc0874..6ad356d80d 100644 --- a/fpdfsdk/include/pdfwindow/PWL_Wnd.h +++ b/fpdfsdk/include/pdfwindow/PWL_Wnd.h @@ -298,9 +298,9 @@ class CPWL_Wnd : public CPWL_TimerHandler { void DrawAppearance(CFX_RenderDevice* pDevice, CFX_Matrix* pUser2Device); - virtual FX_BOOL OnKeyDown(FX_WORD nChar, FX_DWORD nFlag); - virtual FX_BOOL OnKeyUp(FX_WORD nChar, FX_DWORD nFlag); - virtual FX_BOOL OnChar(FX_WORD nChar, FX_DWORD nFlag); + virtual FX_BOOL OnKeyDown(uint16_t nChar, FX_DWORD nFlag); + virtual FX_BOOL OnKeyUp(uint16_t nChar, FX_DWORD nFlag); + virtual FX_BOOL OnChar(uint16_t nChar, FX_DWORD nFlag); virtual FX_BOOL OnLButtonDblClk(const CFX_FloatPoint& point, FX_DWORD nFlag); virtual FX_BOOL OnLButtonDown(const CFX_FloatPoint& point, FX_DWORD nFlag); virtual FX_BOOL OnLButtonUp(const CFX_FloatPoint& point, FX_DWORD nFlag); -- cgit v1.2.3