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/fxedit | |
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/fxedit')
-rw-r--r-- | fpdfsdk/include/fxedit/fx_edit.h | 20 | ||||
-rw-r--r-- | fpdfsdk/include/fxedit/fxet_edit.h | 32 | ||||
-rw-r--r-- | fpdfsdk/include/fxedit/fxet_list.h | 4 |
3 files changed, 28 insertions, 28 deletions
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; |