summaryrefslogtreecommitdiff
path: root/fpdfsdk/src/pdfwindow
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2015-06-09 11:30:25 -0700
committerTom Sepez <tsepez@chromium.org>2015-06-09 11:30:25 -0700
commitbb17868d736f698d5217c30d52c5bbfed62c5936 (patch)
tree9d4d3e2538a81e6241d4992570bc3f3c1af71d28 /fpdfsdk/src/pdfwindow
parentbf6c2a4873f8cc12ad910fb904218a78087a3735 (diff)
downloadpdfium-bb17868d736f698d5217c30d52c5bbfed62c5936.tar.xz
Use stdint.h types throughout PDFium.
It's redundant nowadays to provide our own equivalents, now that this is done for us by the system header. R=thestig@chromium.org Review URL: https://codereview.chromium.org/1177483002
Diffstat (limited to 'fpdfsdk/src/pdfwindow')
-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
14 files changed, 265 insertions, 265 deletions
diff --git a/fpdfsdk/src/pdfwindow/PWL_ComboBox.cpp b/fpdfsdk/src/pdfwindow/PWL_ComboBox.cpp
index 6627189bd7..51c4c185f9 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;
@@ -502,7 +502,7 @@ void CPWL_ComboBox::SetPopup(FX_BOOL bPopup)
{
if (m_pFillerNotify)
{
- FX_INT32 nWhere = 0;
+ int32_t nWhere = 0;
FX_FLOAT fPopupRet = 0.0f;
FX_FLOAT fPopupMin = 0.0f;
if (m_pList->GetCount() > 3)
@@ -601,7 +601,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 578511359c..62811eaac1 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))
{