summaryrefslogtreecommitdiff
path: root/core/src/fpdfdoc/pdf_vt.h
diff options
context:
space:
mode:
Diffstat (limited to 'core/src/fpdfdoc/pdf_vt.h')
-rw-r--r--core/src/fpdfdoc/pdf_vt.h96
1 files changed, 48 insertions, 48 deletions
diff --git a/core/src/fpdfdoc/pdf_vt.h b/core/src/fpdfdoc/pdf_vt.h
index 9c38ffc00c..5d8b20cf52 100644
--- a/core/src/fpdfdoc/pdf_vt.h
+++ b/core/src/fpdfdoc/pdf_vt.h
@@ -118,7 +118,7 @@ struct CPVT_SectionInfo {
}
}
CPVT_FloatRect rcSection;
- FX_INT32 nTotalLine;
+ int32_t nTotalLine;
CPVT_SecProps* pSecProps;
CPVT_WordProps* pWordProps;
};
@@ -127,9 +127,9 @@ struct CPVT_LineInfo {
fLineX(0.0f), fLineY(0.0f), fLineWidth(0.0f), fLineAscent(0.0f), fLineDescent(0.0f)
{
}
- FX_INT32 nTotalWord;
- FX_INT32 nBeginWordIndex;
- FX_INT32 nEndWordIndex;
+ int32_t nTotalWord;
+ int32_t nBeginWordIndex;
+ int32_t nEndWordIndex;
FX_FLOAT fLineX;
FX_FLOAT fLineY;
FX_FLOAT fLineWidth;
@@ -141,7 +141,7 @@ struct CPVT_WordInfo {
fWordX(0.0f), fWordY(0.0f), fWordTail(0.0f), nFontIndex(-1), pWordProps(NULL)
{
}
- CPVT_WordInfo(FX_WORD word, FX_INT32 charset, FX_INT32 fontIndex, CPVT_WordProps * pProps):
+ CPVT_WordInfo(FX_WORD word, int32_t charset, int32_t fontIndex, CPVT_WordProps * pProps):
Word(word), nCharset(charset), fWordX(0.0f), fWordY(0.0f), fWordTail(0.0f),
nFontIndex(fontIndex), pWordProps(pProps)
{
@@ -174,11 +174,11 @@ struct CPVT_WordInfo {
}
}
FX_WORD Word;
- FX_INT32 nCharset;
+ int32_t nCharset;
FX_FLOAT fWordX;
FX_FLOAT fWordY;
FX_FLOAT fWordTail;
- FX_INT32 nFontIndex;
+ int32_t nFontIndex;
CPVT_WordProps* pWordProps;
};
struct CPVT_FloatRange {
@@ -235,11 +235,11 @@ public:
{
RemoveAll();
}
- FX_INT32 GetSize() const
+ int32_t GetSize() const
{
return m_Lines.GetSize();
}
- CLine * GetAt(FX_INT32 nIndex) const
+ CLine * GetAt(int32_t nIndex) const
{
return m_Lines.GetAt(nIndex);
}
@@ -249,13 +249,13 @@ public:
}
void RemoveAll()
{
- for (FX_INT32 i = 0, sz = GetSize(); i < sz; i++) {
+ for (int32_t i = 0, sz = GetSize(); i < sz; i++) {
delete GetAt(i);
}
m_Lines.RemoveAll();
m_nTotal = 0;
}
- FX_INT32 Add(const CPVT_LineInfo & lineinfo)
+ int32_t Add(const CPVT_LineInfo & lineinfo)
{
if (m_nTotal >= GetSize()) {
if (CLine * pLine = FX_NEW CLine) {
@@ -273,14 +273,14 @@ public:
}
void Clear()
{
- for (FX_INT32 i = GetSize() - 1; i >= m_nTotal; i--) {
+ for (int32_t i = GetSize() - 1; i >= m_nTotal; i--) {
delete GetAt(i);
m_Lines.RemoveAt(i);
}
}
private:
CPVT_ArrayTemplate<CLine*> m_Lines;
- FX_INT32 m_nTotal;
+ int32_t m_nTotal;
};
class CSection
{
@@ -312,9 +312,9 @@ public:
CLines m_LineArray;
CPVT_ArrayTemplate<CPVT_WordInfo*> m_WordArray;
private:
- void ClearLeftWords(FX_INT32 nWordIndex);
- void ClearRightWords(FX_INT32 nWordIndex);
- void ClearMidWords(FX_INT32 nBeginIndex, FX_INT32 nEndIndex);
+ void ClearLeftWords(int32_t nWordIndex);
+ void ClearRightWords(int32_t nWordIndex);
+ void ClearMidWords(int32_t nBeginIndex, int32_t nEndIndex);
CPDF_VariableText *m_pVT;
};
@@ -414,7 +414,7 @@ public:
{
CPDF_EditContainer::SetPlateRect(rect);
}
- void SetAlignment(FX_INT32 nFormat = 0)
+ void SetAlignment(int32_t nFormat = 0)
{
m_nAlignment = nFormat;
}
@@ -422,7 +422,7 @@ public:
{
m_wSubWord = wSubWord;
}
- void SetLimitChar(FX_INT32 nLimitChar = 0)
+ void SetLimitChar(int32_t nLimitChar = 0)
{
m_nLimitChar = nLimitChar;
}
@@ -430,7 +430,7 @@ public:
{
m_fCharSpace = fCharSpace;
}
- void SetHorzScale(FX_INT32 nHorzScale = 100)
+ void SetHorzScale(int32_t nHorzScale = 100)
{
m_nHorzScale = nHorzScale;
}
@@ -446,7 +446,7 @@ public:
{
m_fFontSize = fFontSize;
}
- void SetCharArray(FX_INT32 nCharArray = 0)
+ void SetCharArray(int32_t nCharArray = 0)
{
m_nCharArray = nCharArray;
}
@@ -474,13 +474,13 @@ public:
void RearrangeAll();
void RearrangePart(const CPVT_WordRange & PlaceRange);
void ResetAll();
- void SetText(FX_LPCWSTR text, FX_INT32 charset = 1, const CPVT_SecProps * pSecProps = NULL,
+ void SetText(FX_LPCWSTR text, int32_t charset = 1, const CPVT_SecProps * pSecProps = NULL,
const CPVT_WordProps * pWordProps = NULL);
- CPVT_WordPlace InsertWord(const CPVT_WordPlace & place, FX_WORD word, FX_INT32 charset = 1,
+ CPVT_WordPlace InsertWord(const CPVT_WordPlace & place, FX_WORD word, int32_t charset = 1,
const CPVT_WordProps * pWordProps = NULL);
CPVT_WordPlace InsertSection(const CPVT_WordPlace & place, const CPVT_SecProps * pSecProps = NULL,
const CPVT_WordProps * pWordProps = NULL);
- CPVT_WordPlace InsertText(const CPVT_WordPlace & place, FX_LPCWSTR text, FX_INT32 charset = 1,
+ CPVT_WordPlace InsertText(const CPVT_WordPlace & place, FX_LPCWSTR text, int32_t charset = 1,
const CPVT_SecProps * pSecProps = NULL, const CPVT_WordProps * pWordProps = NULL);
CPVT_WordPlace DeleteWords(const CPVT_WordRange & PlaceRange);
CPVT_WordPlace DeleteWord(const CPVT_WordPlace & place);
@@ -490,20 +490,20 @@ public:
return CPDF_EditContainer::GetPlateRect();
}
CPDF_Rect GetContentRect() const;
- FX_INT32 GetTotalWords() const;
+ int32_t GetTotalWords() const;
FX_FLOAT GetFontSize() const
{
return m_fFontSize;
}
- FX_INT32 GetAlignment() const
+ int32_t GetAlignment() const
{
return m_nAlignment;
}
- FX_INT32 GetCharArray() const
+ int32_t GetCharArray() const
{
return m_nCharArray;
}
- FX_INT32 GetLimitChar() const
+ int32_t GetLimitChar() const
{
return m_nLimitChar;
}
@@ -511,7 +511,7 @@ public:
{
return m_bMultiLine;
}
- FX_INT32 GetHorzScale() const
+ int32_t GetHorzScale() const
{
return m_nHorzScale;
}
@@ -532,8 +532,8 @@ public:
CPVT_WordPlace GetSectionBeginPlace(const CPVT_WordPlace & place) const;
CPVT_WordPlace GetSectionEndPlace(const CPVT_WordPlace & place) const;
void UpdateWordPlace(CPVT_WordPlace & place) const;
- FX_INT32 WordPlaceToWordIndex(const CPVT_WordPlace & place) const;
- CPVT_WordPlace WordIndexToWordPlace(FX_INT32 index) const;
+ int32_t WordPlaceToWordIndex(const CPVT_WordPlace & place) const;
+ CPVT_WordPlace WordIndexToWordPlace(int32_t index) const;
FX_WORD GetPasswordChar() const
{
return GetSubWord();
@@ -543,11 +543,11 @@ public:
return m_wSubWord;
}
private:
- FX_INT32 GetCharWidth(FX_INT32 nFontIndex, FX_WORD Word, FX_WORD SubWord, FX_INT32 nWordStyle);
- FX_INT32 GetTypeAscent(FX_INT32 nFontIndex);
- FX_INT32 GetTypeDescent(FX_INT32 nFontIndex);
- FX_INT32 GetWordFontIndex(FX_WORD word, FX_INT32 charset, FX_INT32 nFontIndex);
- FX_INT32 GetDefaultFontIndex();
+ int32_t GetCharWidth(int32_t nFontIndex, FX_WORD Word, FX_WORD SubWord, int32_t nWordStyle);
+ int32_t GetTypeAscent(int32_t nFontIndex);
+ int32_t GetTypeDescent(int32_t nFontIndex);
+ int32_t GetWordFontIndex(FX_WORD word, int32_t charset, int32_t nFontIndex);
+ int32_t GetDefaultFontIndex();
FX_BOOL IsLatinWord(FX_WORD word);
private:
@@ -559,9 +559,9 @@ private:
FX_BOOL GetLineInfo(const CPVT_WordPlace & place, CPVT_LineInfo & lineinfo);
FX_BOOL GetSectionInfo(const CPVT_WordPlace & place, CPVT_SectionInfo & secinfo);
FX_FLOAT GetWordFontSize(const CPVT_WordInfo & WordInfo, FX_BOOL bFactFontSize = FALSE);
- FX_FLOAT GetWordWidth(FX_INT32 nFontIndex, FX_WORD Word, FX_WORD SubWord,
- FX_FLOAT fCharSpace, FX_INT32 nHorzScale,
- FX_FLOAT fFontSize, FX_FLOAT fWordTail, FX_INT32 nWordStyle);
+ FX_FLOAT GetWordWidth(int32_t nFontIndex, FX_WORD Word, FX_WORD SubWord,
+ FX_FLOAT fCharSpace, int32_t nHorzScale,
+ FX_FLOAT fFontSize, FX_FLOAT fWordTail, int32_t nWordStyle);
FX_FLOAT GetWordWidth(const CPVT_WordInfo & WordInfo);
FX_FLOAT GetWordAscent(const CPVT_WordInfo & WordInfo, FX_FLOAT fFontSize);
FX_FLOAT GetWordDescent(const CPVT_WordInfo & WordInfo, FX_FLOAT fFontSize);
@@ -569,14 +569,14 @@ private:
FX_FLOAT GetWordDescent(const CPVT_WordInfo & WordInfo, FX_BOOL bFactFontSize = FALSE);
FX_FLOAT GetLineAscent(const CPVT_SectionInfo & SecInfo);
FX_FLOAT GetLineDescent(const CPVT_SectionInfo & SecInfo);
- FX_FLOAT GetFontAscent(FX_INT32 nFontIndex, FX_FLOAT fFontSize);
- FX_FLOAT GetFontDescent(FX_INT32 nFontIndex, FX_FLOAT fFontSize);
- FX_INT32 GetWordFontIndex(const CPVT_WordInfo & WordInfo);
+ FX_FLOAT GetFontAscent(int32_t nFontIndex, FX_FLOAT fFontSize);
+ FX_FLOAT GetFontDescent(int32_t nFontIndex, FX_FLOAT fFontSize);
+ int32_t GetWordFontIndex(const CPVT_WordInfo & WordInfo);
FX_FLOAT GetCharSpace(const CPVT_WordInfo & WordInfo);
- FX_INT32 GetHorzScale(const CPVT_WordInfo & WordInfo);
+ int32_t GetHorzScale(const CPVT_WordInfo & WordInfo);
FX_FLOAT GetLineLeading(const CPVT_SectionInfo & SecInfo);
FX_FLOAT GetLineIndent(const CPVT_SectionInfo & SecInfo);
- FX_INT32 GetAlignment(const CPVT_SectionInfo& SecInfo);
+ int32_t GetAlignment(const CPVT_SectionInfo& SecInfo);
void ClearSectionRightWords(const CPVT_WordPlace & place);
CPVT_WordPlace AjustLineHeader(const CPVT_WordPlace & place, FX_BOOL bPrevOrNext) const;
@@ -595,15 +595,15 @@ private:
void ResetSectionArray();
private:
CPVT_ArrayTemplate<CSection*> m_SectionArray;
- FX_INT32 m_nLimitChar;
- FX_INT32 m_nCharArray;
+ int32_t m_nLimitChar;
+ int32_t m_nCharArray;
FX_BOOL m_bMultiLine;
FX_BOOL m_bLimitWidth;
FX_BOOL m_bAutoFontSize;
- FX_INT32 m_nAlignment;
+ int32_t m_nAlignment;
FX_FLOAT m_fLineLeading;
FX_FLOAT m_fCharSpace;
- FX_INT32 m_nHorzScale;
+ int32_t m_nHorzScale;
FX_WORD m_wSubWord;
FX_FLOAT m_fFontSize;
@@ -629,7 +629,7 @@ public:
FX_BOOL GetLine(CPVT_Line & line) const;
FX_BOOL GetSection(CPVT_Section & section) const;
FX_BOOL SetSection(const CPVT_Section & section);
- void SetAt(FX_INT32 nWordIndex);
+ void SetAt(int32_t nWordIndex);
void SetAt(const CPVT_WordPlace & place);
const CPVT_WordPlace & GetAt() const
{