summaryrefslogtreecommitdiff
path: root/fpdfsdk/pdfwindow
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2016-03-21 15:00:20 -0700
committerTom Sepez <tsepez@chromium.org>2016-03-21 15:00:20 -0700
commit62a70f90c49cf7714c960186eb063ad55333e6f3 (patch)
tree84b5d0f70b770e6a9ec261342d46638f4d5102bd /fpdfsdk/pdfwindow
parent4161c5ca6c5438476bf07b6dacfafb61ea611cc5 (diff)
downloadpdfium-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/pdfwindow')
-rw-r--r--fpdfsdk/pdfwindow/PWL_ComboBox.cpp8
-rw-r--r--fpdfsdk/pdfwindow/PWL_Edit.cpp6
-rw-r--r--fpdfsdk/pdfwindow/PWL_EditCtrl.cpp8
-rw-r--r--fpdfsdk/pdfwindow/PWL_FontMap.cpp10
-rw-r--r--fpdfsdk/pdfwindow/PWL_IconList.cpp2
-rw-r--r--fpdfsdk/pdfwindow/PWL_ListBox.cpp4
-rw-r--r--fpdfsdk/pdfwindow/PWL_SpecialButton.cpp4
-rw-r--r--fpdfsdk/pdfwindow/PWL_Utils.cpp2
-rw-r--r--fpdfsdk/pdfwindow/PWL_Wnd.cpp2
9 files changed, 23 insertions, 23 deletions
diff --git a/fpdfsdk/pdfwindow/PWL_ComboBox.cpp b/fpdfsdk/pdfwindow/PWL_ComboBox.cpp
index 1d98a51d26..cf9ce0a5fb 100644
--- a/fpdfsdk/pdfwindow/PWL_ComboBox.cpp
+++ b/fpdfsdk/pdfwindow/PWL_ComboBox.cpp
@@ -45,7 +45,7 @@ FX_BOOL CPWL_CBListBox::OnLButtonUp(const CFX_FloatPoint& point,
return TRUE;
}
-FX_BOOL CPWL_CBListBox::OnKeyDownWithExit(FX_WORD nChar,
+FX_BOOL CPWL_CBListBox::OnKeyDownWithExit(uint16_t nChar,
FX_BOOL& bExit,
FX_DWORD nFlag) {
if (!m_pList)
@@ -91,7 +91,7 @@ FX_BOOL CPWL_CBListBox::OnKeyDownWithExit(FX_WORD nChar,
return TRUE;
}
-FX_BOOL CPWL_CBListBox::OnCharWithExit(FX_WORD nChar,
+FX_BOOL CPWL_CBListBox::OnCharWithExit(uint16_t nChar,
FX_BOOL& bExit,
FX_DWORD nFlag) {
if (!m_pList)
@@ -517,7 +517,7 @@ void CPWL_ComboBox::SetPopup(FX_BOOL bPopup) {
}
}
-FX_BOOL CPWL_ComboBox::OnKeyDown(FX_WORD nChar, FX_DWORD nFlag) {
+FX_BOOL CPWL_ComboBox::OnKeyDown(uint16_t nChar, FX_DWORD nFlag) {
if (!m_pList)
return FALSE;
if (!m_pEdit)
@@ -576,7 +576,7 @@ FX_BOOL CPWL_ComboBox::OnKeyDown(FX_WORD nChar, FX_DWORD nFlag) {
return FALSE;
}
-FX_BOOL CPWL_ComboBox::OnChar(FX_WORD nChar, FX_DWORD nFlag) {
+FX_BOOL CPWL_ComboBox::OnChar(uint16_t nChar, FX_DWORD nFlag) {
if (!m_pList)
return FALSE;
diff --git a/fpdfsdk/pdfwindow/PWL_Edit.cpp b/fpdfsdk/pdfwindow/PWL_Edit.cpp
index 808b2b56bf..62873e5bc0 100644
--- a/fpdfsdk/pdfwindow/PWL_Edit.cpp
+++ b/fpdfsdk/pdfwindow/PWL_Edit.cpp
@@ -862,7 +862,7 @@ void CPWL_Edit::EnableSpellCheck(FX_BOOL bEnabled) {
RemoveFlag(PES_SPELLCHECK);
}
-FX_BOOL CPWL_Edit::OnKeyDown(FX_WORD nChar, FX_DWORD nFlag) {
+FX_BOOL CPWL_Edit::OnKeyDown(uint16_t nChar, FX_DWORD nFlag) {
if (m_bMouseDown)
return TRUE;
@@ -903,7 +903,7 @@ FX_BOOL CPWL_Edit::OnKeyDown(FX_WORD nChar, FX_DWORD nFlag) {
*If the event is swallowed, implementation may do other unexpected things, which
*is not the control means to do.
*/
-FX_BOOL CPWL_Edit::IsProceedtoOnChar(FX_WORD nKeyCode, FX_DWORD nFlag) {
+FX_BOOL CPWL_Edit::IsProceedtoOnChar(uint16_t nKeyCode, FX_DWORD nFlag) {
FX_BOOL bCtrl = IsCTRLpressed(nFlag);
FX_BOOL bAlt = IsALTpressed(nFlag);
if (bCtrl && !bAlt) {
@@ -931,7 +931,7 @@ FX_BOOL CPWL_Edit::IsProceedtoOnChar(FX_WORD nKeyCode, FX_DWORD nFlag) {
}
}
-FX_BOOL CPWL_Edit::OnChar(FX_WORD nChar, FX_DWORD nFlag) {
+FX_BOOL CPWL_Edit::OnChar(uint16_t nChar, FX_DWORD nFlag) {
if (m_bMouseDown)
return TRUE;
diff --git a/fpdfsdk/pdfwindow/PWL_EditCtrl.cpp b/fpdfsdk/pdfwindow/PWL_EditCtrl.cpp
index 10b5d6c04f..3109052a20 100644
--- a/fpdfsdk/pdfwindow/PWL_EditCtrl.cpp
+++ b/fpdfsdk/pdfwindow/PWL_EditCtrl.cpp
@@ -142,7 +142,7 @@ FX_FLOAT CPWL_EditCtrl::GetFontSize() const {
return m_pEdit->GetFontSize();
}
-FX_BOOL CPWL_EditCtrl::OnKeyDown(FX_WORD nChar, FX_DWORD nFlag) {
+FX_BOOL CPWL_EditCtrl::OnKeyDown(uint16_t nChar, FX_DWORD nFlag) {
if (m_bMouseDown)
return TRUE;
@@ -217,7 +217,7 @@ FX_BOOL CPWL_EditCtrl::OnKeyDown(FX_WORD nChar, FX_DWORD nFlag) {
return bRet;
}
-FX_BOOL CPWL_EditCtrl::OnChar(FX_WORD nChar, FX_DWORD nFlag) {
+FX_BOOL CPWL_EditCtrl::OnChar(uint16_t nChar, FX_DWORD nFlag) {
if (m_bMouseDown)
return TRUE;
@@ -236,7 +236,7 @@ FX_BOOL CPWL_EditCtrl::OnChar(FX_WORD nChar, FX_DWORD nFlag) {
FX_BOOL bAlt = IsALTpressed(nFlag);
FX_BOOL bShift = IsSHIFTpressed(nFlag);
- FX_WORD word = nChar;
+ uint16_t word = nChar;
if (bCtrl && !bAlt) {
switch (nChar) {
@@ -508,7 +508,7 @@ void CPWL_EditCtrl::InsertText(const FX_WCHAR* csText) {
m_pEdit->InsertText(csText);
}
-void CPWL_EditCtrl::InsertWord(FX_WORD word, int32_t nCharset) {
+void CPWL_EditCtrl::InsertWord(uint16_t word, int32_t nCharset) {
if (!IsReadOnly())
m_pEdit->InsertWord(word, nCharset);
}
diff --git a/fpdfsdk/pdfwindow/PWL_FontMap.cpp b/fpdfsdk/pdfwindow/PWL_FontMap.cpp
index ff9e2a3e39..1ac55bcb6e 100644
--- a/fpdfsdk/pdfwindow/PWL_FontMap.cpp
+++ b/fpdfsdk/pdfwindow/PWL_FontMap.cpp
@@ -79,7 +79,7 @@ CFX_ByteString CPWL_FontMap::GetPDFFontAlias(int32_t nFontIndex) {
return "";
}
-FX_BOOL CPWL_FontMap::KnowWord(int32_t nFontIndex, FX_WORD word) {
+FX_BOOL CPWL_FontMap::KnowWord(int32_t nFontIndex, uint16_t word) {
if (nFontIndex >= 0 && nFontIndex < m_aData.GetSize()) {
if (m_aData.GetAt(nFontIndex)) {
return CharCodeFromUnicode(nFontIndex, word) >= 0;
@@ -89,7 +89,7 @@ FX_BOOL CPWL_FontMap::KnowWord(int32_t nFontIndex, FX_WORD word) {
return FALSE;
}
-int32_t CPWL_FontMap::GetWordFontIndex(FX_WORD word,
+int32_t CPWL_FontMap::GetWordFontIndex(uint16_t word,
int32_t nCharset,
int32_t nFontIndex) {
if (nFontIndex > 0) {
@@ -119,7 +119,7 @@ int32_t CPWL_FontMap::GetWordFontIndex(FX_WORD word,
return -1;
}
-int32_t CPWL_FontMap::CharCodeFromUnicode(int32_t nFontIndex, FX_WORD word) {
+int32_t CPWL_FontMap::CharCodeFromUnicode(int32_t nFontIndex, uint16_t word) {
if (CPWL_FontMap_Data* pData = m_aData.GetAt(nFontIndex)) {
if (pData->pFont) {
if (pData->pFont->IsUnicodeCompatible()) {
@@ -219,7 +219,7 @@ int32_t CPWL_FontMap::GetFontIndex(const CFX_ByteString& sFontName,
return AddFontData(pFont, sAlias, nCharset);
}
-int32_t CPWL_FontMap::GetPWLFontIndex(FX_WORD word, int32_t nCharset) {
+int32_t CPWL_FontMap::GetPWLFontIndex(uint16_t word, int32_t nCharset) {
int32_t nFind = -1;
for (int32_t i = 0, sz = m_aData.GetSize(); i < sz; i++) {
@@ -434,7 +434,7 @@ CFX_ByteString CPWL_FontMap::GetDefaultFontByCharset(int32_t nCharset) {
return "";
}
-int32_t CPWL_FontMap::CharSetFromUnicode(FX_WORD word, int32_t nOldCharset) {
+int32_t CPWL_FontMap::CharSetFromUnicode(uint16_t word, int32_t nOldCharset) {
if (m_pSystemHandler && (-1 != m_pSystemHandler->GetCharSet()))
return m_pSystemHandler->GetCharSet();
// to avoid CJK Font to show ASCII
diff --git a/fpdfsdk/pdfwindow/PWL_IconList.cpp b/fpdfsdk/pdfwindow/PWL_IconList.cpp
index 7dc8ba9f44..d2418c8ecc 100644
--- a/fpdfsdk/pdfwindow/PWL_IconList.cpp
+++ b/fpdfsdk/pdfwindow/PWL_IconList.cpp
@@ -197,7 +197,7 @@ FX_BOOL CPWL_IconList_Content::OnMouseMove(const CFX_FloatPoint& point,
return TRUE;
}
-FX_BOOL CPWL_IconList_Content::OnKeyDown(FX_WORD nChar, FX_DWORD nFlag) {
+FX_BOOL CPWL_IconList_Content::OnKeyDown(uint16_t nChar, FX_DWORD nFlag) {
switch (nChar) {
case FWL_VKEY_Up:
if (m_nSelectIndex > 0) {
diff --git a/fpdfsdk/pdfwindow/PWL_ListBox.cpp b/fpdfsdk/pdfwindow/PWL_ListBox.cpp
index 2c0b79d2f1..a673455242 100644
--- a/fpdfsdk/pdfwindow/PWL_ListBox.cpp
+++ b/fpdfsdk/pdfwindow/PWL_ListBox.cpp
@@ -203,7 +203,7 @@ void CPWL_ListBox::DrawThisAppearance(CFX_RenderDevice* pDevice,
}
}
-FX_BOOL CPWL_ListBox::OnKeyDown(FX_WORD nChar, FX_DWORD nFlag) {
+FX_BOOL CPWL_ListBox::OnKeyDown(uint16_t nChar, FX_DWORD nFlag) {
CPWL_Wnd::OnKeyDown(nChar, nFlag);
if (!m_pList)
@@ -250,7 +250,7 @@ FX_BOOL CPWL_ListBox::OnKeyDown(FX_WORD nChar, FX_DWORD nFlag) {
return TRUE;
}
-FX_BOOL CPWL_ListBox::OnChar(FX_WORD nChar, FX_DWORD nFlag) {
+FX_BOOL CPWL_ListBox::OnChar(uint16_t nChar, FX_DWORD nFlag) {
CPWL_Wnd::OnChar(nChar, nFlag);
if (!m_pList)
diff --git a/fpdfsdk/pdfwindow/PWL_SpecialButton.cpp b/fpdfsdk/pdfwindow/PWL_SpecialButton.cpp
index c19a233940..78ded5ebb1 100644
--- a/fpdfsdk/pdfwindow/PWL_SpecialButton.cpp
+++ b/fpdfsdk/pdfwindow/PWL_SpecialButton.cpp
@@ -46,7 +46,7 @@ FX_BOOL CPWL_CheckBox::OnLButtonUp(const CFX_FloatPoint& point,
return TRUE;
}
-FX_BOOL CPWL_CheckBox::OnChar(FX_WORD nChar, FX_DWORD nFlag) {
+FX_BOOL CPWL_CheckBox::OnChar(uint16_t nChar, FX_DWORD nFlag) {
SetCheck(!IsChecked());
return TRUE;
}
@@ -76,7 +76,7 @@ bool CPWL_RadioButton::IsChecked() const {
return m_bChecked;
}
-FX_BOOL CPWL_RadioButton::OnChar(FX_WORD nChar, FX_DWORD nFlag) {
+FX_BOOL CPWL_RadioButton::OnChar(uint16_t nChar, FX_DWORD nFlag) {
SetCheck(TRUE);
return TRUE;
}
diff --git a/fpdfsdk/pdfwindow/PWL_Utils.cpp b/fpdfsdk/pdfwindow/PWL_Utils.cpp
index 23bddcdf1e..9ad12abfe6 100644
--- a/fpdfsdk/pdfwindow/PWL_Utils.cpp
+++ b/fpdfsdk/pdfwindow/PWL_Utils.cpp
@@ -417,7 +417,7 @@ CFX_ByteString CPWL_Utils::GetEditAppStream(IFX_Edit* pEdit,
const CFX_FloatPoint& ptOffset,
const CPVT_WordRange* pRange,
FX_BOOL bContinuous,
- FX_WORD SubWord) {
+ uint16_t SubWord) {
return IFX_Edit::GetEditAppearanceStream(pEdit, ptOffset, pRange, bContinuous,
SubWord);
}
diff --git a/fpdfsdk/pdfwindow/PWL_Wnd.cpp b/fpdfsdk/pdfwindow/PWL_Wnd.cpp
index 597db35ec7..cb5311f59b 100644
--- a/fpdfsdk/pdfwindow/PWL_Wnd.cpp
+++ b/fpdfsdk/pdfwindow/PWL_Wnd.cpp
@@ -407,7 +407,7 @@ void CPWL_Wnd::InvalidateRect(CFX_FloatRect* pRect) {
}
#define PWL_IMPLEMENT_KEY_METHOD(key_method_name) \
- FX_BOOL CPWL_Wnd::key_method_name(FX_WORD nChar, FX_DWORD nFlag) { \
+ FX_BOOL CPWL_Wnd::key_method_name(uint16_t nChar, FX_DWORD nFlag) { \
if (IsValid() && IsVisible() && IsEnabled()) { \
if (IsWndCaptureKeyboard(this)) { \
for (int32_t i = 0, sz = m_aChildren.GetSize(); i < sz; i++) { \