summaryrefslogtreecommitdiff
path: root/fpdfsdk/src/fxedit
diff options
context:
space:
mode:
Diffstat (limited to 'fpdfsdk/src/fxedit')
-rw-r--r--fpdfsdk/src/fxedit/fxet_ap.cpp8
-rw-r--r--fpdfsdk/src/fxedit/fxet_edit.cpp108
-rw-r--r--fpdfsdk/src/fxedit/fxet_list.cpp122
-rw-r--r--fpdfsdk/src/fxedit/fxet_pageobjs.cpp36
4 files changed, 137 insertions, 137 deletions
diff --git a/fpdfsdk/src/fxedit/fxet_ap.cpp b/fpdfsdk/src/fxedit/fxet_ap.cpp
index 92e5bfc1dd..10a76a7157 100644
--- a/fpdfsdk/src/fxedit/fxet_ap.cpp
+++ b/fpdfsdk/src/fxedit/fxet_ap.cpp
@@ -8,7 +8,7 @@
#include "../../include/fxedit/fx_edit.h"
#include "../../include/fxedit/fxet_edit.h"
-CFX_ByteString GetPDFWordString(IFX_Edit_FontMap * pFontMap, FX_INT32 nFontIndex, FX_WORD Word, FX_WORD SubWord)
+CFX_ByteString GetPDFWordString(IFX_Edit_FontMap * pFontMap, int32_t nFontIndex, FX_WORD Word, FX_WORD SubWord)
{
ASSERT (pFontMap != NULL);
@@ -50,7 +50,7 @@ static CFX_ByteString GetWordRenderString(const CFX_ByteString & strWords)
return "";
}
-static CFX_ByteString GetFontSetString(IFX_Edit_FontMap * pFontMap, FX_INT32 nFontIndex, FX_FLOAT fFontSize)
+static CFX_ByteString GetFontSetString(IFX_Edit_FontMap * pFontMap, int32_t nFontIndex, FX_FLOAT fFontSize)
{
CFX_ByteTextBuf sRet;
@@ -71,7 +71,7 @@ CFX_ByteString IFX_Edit::GetEditAppearanceStream(IFX_Edit* pEdit, const CPDF_Poi
CFX_ByteTextBuf sEditStream, sWords;
CPDF_Point ptOld(0.0f,0.0f),ptNew(0.0f,0.0f);
- FX_INT32 nCurFontIndex = -1;
+ int32_t nCurFontIndex = -1;
if (IFX_Edit_Iterator* pIterator = pEdit->GetIterator())
{
@@ -171,7 +171,7 @@ CFX_ByteString IFX_Edit::GetEditAppearanceStream(IFX_Edit* pEdit, const CPDF_Poi
CFX_ByteTextBuf sAppStream;
if (sEditStream.GetSize() > 0)
{
- FX_INT32 nHorzScale = pEdit->GetHorzScale();
+ int32_t nHorzScale = pEdit->GetHorzScale();
if (nHorzScale != 100)
{
sAppStream << nHorzScale << " Tz\n";
diff --git a/fpdfsdk/src/fxedit/fxet_edit.cpp b/fpdfsdk/src/fxedit/fxet_edit.cpp
index 0015c0f4ed..9415cefbe3 100644
--- a/fpdfsdk/src/fxedit/fxet_edit.cpp
+++ b/fpdfsdk/src/fxedit/fxet_edit.cpp
@@ -105,7 +105,7 @@ FX_BOOL CFX_Edit_Iterator::GetSection(CPVT_Section & section) const
return FALSE;
}
-void CFX_Edit_Iterator::SetAt(FX_INT32 nWordIndex)
+void CFX_Edit_Iterator::SetAt(int32_t nWordIndex)
{
ASSERT(m_pVTIterator != NULL);
@@ -147,7 +147,7 @@ IFX_Edit_FontMap* CFX_Edit_Provider::GetFontMap()
return m_pFontMap;
}
-FX_INT32 CFX_Edit_Provider::GetCharWidth(FX_INT32 nFontIndex, FX_WORD word, FX_INT32 nWordStyle)
+int32_t CFX_Edit_Provider::GetCharWidth(int32_t nFontIndex, FX_WORD word, int32_t nWordStyle)
{
if (CPDF_Font* pPDFFont = m_pFontMap->GetPDFFont(nFontIndex))
{
@@ -165,7 +165,7 @@ FX_INT32 CFX_Edit_Provider::GetCharWidth(FX_INT32 nFontIndex, FX_WORD word, FX_I
return 0;
}
-FX_INT32 CFX_Edit_Provider::GetTypeAscent(FX_INT32 nFontIndex)
+int32_t CFX_Edit_Provider::GetTypeAscent(int32_t nFontIndex)
{
if (CPDF_Font* pPDFFont = m_pFontMap->GetPDFFont(nFontIndex))
return pPDFFont->GetTypeAscent();
@@ -173,7 +173,7 @@ FX_INT32 CFX_Edit_Provider::GetTypeAscent(FX_INT32 nFontIndex)
return 0;
}
-FX_INT32 CFX_Edit_Provider::GetTypeDescent(FX_INT32 nFontIndex)
+int32_t CFX_Edit_Provider::GetTypeDescent(int32_t nFontIndex)
{
if (CPDF_Font* pPDFFont = m_pFontMap->GetPDFFont(nFontIndex))
return pPDFFont->GetTypeDescent();
@@ -181,12 +181,12 @@ FX_INT32 CFX_Edit_Provider::GetTypeDescent(FX_INT32 nFontIndex)
return 0;
}
-FX_INT32 CFX_Edit_Provider::GetWordFontIndex(FX_WORD word, FX_INT32 charset, FX_INT32 nFontIndex)
+int32_t CFX_Edit_Provider::GetWordFontIndex(FX_WORD word, int32_t charset, int32_t nFontIndex)
{
return m_pFontMap->GetWordFontIndex(word,charset,nFontIndex);
}
-FX_INT32 CFX_Edit_Provider::GetDefaultFontIndex()
+int32_t CFX_Edit_Provider::GetDefaultFontIndex()
{
return 0;
}
@@ -220,26 +220,26 @@ void CFX_Edit_Refresh::Push(const CPVT_WordRange & linerange,const CPDF_Rect & r
void CFX_Edit_Refresh::NoAnalyse()
{
{
- for (FX_INT32 i = 0, sz = m_OldLineRects.GetSize(); i < sz; i++)
+ for (int32_t i = 0, sz = m_OldLineRects.GetSize(); i < sz; i++)
if (CFX_Edit_LineRect * pOldRect = m_OldLineRects.GetAt(i))
m_RefreshRects.Add(pOldRect->m_rcLine);
}
{
- for (FX_INT32 i = 0, sz = m_NewLineRects.GetSize(); i < sz; i++)
+ for (int32_t i = 0, sz = m_NewLineRects.GetSize(); i < sz; i++)
if (CFX_Edit_LineRect * pNewRect = m_NewLineRects.GetAt(i))
m_RefreshRects.Add(pNewRect->m_rcLine);
}
}
-void CFX_Edit_Refresh::Analyse(FX_INT32 nAlignment)
+void CFX_Edit_Refresh::Analyse(int32_t nAlignment)
{
FX_BOOL bLineTopChanged = FALSE;
CPDF_Rect rcResult;
FX_FLOAT fWidthDiff;
- FX_INT32 szMax = FX_EDIT_MAX(m_OldLineRects.GetSize(),m_NewLineRects.GetSize());
- FX_INT32 i = 0;
+ int32_t szMax = FX_EDIT_MAX(m_OldLineRects.GetSize(),m_NewLineRects.GetSize());
+ int32_t i = 0;
while (i < szMax)
{
@@ -346,7 +346,7 @@ void CFX_Edit_Refresh::EndRefresh()
/* ------------------------------------- CFX_Edit_Undo ------------------------------------- */
-CFX_Edit_Undo::CFX_Edit_Undo(FX_INT32 nBufsize) : m_nCurUndoPos(0),
+CFX_Edit_Undo::CFX_Edit_Undo(int32_t nBufsize) : m_nCurUndoPos(0),
m_nBufSize(nBufsize),
m_bModified(FALSE),
m_bVirgin(TRUE),
@@ -391,7 +391,7 @@ void CFX_Edit_Undo::Redo()
{
m_bWorking = TRUE;
- FX_INT32 nStackSize = m_UndoItemStack.GetSize();
+ int32_t nStackSize = m_UndoItemStack.GetSize();
if (m_nCurUndoPos < nStackSize)
{
@@ -441,7 +441,7 @@ FX_BOOL CFX_Edit_Undo::IsModified() const
return TRUE;
}
-IFX_Edit_UndoItem* CFX_Edit_Undo::GetItem(FX_INT32 nIndex)
+IFX_Edit_UndoItem* CFX_Edit_Undo::GetItem(int32_t nIndex)
{
if (nIndex>=0 && nIndex < m_UndoItemStack.GetSize())
return m_UndoItemStack.GetAt(nIndex);
@@ -459,7 +459,7 @@ void CFX_Edit_Undo::RemoveHeads()
void CFX_Edit_Undo::RemoveTails()
{
- for (FX_INT32 i = m_UndoItemStack.GetSize()-1; i >= m_nCurUndoPos; i--)
+ for (int32_t i = m_UndoItemStack.GetSize()-1; i >= m_nCurUndoPos; i--)
{
delete m_UndoItemStack.GetAt(i);
m_UndoItemStack.RemoveAt(i);
@@ -468,7 +468,7 @@ void CFX_Edit_Undo::RemoveTails()
void CFX_Edit_Undo::Reset()
{
- for (FX_INT32 i=0, sz=m_UndoItemStack.GetSize(); i < sz; i++)
+ for (int32_t i=0, sz=m_UndoItemStack.GetSize(); i < sz; i++)
{
delete m_UndoItemStack.GetAt(i);
}
@@ -549,7 +549,7 @@ CFX_WideString CFX_Edit_GroupUndoItem::GetUndoTitle()
/* ------------------------------------- CFX_Edit_UndoItem derived classes ------------------------------------- */
CFXEU_InsertWord::CFXEU_InsertWord(CFX_Edit * pEdit, const CPVT_WordPlace & wpOldPlace, const CPVT_WordPlace & wpNewPlace,
- FX_WORD word, FX_INT32 charset, const CPVT_WordProps * pWordProps)
+ FX_WORD word, int32_t charset, const CPVT_WordProps * pWordProps)
: m_pEdit(pEdit), m_wpOld(wpOldPlace), m_wpNew(wpNewPlace), m_Word(word), m_nCharset(charset), m_WordProps()
{
if (pWordProps)
@@ -624,7 +624,7 @@ void CFXEU_InsertReturn::Undo()
//CFXEU_Backspace
CFXEU_Backspace::CFXEU_Backspace(CFX_Edit * pEdit, const CPVT_WordPlace & wpOldPlace, const CPVT_WordPlace & wpNewPlace,
- FX_WORD word, FX_INT32 charset,
+ FX_WORD word, int32_t charset,
const CPVT_SecProps & SecProps, const CPVT_WordProps & WordProps) :
m_pEdit(pEdit),
m_wpOld(wpOldPlace),
@@ -671,7 +671,7 @@ void CFXEU_Backspace::Undo()
//CFXEU_Delete
CFXEU_Delete::CFXEU_Delete(CFX_Edit * pEdit, const CPVT_WordPlace & wpOldPlace, const CPVT_WordPlace & wpNewPlace,
- FX_WORD word, FX_INT32 charset,
+ FX_WORD word, int32_t charset,
const CPVT_SecProps & SecProps, const CPVT_WordProps & WordProps, FX_BOOL bSecEnd) :
m_pEdit(pEdit),
m_wpOld(wpOldPlace),
@@ -754,7 +754,7 @@ void CFXEU_Clear::Undo()
//CFXEU_ClearRich
CFXEU_ClearRich::CFXEU_ClearRich(CFX_Edit * pEdit, const CPVT_WordPlace & wpOldPlace, const CPVT_WordPlace & wpNewPlace,
- const CPVT_WordRange & wrSel, FX_WORD word, FX_INT32 charset,
+ const CPVT_WordRange & wrSel, FX_WORD word, int32_t charset,
const CPVT_SecProps & SecProps, const CPVT_WordProps & WordProps) :
m_pEdit(pEdit),
m_wpOld(wpOldPlace),
@@ -807,7 +807,7 @@ void CFXEU_ClearRich::Undo()
//CFXEU_InsertText
CFXEU_InsertText::CFXEU_InsertText(CFX_Edit * pEdit, const CPVT_WordPlace & wpOldPlace, const CPVT_WordPlace & wpNewPlace,
- const CFX_WideString & swText, FX_INT32 charset,
+ const CFX_WideString & swText, int32_t charset,
const CPVT_SecProps * pSecProps, const CPVT_WordProps * pWordProps) :
m_pEdit(pEdit),
m_wpOld(wpOldPlace),
@@ -1046,13 +1046,13 @@ void CFX_Edit::SetPlateRect(const CPDF_Rect & rect, FX_BOOL bPaint/* = TRUE*/)
if (bPaint) Paint();
}
-void CFX_Edit::SetAlignmentH(FX_INT32 nFormat/* =0 */, FX_BOOL bPaint/* = TRUE*/)
+void CFX_Edit::SetAlignmentH(int32_t nFormat/* =0 */, FX_BOOL bPaint/* = TRUE*/)
{
m_pVT->SetAlignment(nFormat);
if (bPaint) Paint();
}
-void CFX_Edit::SetAlignmentV(FX_INT32 nFormat/* =0 */, FX_BOOL bPaint/* = TRUE*/)
+void CFX_Edit::SetAlignmentV(int32_t nFormat/* =0 */, FX_BOOL bPaint/* = TRUE*/)
{
m_nAlignment = nFormat;
if (bPaint) Paint();
@@ -1064,13 +1064,13 @@ void CFX_Edit::SetPasswordChar(FX_WORD wSubWord/* ='*' */, FX_BOOL bPaint/* = TR
if (bPaint) Paint();
}
-void CFX_Edit::SetLimitChar(FX_INT32 nLimitChar/* =0 */, FX_BOOL bPaint/* = TRUE*/)
+void CFX_Edit::SetLimitChar(int32_t nLimitChar/* =0 */, FX_BOOL bPaint/* = TRUE*/)
{
m_pVT->SetLimitChar(nLimitChar);
if (bPaint) Paint();
}
-void CFX_Edit::SetCharArray(FX_INT32 nCharArray/* =0 */, FX_BOOL bPaint/* = TRUE*/)
+void CFX_Edit::SetCharArray(int32_t nCharArray/* =0 */, FX_BOOL bPaint/* = TRUE*/)
{
m_pVT->SetCharArray(nCharArray);
if (bPaint) Paint();
@@ -1082,7 +1082,7 @@ void CFX_Edit::SetCharSpace(FX_FLOAT fCharSpace/* =0.0f */, FX_BOOL bPaint/* = T
if (bPaint) Paint();
}
-void CFX_Edit::SetHorzScale(FX_INT32 nHorzScale/* =100 */, FX_BOOL bPaint/* = TRUE*/)
+void CFX_Edit::SetHorzScale(int32_t nHorzScale/* =100 */, FX_BOOL bPaint/* = TRUE*/)
{
m_pVT->SetHorzScale(nHorzScale);
if (bPaint) Paint();
@@ -1130,7 +1130,7 @@ void CFX_Edit::SetTextOverflow(FX_BOOL bAllowed /*= FALSE*/, FX_BOOL bPaint/* =
if (bPaint) Paint();
}
-void CFX_Edit::SetSel(FX_INT32 nStartChar,FX_INT32 nEndChar)
+void CFX_Edit::SetSel(int32_t nStartChar,int32_t nEndChar)
{
if (m_pVT->IsValid())
{
@@ -1181,7 +1181,7 @@ void CFX_Edit::SetSel(const CPVT_WordPlace & begin,const CPVT_WordPlace & end)
}
}
-void CFX_Edit::GetSel(FX_INT32 & nStartChar, FX_INT32 & nEndChar) const
+void CFX_Edit::GetSel(int32_t & nStartChar, int32_t & nEndChar) const
{
nStartChar = -1;
nEndChar = -1;
@@ -1209,7 +1209,7 @@ void CFX_Edit::GetSel(FX_INT32 & nStartChar, FX_INT32 & nEndChar) const
}
}
-FX_INT32 CFX_Edit::GetCaret() const
+int32_t CFX_Edit::GetCaret() const
{
if (m_pVT->IsValid())
return m_pVT->WordPlaceToWordIndex(m_wpCaret);
@@ -1319,14 +1319,14 @@ CFX_WideString CFX_Edit::GetSelText() const
return GetRangeText(m_SelState.ConvertToWordRange());
}
-FX_INT32 CFX_Edit::GetTotalWords() const
+int32_t CFX_Edit::GetTotalWords() const
{
return m_pVT->GetTotalWords();
}
-FX_INT32 CFX_Edit::GetTotalLines() const
+int32_t CFX_Edit::GetTotalLines() const
{
- FX_INT32 nLines = 0;
+ int32_t nLines = 0;
if (IPDF_VariableText_Iterator * pIterator = m_pVT->GetIterator())
{
@@ -1379,7 +1379,7 @@ void CFX_Edit::SetRichText(FX_BOOL bRichText/* =TRUE */, FX_BOOL bPaint/* = TRUE
if (bPaint) Paint();
}
-FX_BOOL CFX_Edit::SetRichFontIndex(FX_INT32 nFontIndex)
+FX_BOOL CFX_Edit::SetRichFontIndex(int32_t nFontIndex)
{
CPVT_WordProps WordProps;
WordProps.nFontIndex = nFontIndex;
@@ -1400,7 +1400,7 @@ FX_BOOL CFX_Edit::SetRichTextColor(FX_COLORREF dwColor)
return SetRichTextProps(EP_WORDCOLOR,NULL,&WordProps);
}
-FX_BOOL CFX_Edit::SetRichTextScript(FX_INT32 nScriptType)
+FX_BOOL CFX_Edit::SetRichTextScript(int32_t nScriptType)
{
CPVT_WordProps WordProps;
WordProps.nScriptType = nScriptType;
@@ -1446,7 +1446,7 @@ FX_BOOL CFX_Edit::SetRichTextCharSpace(FX_FLOAT fCharSpace)
return SetRichTextProps(EP_CHARSPACE,NULL,&WordProps);
}
-FX_BOOL CFX_Edit::SetRichTextHorzScale(FX_INT32 nHorzScale /*= 100*/)
+FX_BOOL CFX_Edit::SetRichTextHorzScale(int32_t nHorzScale /*= 100*/)
{
CPVT_WordProps WordProps;
WordProps.nHorzScale = nHorzScale;
@@ -1467,7 +1467,7 @@ FX_BOOL CFX_Edit::SetRichTextLineIndent(FX_FLOAT fLineIndent)
return SetRichTextProps(EP_LINEINDENT,&SecProps,NULL);
}
-FX_BOOL CFX_Edit::SetRichTextAlignment(FX_INT32 nAlignment)
+FX_BOOL CFX_Edit::SetRichTextAlignment(int32_t nAlignment)
{
CPVT_SecProps SecProps;
SecProps.nAlignment = nAlignment;
@@ -1921,13 +1921,13 @@ FX_BOOL CFX_Edit::SetWordProps(EDIT_PROPS_E eProps, const CPVT_WordPlace & place
return FALSE;
}
-void CFX_Edit::SetText(FX_LPCWSTR text,FX_INT32 charset /*= DEFAULT_CHARSET*/,
+void CFX_Edit::SetText(FX_LPCWSTR text,int32_t charset /*= DEFAULT_CHARSET*/,
const CPVT_SecProps * pSecProps /*= NULL*/,const CPVT_WordProps * pWordProps /*= NULL*/)
{
SetText(text,charset,pSecProps,pWordProps,TRUE,TRUE);
}
-FX_BOOL CFX_Edit::InsertWord(FX_WORD word, FX_INT32 charset /*= DEFAULT_CHARSET*/, const CPVT_WordProps * pWordProps /*= NULL*/)
+FX_BOOL CFX_Edit::InsertWord(FX_WORD word, int32_t charset /*= DEFAULT_CHARSET*/, const CPVT_WordProps * pWordProps /*= NULL*/)
{
return InsertWord(word,charset,pWordProps,TRUE,TRUE);
}
@@ -1952,7 +1952,7 @@ FX_BOOL CFX_Edit::Clear()
return Clear(TRUE,TRUE);
}
-FX_BOOL CFX_Edit::InsertText(FX_LPCWSTR text, FX_INT32 charset /*= DEFAULT_CHARSET*/,
+FX_BOOL CFX_Edit::InsertText(FX_LPCWSTR text, int32_t charset /*= DEFAULT_CHARSET*/,
const CPVT_SecProps * pSecProps /*= NULL*/,const CPVT_WordProps * pWordProps /*= NULL*/)
{
return InsertText(text,charset,pSecProps,pWordProps,TRUE,TRUE);
@@ -1968,7 +1968,7 @@ FX_WORD CFX_Edit::GetPasswordChar() const
return m_pVT->GetPasswordChar();
}
-FX_INT32 CFX_Edit::GetCharArray() const
+int32_t CFX_Edit::GetCharArray() const
{
return m_pVT->GetCharArray();
}
@@ -1983,7 +1983,7 @@ CPDF_Rect CFX_Edit::GetContentRect() const
return VTToEdit(m_pVT->GetContentRect());
}
-FX_INT32 CFX_Edit::GetHorzScale() const
+int32_t CFX_Edit::GetHorzScale() const
{
return m_pVT->GetHorzScale();
}
@@ -2413,7 +2413,7 @@ void CFX_Edit::Refresh(REFRESH_PLAN_E ePlan,const CPVT_WordRange * pRange1,const
m_bNotifyFlag = TRUE;
if (const CFX_Edit_RectArray * pRects = m_Refresh.GetRefreshRects())
{
- for (FX_INT32 i = 0, sz = pRects->GetSize(); i < sz; i++)
+ for (int32_t i = 0, sz = pRects->GetSize(); i < sz; i++)
m_pNotify->IOnInvalidateRect(pRects->GetAt(i));
}
m_bNotifyFlag = FALSE;
@@ -2647,7 +2647,7 @@ void CFX_Edit::SetCaretChange()
}
}
-void CFX_Edit::SetCaret(FX_INT32 nPos)
+void CFX_Edit::SetCaret(int32_t nPos)
{
if (m_pVT->IsValid())
{
@@ -2962,7 +2962,7 @@ void CFX_Edit::OnVK_END(FX_BOOL bShift,FX_BOOL bCtrl)
}
}
-void CFX_Edit::SetText(FX_LPCWSTR text,FX_INT32 charset,
+void CFX_Edit::SetText(FX_LPCWSTR text,int32_t charset,
const CPVT_SecProps * pSecProps,const CPVT_WordProps * pWordProps, FX_BOOL bAddUndo, FX_BOOL bPaint)
{
Empty();
@@ -2973,7 +2973,7 @@ void CFX_Edit::SetText(FX_LPCWSTR text,FX_INT32 charset,
//if (bAddUndo)
}
-FX_BOOL CFX_Edit::InsertWord(FX_WORD word, FX_INT32 charset, const CPVT_WordProps * pWordProps, FX_BOOL bAddUndo, FX_BOOL bPaint)
+FX_BOOL CFX_Edit::InsertWord(FX_WORD word, int32_t charset, const CPVT_WordProps * pWordProps, FX_BOOL bAddUndo, FX_BOOL bPaint)
{
if (IsTextOverflow()) return FALSE;
@@ -3264,7 +3264,7 @@ FX_BOOL CFX_Edit::Clear(FX_BOOL bAddUndo, FX_BOOL bPaint)
return FALSE;
}
-FX_BOOL CFX_Edit::InsertText(FX_LPCWSTR text, FX_INT32 charset,
+FX_BOOL CFX_Edit::InsertText(FX_LPCWSTR text, int32_t charset,
const CPVT_SecProps * pSecProps, const CPVT_WordProps * pWordProps, FX_BOOL bAddUndo, FX_BOOL bPaint)
{
if (IsTextOverflow()) return FALSE;
@@ -3360,7 +3360,7 @@ void CFX_Edit::SetCaretOrigin()
}
}
-FX_INT32 CFX_Edit::WordPlaceToWordIndex(const CPVT_WordPlace & place) const
+int32_t CFX_Edit::WordPlaceToWordIndex(const CPVT_WordPlace & place) const
{
if (m_pVT->IsValid())
return m_pVT->WordPlaceToWordIndex(place);
@@ -3368,7 +3368,7 @@ FX_INT32 CFX_Edit::WordPlaceToWordIndex(const CPVT_WordPlace & place) const
return -1;
}
-CPVT_WordPlace CFX_Edit::WordIndexToWordPlace(FX_INT32 index) const
+CPVT_WordPlace CFX_Edit::WordIndexToWordPlace(int32_t index) const
{
if (m_pVT->IsValid())
return m_pVT->WordIndexToWordPlace(index);
@@ -3378,9 +3378,9 @@ CPVT_WordPlace CFX_Edit::WordIndexToWordPlace(FX_INT32 index) const
FX_BOOL CFX_Edit::IsTextFull() const
{
- FX_INT32 nTotalWords = m_pVT->GetTotalWords();
- FX_INT32 nLimitChar = m_pVT->GetLimitChar();
- FX_INT32 nCharArray = m_pVT->GetCharArray();
+ int32_t nTotalWords = m_pVT->GetTotalWords();
+ int32_t nLimitChar = m_pVT->GetLimitChar();
+ int32_t nCharArray = m_pVT->GetCharArray();
return IsTextOverflow() || (nLimitChar>0 && nTotalWords >= nLimitChar)
|| (nCharArray>0 && nTotalWords >= nCharArray);
@@ -3510,7 +3510,7 @@ FX_FLOAT CFX_Edit::GetLineBottom(const CPVT_WordPlace& place) const
return 0.0f;
}
-CPVT_WordPlace CFX_Edit::DoInsertText(const CPVT_WordPlace& place, FX_LPCWSTR text, FX_INT32 charset,
+CPVT_WordPlace CFX_Edit::DoInsertText(const CPVT_WordPlace& place, FX_LPCWSTR text, int32_t charset,
const CPVT_SecProps * pSecProps, const CPVT_WordProps * pWordProps)
{
CPVT_WordPlace wp = place;
@@ -3519,7 +3519,7 @@ CPVT_WordPlace CFX_Edit::DoInsertText(const CPVT_WordPlace& place, FX_LPCWSTR te
{
CFX_WideString sText = text;
- for (FX_INT32 i = 0, sz = sText.GetLength(); i < sz; i++)
+ for (int32_t i = 0, sz = sText.GetLength(); i < sz; i++)
{
FX_WORD word = sText[i];
switch (word)
@@ -3546,7 +3546,7 @@ CPVT_WordPlace CFX_Edit::DoInsertText(const CPVT_WordPlace& place, FX_LPCWSTR te
return wp;
}
-FX_INT32 CFX_Edit::GetCharSetFromUnicode(FX_WORD word, FX_INT32 nOldCharset)
+int32_t CFX_Edit::GetCharSetFromUnicode(FX_WORD word, int32_t nOldCharset)
{
if (IFX_Edit_FontMap* pFontMap = this->GetFontMap())
return pFontMap->CharSetFromUnicode(word, nOldCharset);
diff --git a/fpdfsdk/src/fxedit/fxet_list.cpp b/fpdfsdk/src/fxedit/fxet_list.cpp
index 64ed694d12..03b23020b4 100644
--- a/fpdfsdk/src/fxedit/fxet_list.cpp
+++ b/fpdfsdk/src/fxedit/fxet_list.cpp
@@ -130,7 +130,7 @@ CFX_List::~CFX_List()
void CFX_List::Empty()
{
- for (FX_INT32 i=0,sz=m_aListItems.GetSize(); i<sz; i++)
+ for (int32_t i=0,sz=m_aListItems.GetSize(); i<sz; i++)
delete m_aListItems.GetAt(i);
m_aListItems.RemoveAll();
@@ -157,14 +157,14 @@ void CFX_List::AddItem(FX_LPCWSTR str)
}
}
-void CFX_List::ReArrange(FX_INT32 nItemIndex)
+void CFX_List::ReArrange(int32_t nItemIndex)
{
FX_FLOAT fPosY = 0.0f;
if (CFX_ListItem * pPrevItem = m_aListItems.GetAt(nItemIndex - 1))
fPosY = pPrevItem->GetRect().bottom;
- for (FX_INT32 i=nItemIndex,sz=m_aListItems.GetSize(); i<sz; i++)
+ for (int32_t i=nItemIndex,sz=m_aListItems.GetSize(); i<sz; i++)
{
if (CFX_ListItem * pListItem = m_aListItems.GetAt(i))
{
@@ -177,7 +177,7 @@ void CFX_List::ReArrange(FX_INT32 nItemIndex)
SetContentRect(CLST_Rect(0.0f,0.0f,0.0f,fPosY));
}
-IFX_Edit * CFX_List::GetItemEdit(FX_INT32 nIndex) const
+IFX_Edit * CFX_List::GetItemEdit(int32_t nIndex) const
{
if (CFX_ListItem * pListItem = m_aListItems.GetAt(nIndex))
{
@@ -187,7 +187,7 @@ IFX_Edit * CFX_List::GetItemEdit(FX_INT32 nIndex) const
return NULL;
}
-FX_INT32 CFX_List::GetCount() const
+int32_t CFX_List::GetCount() const
{
return m_aListItems.GetSize();
}
@@ -207,14 +207,14 @@ FX_FLOAT CFX_List::GetFontSize() const
return m_fFontSize;
}
-FX_INT32 CFX_List::GetItemIndex(const CPDF_Point & point) const
+int32_t CFX_List::GetItemIndex(const CPDF_Point & point) const
{
CPDF_Point pt = OuterToInner(point);
FX_BOOL bFirst = TRUE;
FX_BOOL bLast = TRUE;
- for (FX_INT32 i=0,sz=m_aListItems.GetSize(); i<sz; i++)
+ for (int32_t i=0,sz=m_aListItems.GetSize(); i<sz; i++)
{
if (CFX_ListItem * pListItem = m_aListItems.GetAt(i))
{
@@ -253,9 +253,9 @@ FX_FLOAT CFX_List::GetFirstHeight() const
return 1.0f;
}
-FX_INT32 CFX_List::GetFirstSelected() const
+int32_t CFX_List::GetFirstSelected() const
{
- for (FX_INT32 i=0,sz=m_aListItems.GetSize(); i<sz; i++)
+ for (int32_t i=0,sz=m_aListItems.GetSize(); i<sz; i++)
{
if (CFX_ListItem * pListItem = m_aListItems.GetAt(i))
{
@@ -266,9 +266,9 @@ FX_INT32 CFX_List::GetFirstSelected() const
return -1;
}
-FX_INT32 CFX_List::GetLastSelected() const
+int32_t CFX_List::GetLastSelected() const
{
- for (FX_INT32 i=m_aListItems.GetSize()-1; i>=0; i--)
+ for (int32_t i=m_aListItems.GetSize()-1; i>=0; i--)
{
if (CFX_ListItem * pListItem = m_aListItems.GetAt(i))
{
@@ -286,11 +286,11 @@ FX_WCHAR CFX_List::Toupper(FX_WCHAR c) const
return c;
}
-FX_INT32 CFX_List::FindNext(FX_INT32 nIndex,FX_WCHAR nChar) const
+int32_t CFX_List::FindNext(int32_t nIndex,FX_WCHAR nChar) const
{
- FX_INT32 nCircleIndex = nIndex;
+ int32_t nCircleIndex = nIndex;
- for (FX_INT32 i=0,sz=m_aListItems.GetSize(); i<sz; i++)
+ for (int32_t i=0,sz=m_aListItems.GetSize(); i<sz; i++)
{
nCircleIndex ++;
if (nCircleIndex >= sz) nCircleIndex = 0;
@@ -305,7 +305,7 @@ FX_INT32 CFX_List::FindNext(FX_INT32 nIndex,FX_WCHAR nChar) const
return nCircleIndex;
}
-CPDF_Rect CFX_List::GetItemRect(FX_INT32 nIndex) const
+CPDF_Rect CFX_List::GetItemRect(int32_t nIndex) const
{
if (CFX_ListItem * pListItem = m_aListItems.GetAt(nIndex))
{
@@ -318,7 +318,7 @@ CPDF_Rect CFX_List::GetItemRect(FX_INT32 nIndex) const
return CPDF_Rect();
}
-FX_BOOL CFX_List::IsItemSelected(FX_INT32 nIndex) const
+FX_BOOL CFX_List::IsItemSelected(int32_t nIndex) const
{
if (CFX_ListItem * pListItem = m_aListItems.GetAt(nIndex))
{
@@ -328,7 +328,7 @@ FX_BOOL CFX_List::IsItemSelected(FX_INT32 nIndex) const
return FALSE;
}
-void CFX_List::SetItemSelect(FX_INT32 nItemIndex, FX_BOOL bSelected)
+void CFX_List::SetItemSelect(int32_t nItemIndex, FX_BOOL bSelected)
{
if (CFX_ListItem * pListItem = m_aListItems.GetAt(nItemIndex))
{
@@ -336,7 +336,7 @@ void CFX_List::SetItemSelect(FX_INT32 nItemIndex, FX_BOOL bSelected)
}
}
-void CFX_List::SetItemCaret(FX_INT32 nItemIndex, FX_BOOL bCaret)
+void CFX_List::SetItemCaret(int32_t nItemIndex, FX_BOOL bCaret)
{
if (CFX_ListItem * pListItem = m_aListItems.GetAt(nItemIndex))
{
@@ -354,12 +354,12 @@ FX_BOOL CFX_List::IsMultipleSel() const
return m_bMultiple;
}
-FX_BOOL CFX_List::IsValid(FX_INT32 nItemIndex) const
+FX_BOOL CFX_List::IsValid(int32_t nItemIndex) const
{
return nItemIndex >= 0 && nItemIndex < m_aListItems.GetSize();
}
-CFX_WideString CFX_List::GetItemText(FX_INT32 nIndex) const
+CFX_WideString CFX_List::GetItemText(int32_t nIndex) const
{
if (CFX_ListItem * pListItem = m_aListItems.GetAt(nIndex))
{
@@ -377,15 +377,15 @@ CPLST_Select::CPLST_Select()
CPLST_Select::~CPLST_Select()
{
- for (FX_INT32 i=0,sz=m_aItems.GetSize(); i<sz; i++)
+ for (int32_t i=0,sz=m_aItems.GetSize(); i<sz; i++)
delete m_aItems.GetAt(i);
m_aItems.RemoveAll();
}
-void CPLST_Select::Add(FX_INT32 nItemIndex)
+void CPLST_Select::Add(int32_t nItemIndex)
{
- FX_INT32 nIndex = Find(nItemIndex);
+ int32_t nIndex = Find(nItemIndex);
if (nIndex < 0)
m_aItems.Add(new CPLST_Select_Item(nItemIndex,1));
@@ -398,21 +398,21 @@ void CPLST_Select::Add(FX_INT32 nItemIndex)
}
}
-void CPLST_Select::Add(FX_INT32 nBeginIndex, FX_INT32 nEndIndex)
+void CPLST_Select::Add(int32_t nBeginIndex, int32_t nEndIndex)
{
if (nBeginIndex > nEndIndex)
{
- FX_INT32 nTemp = nEndIndex;
+ int32_t nTemp = nEndIndex;
nEndIndex = nBeginIndex;
nBeginIndex = nTemp;
}
- for (FX_INT32 i=nBeginIndex; i<=nEndIndex; i++) Add(i);
+ for (int32_t i=nBeginIndex; i<=nEndIndex; i++) Add(i);
}
-void CPLST_Select::Sub(FX_INT32 nItemIndex)
+void CPLST_Select::Sub(int32_t nItemIndex)
{
- for (FX_INT32 i=m_aItems.GetSize()-1; i>=0; i--)
+ for (int32_t i=m_aItems.GetSize()-1; i>=0; i--)
{
if (CPLST_Select_Item * pItem = m_aItems.GetAt(i))
if (pItem->nItemIndex == nItemIndex)
@@ -420,21 +420,21 @@ void CPLST_Select::Sub(FX_INT32 nItemIndex)
}
}
-void CPLST_Select::Sub(FX_INT32 nBeginIndex, FX_INT32 nEndIndex)
+void CPLST_Select::Sub(int32_t nBeginIndex, int32_t nEndIndex)
{
if (nBeginIndex > nEndIndex)
{
- FX_INT32 nTemp = nEndIndex;
+ int32_t nTemp = nEndIndex;
nEndIndex = nBeginIndex;
nBeginIndex = nTemp;
}
- for (FX_INT32 i=nBeginIndex; i<=nEndIndex; i++) Sub(i);
+ for (int32_t i=nBeginIndex; i<=nEndIndex; i++) Sub(i);
}
-FX_INT32 CPLST_Select::Find(FX_INT32 nItemIndex) const
+int32_t CPLST_Select::Find(int32_t nItemIndex) const
{
- for (FX_INT32 i=0,sz=m_aItems.GetSize(); i<sz; i++)
+ for (int32_t i=0,sz=m_aItems.GetSize(); i<sz; i++)
{
if (CPLST_Select_Item * pItem = m_aItems.GetAt(i))
{
@@ -446,17 +446,17 @@ FX_INT32 CPLST_Select::Find(FX_INT32 nItemIndex) const
return -1;
}
-FX_BOOL CPLST_Select::IsExist(FX_INT32 nItemIndex) const
+FX_BOOL CPLST_Select::IsExist(int32_t nItemIndex) const
{
return Find(nItemIndex) >= 0;
}
-FX_INT32 CPLST_Select::GetCount() const
+int32_t CPLST_Select::GetCount() const
{
return m_aItems.GetSize();
}
-FX_INT32 CPLST_Select::GetItemIndex(FX_INT32 nIndex) const
+int32_t CPLST_Select::GetItemIndex(int32_t nIndex) const
{
if (nIndex >= 0 && nIndex < m_aItems.GetSize())
if (CPLST_Select_Item * pItem = m_aItems.GetAt(nIndex))
@@ -465,7 +465,7 @@ FX_INT32 CPLST_Select::GetItemIndex(FX_INT32 nIndex) const
return -1;
}
-FX_INT32 CPLST_Select::GetState(FX_INT32 nIndex) const
+int32_t CPLST_Select::GetState(int32_t nIndex) const
{
if (nIndex >= 0 && nIndex < m_aItems.GetSize())
if (CPLST_Select_Item * pItem = m_aItems.GetAt(nIndex))
@@ -476,7 +476,7 @@ FX_INT32 CPLST_Select::GetState(FX_INT32 nIndex) const
void CPLST_Select::DeselectAll()
{
- for (FX_INT32 i=0,sz=m_aItems.GetSize(); i<sz; i++)
+ for (int32_t i=0,sz=m_aItems.GetSize(); i<sz; i++)
{
if (CPLST_Select_Item * pItem = m_aItems.GetAt(i))
{
@@ -487,7 +487,7 @@ void CPLST_Select::DeselectAll()
void CPLST_Select::Done()
{
- for (FX_INT32 i=m_aItems.GetSize()-1; i>=0; i--)
+ for (int32_t i=m_aItems.GetSize()-1; i>=0; i--)
{
if (CPLST_Select_Item * pItem = m_aItems.GetAt(i))
{
@@ -559,7 +559,7 @@ CPDF_Rect CFX_ListCtrl::OutToIn(const CPDF_Rect & rect) const
void CFX_ListCtrl::OnMouseDown(const CPDF_Point & point,FX_BOOL bShift,FX_BOOL bCtrl)
{
- FX_INT32 nHitIndex = this->GetItemIndex(point);
+ int32_t nHitIndex = this->GetItemIndex(point);
if (IsMultipleSel())
{
@@ -608,7 +608,7 @@ void CFX_ListCtrl::OnMouseDown(const CPDF_Point & point,FX_BOOL bShift,FX_BOOL b
void CFX_ListCtrl::OnMouseMove(const CPDF_Point & point,FX_BOOL bShift,FX_BOOL bCtrl)
{
- FX_INT32 nHitIndex = this->GetItemIndex(point);
+ int32_t nHitIndex = this->GetItemIndex(point);
if (IsMultipleSel())
{
@@ -639,7 +639,7 @@ void CFX_ListCtrl::OnMouseMove(const CPDF_Point & point,FX_BOOL bShift,FX_BOOL b
this->ScrollToListItem(nHitIndex);
}
-void CFX_ListCtrl::OnVK(FX_INT32 nItemIndex,FX_BOOL bShift,FX_BOOL bCtrl)
+void CFX_ListCtrl::OnVK(int32_t nItemIndex,FX_BOOL bShift,FX_BOOL bCtrl)
{
if (IsMultipleSel())
{
@@ -706,8 +706,8 @@ void CFX_ListCtrl::OnVK_END(FX_BOOL bShift,FX_BOOL bCtrl)
FX_BOOL CFX_ListCtrl::OnChar(FX_WORD nChar,FX_BOOL bShift,FX_BOOL bCtrl)
{
- FX_INT32 nIndex = GetLastSelected();
- FX_INT32 nFindIndex = FindNext(nIndex,nChar);
+ int32_t nIndex = GetLastSelected();
+ int32_t nFindIndex = FindNext(nIndex,nChar);
if (nFindIndex != nIndex)
{
@@ -728,7 +728,7 @@ void CFX_ListCtrl::SetPlateRect(const CPDF_Rect & rect)
InvalidateItem(-1);
}
-CPDF_Rect CFX_ListCtrl::GetItemRect(FX_INT32 nIndex) const
+CPDF_Rect CFX_ListCtrl::GetItemRect(int32_t nIndex) const
{
return InToOut(CFX_List::GetItemRect(nIndex));
}
@@ -739,7 +739,7 @@ void CFX_ListCtrl::AddString(FX_LPCWSTR string)
ReArrange(GetCount() - 1);
}
-void CFX_ListCtrl::SetMultipleSelect(FX_INT32 nItemIndex, FX_BOOL bSelected)
+void CFX_ListCtrl::SetMultipleSelect(int32_t nItemIndex, FX_BOOL bSelected)
{
if (!IsValid(nItemIndex)) return;
@@ -758,7 +758,7 @@ void CFX_ListCtrl::SetMultipleSelect(FX_INT32 nItemIndex, FX_BOOL bSelected)
}
}
-void CFX_ListCtrl::SetSingleSelect(FX_INT32 nItemIndex)
+void CFX_ListCtrl::SetSingleSelect(int32_t nItemIndex)
{
if (!IsValid(nItemIndex)) return;
@@ -776,13 +776,13 @@ void CFX_ListCtrl::SetSingleSelect(FX_INT32 nItemIndex)
}
}
-void CFX_ListCtrl::SetCaret(FX_INT32 nItemIndex)
+void CFX_ListCtrl::SetCaret(int32_t nItemIndex)
{
if (!IsValid(nItemIndex)) return;
if (this->IsMultipleSel())
{
- FX_INT32 nOldIndex = m_nCaretIndex;
+ int32_t nOldIndex = m_nCaretIndex;
if (nOldIndex != nItemIndex)
{
@@ -797,7 +797,7 @@ void CFX_ListCtrl::SetCaret(FX_INT32 nItemIndex)
}
}
-void CFX_ListCtrl::InvalidateItem(FX_INT32 nItemIndex)
+void CFX_ListCtrl::InvalidateItem(int32_t nItemIndex)
{
if (m_pNotify)
{
@@ -831,10 +831,10 @@ void CFX_ListCtrl::InvalidateItem(FX_INT32 nItemIndex)
void CFX_ListCtrl::SelectItems()
{
- for (FX_INT32 i=0,sz=m_aSelItems.GetCount(); i<sz; i++)
+ for (int32_t i=0,sz=m_aSelItems.GetCount(); i<sz; i++)
{
- FX_INT32 nItemIndex = m_aSelItems.GetItemIndex(i);
- FX_INT32 nState = m_aSelItems.GetState(i);
+ int32_t nItemIndex = m_aSelItems.GetItemIndex(i);
+ int32_t nState = m_aSelItems.GetState(i);
switch(nState)
{
@@ -850,7 +850,7 @@ void CFX_ListCtrl::SelectItems()
m_aSelItems.Done();
}
-void CFX_ListCtrl::Select(FX_INT32 nItemIndex)
+void CFX_ListCtrl::Select(int32_t nItemIndex)
{
if (!IsValid(nItemIndex)) return;
@@ -863,7 +863,7 @@ void CFX_ListCtrl::Select(FX_INT32 nItemIndex)
SetSingleSelect(nItemIndex);
}
-FX_BOOL CFX_ListCtrl::IsItemVisible(FX_INT32 nItemIndex) const
+FX_BOOL CFX_ListCtrl::IsItemVisible(int32_t nItemIndex) const
{
CPDF_Rect rcPlate = this->GetPlateRect();
CPDF_Rect rcItem = this->GetItemRect(nItemIndex);
@@ -871,7 +871,7 @@ FX_BOOL CFX_ListCtrl::IsItemVisible(FX_INT32 nItemIndex) const
return rcItem.bottom >= rcPlate.bottom && rcItem.top <= rcPlate.top;
}
-void CFX_ListCtrl::ScrollToListItem(FX_INT32 nItemIndex)
+void CFX_ListCtrl::ScrollToListItem(int32_t nItemIndex)
{
if (!IsValid(nItemIndex)) return;
@@ -960,13 +960,13 @@ CPDF_Rect CFX_ListCtrl::GetContentRect() const
return InToOut(CFX_List::GetContentRect());
}
-void CFX_ListCtrl::ReArrange(FX_INT32 nItemIndex)
+void CFX_ListCtrl::ReArrange(int32_t nItemIndex)
{
CFX_List::ReArrange(nItemIndex);
SetScrollInfo();
}
-void CFX_ListCtrl::SetTopItem(FX_INT32 nIndex)
+void CFX_ListCtrl::SetTopItem(int32_t nIndex)
{
if (IsValid(nIndex))
{
@@ -976,9 +976,9 @@ void CFX_ListCtrl::SetTopItem(FX_INT32 nIndex)
}
}
-FX_INT32 CFX_ListCtrl::GetTopItem() const
+int32_t CFX_ListCtrl::GetTopItem() const
{
- FX_INT32 nItemIndex = this->GetItemIndex(this->GetBTPoint());
+ int32_t nItemIndex = this->GetItemIndex(this->GetBTPoint());
if (!IsItemVisible(nItemIndex) && IsItemVisible(nItemIndex + 1))
nItemIndex += 1;
@@ -997,7 +997,7 @@ void CFX_ListCtrl::Cancel()
m_aSelItems.DeselectAll();
}
-FX_INT32 CFX_ListCtrl::GetItemIndex(const CPDF_Point & point) const
+int32_t CFX_ListCtrl::GetItemIndex(const CPDF_Point & point) const
{
return CFX_List::GetItemIndex(OutToIn(point));
}
diff --git a/fpdfsdk/src/fxedit/fxet_pageobjs.cpp b/fpdfsdk/src/fxedit/fxet_pageobjs.cpp
index 7b64b33ba1..6b597cabb9 100644
--- a/fpdfsdk/src/fxedit/fxet_pageobjs.cpp
+++ b/fpdfsdk/src/fxedit/fxet_pageobjs.cpp
@@ -11,7 +11,7 @@
#define FX_EDIT_UNDERLINEHALFWIDTH 0.5f
#define FX_EDIT_CROSSOUTHALFWIDTH 0.5f
-extern CFX_ByteString GetPDFWordString(IFX_Edit_FontMap * pFontMap, FX_INT32 nFontIndex, FX_WORD Word, FX_WORD SubWord);
+extern CFX_ByteString GetPDFWordString(IFX_Edit_FontMap * pFontMap, int32_t nFontIndex, FX_WORD Word, FX_WORD SubWord);
CPDF_Rect GetUnderLineRect(const CPVT_Word& word)
{
@@ -26,7 +26,7 @@ CPDF_Rect GetCrossoutRect(const CPVT_Word& word)
}
static void DrawTextString(CFX_RenderDevice* pDevice, const CPDF_Point& pt, CPDF_Font* pFont, FX_FLOAT fFontSize, CPDF_Matrix* pUser2Device,
- const CFX_ByteString& str, FX_ARGB crTextFill, FX_ARGB crTextStroke, FX_INT32 nHorzScale)
+ const CFX_ByteString& str, FX_ARGB crTextFill, FX_ARGB crTextStroke, int32_t nHorzScale)
{
FX_FLOAT x = pt.x, y = pt.y;
pUser2Device->Transform(x, y);
@@ -87,10 +87,10 @@ void IFX_Edit::DrawUnderline(CFX_RenderDevice* pDevice, CPDF_Matrix* pUser2Devic
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);
}
@@ -139,7 +139,7 @@ void IFX_Edit::DrawEdit(CFX_RenderDevice* pDevice, CPDF_Matrix* pUser2Device, IF
FX_WORD SubWord = pEdit->GetPasswordChar();
FX_FLOAT fFontSize = pEdit->GetFontSize();
CPVT_WordRange wrSelect = pEdit->GetSelectWordRange();
- FX_INT32 nHorzScale = pEdit->GetHorzScale();
+ int32_t nHorzScale = pEdit->GetHorzScale();
FX_COLORREF crCurFill = crTextFill;
FX_COLORREF crOldFill = crCurFill;
@@ -149,7 +149,7 @@ void IFX_Edit::DrawEdit(CFX_RenderDevice* pDevice, CPDF_Matrix* pUser2Device, IF
const FX_COLORREF crSelBK = ArgbEncode(255,0,51,113);
CFX_ByteTextBuf sTextBuf;
- FX_INT32 nFontIndex = -1;
+ int32_t nFontIndex = -1;
CPDF_Point ptBT(0.0f,0.0f);
pDevice->SaveState();
@@ -159,10 +159,10 @@ void IFX_Edit::DrawEdit(CFX_RenderDevice* pDevice, CPDF_Matrix* pUser2Device, IF
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);
}
@@ -293,10 +293,10 @@ void IFX_Edit::DrawRichEdit(CFX_RenderDevice* pDevice, CPDF_Matrix* pUser2Device
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);
}
@@ -416,7 +416,7 @@ static void AddRectToPageObjects(CPDF_PageObjects* pPageObjs, FX_COLORREF crFill
}
static CPDF_TextObject* AddTextObjToPageObjects(CPDF_PageObjects* pPageObjs, FX_COLORREF crText,
- CPDF_Font* pFont, FX_FLOAT fFontSize, FX_FLOAT fCharSpace, FX_INT32 nHorzScale,
+ CPDF_Font* pFont, FX_FLOAT fFontSize, FX_FLOAT fCharSpace, int32_t nHorzScale,
const CPDF_Point& point, const CFX_ByteString& text)
{
CPDF_TextObject* pTxtObj = new CPDF_TextObject;
@@ -452,7 +452,7 @@ void IFX_Edit::GeneratePageObjects(CPDF_PageObjects* pPageObjects, IFX_Edit* pEd
{
FX_FLOAT fFontSize = pEdit->GetFontSize();
- FX_INT32 nOldFontIndex = -1;
+ int32_t nOldFontIndex = -1;
CFX_ByteTextBuf sTextBuf;
CPDF_Point ptBT(0.0f,0.0f);