diff options
author | Tom Sepez <tsepez@chromium.org> | 2016-03-21 15:00:20 -0700 |
---|---|---|
committer | Tom Sepez <tsepez@chromium.org> | 2016-03-21 15:00:20 -0700 |
commit | 62a70f90c49cf7714c960186eb063ad55333e6f3 (patch) | |
tree | 84b5d0f70b770e6a9ec261342d46638f4d5102bd /fpdfsdk/include/pdfwindow | |
parent | 4161c5ca6c5438476bf07b6dacfafb61ea611cc5 (diff) | |
download | pdfium-62a70f90c49cf7714c960186eb063ad55333e6f3.tar.xz |
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 .
Diffstat (limited to 'fpdfsdk/include/pdfwindow')
-rw-r--r-- | fpdfsdk/include/pdfwindow/PWL_ComboBox.h | 8 | ||||
-rw-r--r-- | fpdfsdk/include/pdfwindow/PWL_Edit.h | 6 | ||||
-rw-r--r-- | fpdfsdk/include/pdfwindow/PWL_EditCtrl.h | 6 | ||||
-rw-r--r-- | fpdfsdk/include/pdfwindow/PWL_FontMap.h | 10 | ||||
-rw-r--r-- | fpdfsdk/include/pdfwindow/PWL_IconList.h | 2 | ||||
-rw-r--r-- | fpdfsdk/include/pdfwindow/PWL_ListBox.h | 4 | ||||
-rw-r--r-- | fpdfsdk/include/pdfwindow/PWL_SpecialButton.h | 4 | ||||
-rw-r--r-- | fpdfsdk/include/pdfwindow/PWL_Utils.h | 8 | ||||
-rw-r--r-- | fpdfsdk/include/pdfwindow/PWL_Wnd.h | 6 |
9 files changed, 27 insertions, 27 deletions
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); |