diff options
Diffstat (limited to 'xfa/src/fgas/include')
-rw-r--r-- | xfa/src/fgas/include/fx_alg.h | 14 | ||||
-rw-r--r-- | xfa/src/fgas/include/fx_cpg.h | 62 | ||||
-rw-r--r-- | xfa/src/fgas/include/fx_datetime.h | 112 | ||||
-rw-r--r-- | xfa/src/fgas/include/fx_fnt.h | 36 | ||||
-rw-r--r-- | xfa/src/fgas/include/fx_lbk.h | 4 | ||||
-rw-r--r-- | xfa/src/fgas/include/fx_locale.h | 30 | ||||
-rw-r--r-- | xfa/src/fgas/include/fx_mem.h | 2 | ||||
-rw-r--r-- | xfa/src/fgas/include/fx_rbk.h | 68 | ||||
-rw-r--r-- | xfa/src/fgas/include/fx_sax.h | 4 | ||||
-rw-r--r-- | xfa/src/fgas/include/fx_stm.h | 26 | ||||
-rw-r--r-- | xfa/src/fgas/include/fx_sys.h | 30 | ||||
-rw-r--r-- | xfa/src/fgas/include/fx_tbk.h | 66 | ||||
-rw-r--r-- | xfa/src/fgas/include/fx_ucd.h | 2 | ||||
-rw-r--r-- | xfa/src/fgas/include/fx_utl.h | 230 |
14 files changed, 343 insertions, 343 deletions
diff --git a/xfa/src/fgas/include/fx_alg.h b/xfa/src/fgas/include/fx_alg.h index ed946641f2..0ee8508083 100644 --- a/xfa/src/fgas/include/fx_alg.h +++ b/xfa/src/fgas/include/fx_alg.h @@ -10,11 +10,11 @@ #ifdef __cplusplus
extern "C" {
#endif
-FX_INT32 FX_Base64EncodeA(FX_LPCBYTE pSrc, FX_INT32 iSrcLen, FX_LPSTR pDst);
-FX_INT32 FX_Base64DecodeA(FX_LPCSTR pSrc, FX_INT32 iSrcLen, FX_LPBYTE pDst);
-FX_INT32 FX_Base64DecodeW(FX_LPCWSTR pSrc, FX_INT32 iSrcLen, FX_LPBYTE pDst);
-FX_BYTE FX_Hex2Dec(FX_BYTE hexHigh, FX_BYTE hexLow);
-FX_INT32 FX_SeparateStringW(FX_LPCWSTR pStr, FX_INT32 iStrLen, FX_WCHAR delimiter, CFX_WideStringArray &pieces);
+int32_t FX_Base64EncodeA(FX_LPCBYTE pSrc, int32_t iSrcLen, FX_LPSTR pDst);
+int32_t FX_Base64DecodeA(FX_LPCSTR pSrc, int32_t iSrcLen, FX_LPBYTE pDst);
+int32_t FX_Base64DecodeW(FX_LPCWSTR pSrc, int32_t iSrcLen, FX_LPBYTE pDst);
+uint8_t FX_Hex2Dec(uint8_t hexHigh, uint8_t hexLow);
+int32_t FX_SeparateStringW(FX_LPCWSTR pStr, int32_t iStrLen, FX_WCHAR delimiter, CFX_WideStringArray &pieces);
#ifdef __cplusplus
};
#endif
@@ -22,13 +22,13 @@ template<class baseType> class CFX_DSPATemplate
{
public:
- FX_INT32 Lookup(const baseType &find, const baseType *pArray, FX_INT32 iCount)
+ int32_t Lookup(const baseType &find, const baseType *pArray, int32_t iCount)
{
FXSYS_assert(pArray != NULL);
if (iCount < 1) {
return -1;
}
- FX_INT32 iStart = 0, iEnd = iCount - 1, iMid;
+ int32_t iStart = 0, iEnd = iCount - 1, iMid;
do {
iMid = (iStart + iEnd) / 2;
const baseType &v = pArray[iMid];
diff --git a/xfa/src/fgas/include/fx_cpg.h b/xfa/src/fgas/include/fx_cpg.h index 43c6520152..2556426dbc 100644 --- a/xfa/src/fgas/include/fx_cpg.h +++ b/xfa/src/fgas/include/fx_cpg.h @@ -130,28 +130,28 @@ class IFX_CodePage; #define FX_CHARSET_MSWin_EasterEuropean 238
#define FX_CHARSET_US 254
#define FX_CHARSET_OEM 255
-FX_WORD FX_GetCodePageFromCharset(FX_BYTE charset);
+FX_WORD FX_GetCodePageFromCharset(uint8_t charset);
FX_WORD FX_GetCharsetFromCodePage(FX_WORD codepage);
-FX_WORD FX_GetCodePageFromStringA(FX_LPCSTR pStr, FX_INT32 iLength);
-FX_WORD FX_GetCodePageFormStringW(FX_LPCWSTR pStr, FX_INT32 iLength);
+FX_WORD FX_GetCodePageFromStringA(FX_LPCSTR pStr, int32_t iLength);
+FX_WORD FX_GetCodePageFormStringW(FX_LPCWSTR pStr, int32_t iLength);
FX_WORD FX_GetDefCodePageByLanguage(FX_WORD wLanguage);
-void FX_SwapByteOrder(FX_LPWSTR pStr, FX_INT32 iLength);
-void FX_SwapByteOrderCopy(FX_LPCWSTR pSrc, FX_LPWSTR pDst, FX_INT32 iLength);
-void FX_UTF16ToWChar(FX_LPVOID pBuffer, FX_INT32 iLength);
-void FX_UTF16ToWCharCopy(const FX_WORD *pUTF16, FX_LPWSTR pWChar, FX_INT32 iLength);
-void FX_WCharToUTF16(FX_LPVOID pBuffer, FX_INT32 iLength);
-void FX_WCharToUTF16Copy(FX_LPCWSTR pWChar, FX_WORD *pUTF16, FX_INT32 iLength);
-FX_INT32 FX_DecodeString(FX_WORD wCodePage, FX_LPCSTR pSrc, FX_INT32 *pSrcLen, FX_LPWSTR pDst, FX_INT32 *pDstLen, FX_BOOL bErrBreak = FALSE);
-FX_INT32 FX_UTF8Decode(FX_LPCSTR pSrc, FX_INT32 *pSrcLen, FX_LPWSTR pDst, FX_INT32 *pDstLen);
+void FX_SwapByteOrder(FX_LPWSTR pStr, int32_t iLength);
+void FX_SwapByteOrderCopy(FX_LPCWSTR pSrc, FX_LPWSTR pDst, int32_t iLength);
+void FX_UTF16ToWChar(FX_LPVOID pBuffer, int32_t iLength);
+void FX_UTF16ToWCharCopy(const FX_WORD *pUTF16, FX_LPWSTR pWChar, int32_t iLength);
+void FX_WCharToUTF16(FX_LPVOID pBuffer, int32_t iLength);
+void FX_WCharToUTF16Copy(FX_LPCWSTR pWChar, FX_WORD *pUTF16, int32_t iLength);
+int32_t FX_DecodeString(FX_WORD wCodePage, FX_LPCSTR pSrc, int32_t *pSrcLen, FX_LPWSTR pDst, int32_t *pDstLen, FX_BOOL bErrBreak = FALSE);
+int32_t FX_UTF8Decode(FX_LPCSTR pSrc, int32_t *pSrcLen, FX_LPWSTR pDst, int32_t *pDstLen);
enum FX_CODESYSTEM {
FX_MBCS = 0,
FX_SBCS ,
FX_DBCS ,
};
typedef struct _FX_CODEPAGE_HEADER {
- FX_UINT16 uCPID;
- FX_UINT8 uMinCharBytes;
- FX_UINT8 uMaxCharBytes;
+ uint16_t uCPID;
+ uint8_t uMinCharBytes;
+ uint8_t uMaxCharBytes;
FX_CODESYSTEM eCPType;
FX_BOOL bHasLeadByte;
FX_WCHAR wMinChar;
@@ -166,13 +166,13 @@ typedef struct _FX_CODEPAGE_HEADER { #define FX_CPMAPTYPE_NoMapping 3
#define FX_CPMAPTYPE_Delta 4
typedef struct _FX_CPCU_MAPTABLE1 {
- FX_UINT16 uMapType;
- FX_UINT16 uUniocde;
+ uint16_t uMapType;
+ uint16_t uUniocde;
} FX_CPCU_MAPTABLE1;
typedef struct _FX_CPCU_MAPTABLE2 {
- FX_UINT8 uTrailByte;
- FX_UINT8 uMapType;
- FX_UINT16 uOffset;
+ uint8_t uTrailByte;
+ uint8_t uMapType;
+ uint16_t uOffset;
} FX_CPCU_MAPTABLE2;
typedef struct _FX_CPCU_MAPINFO {
FX_CPCU_MAPTABLE1 *pMapTable1;
@@ -180,13 +180,13 @@ typedef struct _FX_CPCU_MAPINFO { FX_LPCBYTE pMapData;
} FX_CPCU_MAPINFO;
typedef struct _FX_CPUC_MAPTABLE {
- FX_UINT16 uStartUnicode;
- FX_UINT16 uEndUnicode;
- FX_UINT16 uMapType;
- FX_UINT16 uOffset;
+ uint16_t uStartUnicode;
+ uint16_t uEndUnicode;
+ uint16_t uMapType;
+ uint16_t uOffset;
} FX_CPUC_MAPTABLE;
typedef struct _FX_CPUC_MAPINFO {
- FX_UINT32 uMapCount;
+ uint32_t uMapCount;
FX_CPUC_MAPTABLE *pMapTable;
FX_LPCBYTE pMapData;
} FX_CPUC_MAPINFO;
@@ -197,12 +197,12 @@ typedef struct _FX_CODEPAGE { } FX_CODEPAGE, * FX_LPCODEPAGE;
typedef FX_CODEPAGE const * FX_LPCCODEPAGE;
typedef struct _FX_STR2CPHASH {
- FX_UINT32 uHash;
- FX_UINT32 uCodePage;
+ uint32_t uHash;
+ uint32_t uCodePage;
} FX_STR2CPHASH;
typedef struct _FX_CHARSET_MAP {
- FX_UINT16 charset;
- FX_UINT16 codepage;
+ uint16_t charset;
+ uint16_t codepage;
} FX_CHARSET_MAP;
typedef struct _FX_LANG2CPMAP {
FX_WORD wLanguage;
@@ -216,9 +216,9 @@ public: virtual FX_WORD GetCodePageNumber() const = 0;
virtual FX_CODESYSTEM GetCodeSystemType() const = 0;
virtual FX_BOOL HasLeadByte() const = 0;
- virtual FX_BOOL IsLeadByte(FX_BYTE byte) const = 0;
- virtual FX_INT32 GetMinBytesPerChar() const = 0;
- virtual FX_INT32 GetMaxBytesPerChar() const = 0;
+ virtual FX_BOOL IsLeadByte(uint8_t byte) const = 0;
+ virtual int32_t GetMinBytesPerChar() const = 0;
+ virtual int32_t GetMaxBytesPerChar() const = 0;
virtual FX_WCHAR GetMinCharcode() const = 0;
virtual FX_WCHAR GetMaxCharcode() const = 0;
virtual FX_WCHAR GetDefCharcode() const = 0;
diff --git a/xfa/src/fgas/include/fx_datetime.h b/xfa/src/fgas/include/fx_datetime.h index d18b899fc6..dcaf18398f 100644 --- a/xfa/src/fgas/include/fx_datetime.h +++ b/xfa/src/fgas/include/fx_datetime.h @@ -8,7 +8,7 @@ #define _FX_DATETIME_H_
class CFX_Unitime;
class CFX_DateTime;
-typedef FX_INT64 FX_UNITIME;
+typedef int64_t FX_UNITIME;
enum FX_WEEKDAY {
FX_Sunday = 0,
FX_Monday ,
@@ -18,9 +18,9 @@ enum FX_WEEKDAY { FX_Friday ,
FX_Saturday ,
};
-FX_BOOL FX_IsLeapYear(FX_INT32 iYear);
-FX_INT32 FX_DaysInYear(FX_INT32 iYear);
-FX_BYTE FX_DaysInMonth(FX_INT32 iYear, FX_BYTE iMonth);
+FX_BOOL FX_IsLeapYear(int32_t iYear);
+int32_t FX_DaysInYear(int32_t iYear);
+uint8_t FX_DaysInMonth(int32_t iYear, uint8_t iMonth);
class CFX_Unitime
{
public:
@@ -84,25 +84,25 @@ public: }
void Now();
void SetGMTime();
- void Set(FX_INT32 year, FX_BYTE month, FX_BYTE day, FX_BYTE hour = 0, FX_BYTE minute = 0, FX_BYTE second = 0, FX_WORD millisecond = 0);
+ void Set(int32_t year, uint8_t month, uint8_t day, uint8_t hour = 0, uint8_t minute = 0, uint8_t second = 0, FX_WORD millisecond = 0);
void Set(FX_UNITIME t);
- FX_INT32 GetYear() const;
- FX_BYTE GetMonth() const;
- FX_BYTE GetDay() const;
+ int32_t GetYear() const;
+ uint8_t GetMonth() const;
+ uint8_t GetDay() const;
FX_WEEKDAY GetDayOfWeek() const;
FX_WORD GetDayOfYear() const;
- FX_INT64 GetDayOfAD() const;
- FX_BYTE GetHour() const;
- FX_BYTE GetMinute() const;
- FX_BYTE GetSecond() const;
+ int64_t GetDayOfAD() const;
+ uint8_t GetHour() const;
+ uint8_t GetMinute() const;
+ uint8_t GetSecond() const;
FX_WORD GetMillisecond() const;
- FX_BOOL AddYears(FX_INT32 iYears);
- FX_BOOL AddMonths(FX_INT32 iMonths);
- FX_BOOL AddDays(FX_INT32 iDays);
- FX_BOOL AddHours(FX_INT32 iHours);
- FX_BOOL AddMinutes(FX_INT32 iMinutes);
- FX_BOOL AddSeconds(FX_INT32 iSeconds);
- FX_BOOL AddMilliseconds(FX_INT32 iMilliseconds);
+ FX_BOOL AddYears(int32_t iYears);
+ FX_BOOL AddMonths(int32_t iMonths);
+ FX_BOOL AddDays(int32_t iDays);
+ FX_BOOL AddHours(int32_t iHours);
+ FX_BOOL AddMinutes(int32_t iMinutes);
+ FX_BOOL AddSeconds(int32_t iSeconds);
+ FX_BOOL AddMilliseconds(int32_t iMilliseconds);
friend CFX_Unitime operator + (const CFX_Unitime &t1, const CFX_Unitime &t2)
{
return CFX_Unitime(t1.m_iUnitime + t2.m_iUnitime);
@@ -206,37 +206,37 @@ private: #pragma pack(push, 1)
#endif
typedef struct _FX_DATE {
- FX_INT32 year;
- FX_BYTE month;
- FX_BYTE day;
+ int32_t year;
+ uint8_t month;
+ uint8_t day;
} FX_DATE, * FX_LPDATE;
typedef FX_DATE const * FX_LPCDATE;
typedef struct _FX_TIME {
- FX_BYTE hour;
- FX_BYTE minute;
- FX_BYTE second;
+ uint8_t hour;
+ uint8_t minute;
+ uint8_t second;
FX_WORD millisecond;
} FX_TIME, * FX_LPTIME;
typedef FX_TIME const * FX_LPCTIME;
typedef struct _FX_TIMEZONE {
- FX_INT8 tzHour;
- FX_BYTE tzMinute;
+ int8_t tzHour;
+ uint8_t tzMinute;
} FX_TIMEZONE, * FX_LPTIMEZONE;
typedef FX_TIMEZONE const * FX_LPCTIMEZONE;
typedef struct _FX_DATETIME {
union {
struct {
- FX_INT32 year;
- FX_BYTE month;
- FX_BYTE day;
+ int32_t year;
+ uint8_t month;
+ uint8_t day;
} sDate;
FX_DATE aDate;
} Date;
union {
struct {
- FX_BYTE hour;
- FX_BYTE minute;
- FX_BYTE second;
+ uint8_t hour;
+ uint8_t minute;
+ uint8_t second;
FX_WORD millisecond;
} sTime;
FX_TIME aTime;
@@ -248,17 +248,17 @@ typedef struct _FX_DATETIMEZONE { struct {
union {
struct {
- FX_INT32 year;
- FX_BYTE month;
- FX_BYTE day;
+ int32_t year;
+ uint8_t month;
+ uint8_t day;
};
FX_DATE date;
};
union {
struct {
- FX_BYTE hour;
- FX_BYTE minute;
- FX_BYTE second;
+ uint8_t hour;
+ uint8_t minute;
+ uint8_t second;
FX_WORD millisecond;
};
FX_TIME time;
@@ -268,8 +268,8 @@ typedef struct _FX_DATETIMEZONE { };
union {
struct {
- FX_INT8 tzHour;
- FX_BYTE tzMinute;
+ int8_t tzHour;
+ uint8_t tzMinute;
};
FX_TIMEZONE tz;
};
@@ -336,26 +336,26 @@ public: FromUnitime(ToUnitime() - ((const CFX_DateTime&)dt).ToUnitime());
return *this;
}
- virtual FX_BOOL Set(FX_INT32 year, FX_BYTE month, FX_BYTE day, FX_BYTE hour = 0, FX_BYTE minute = 0, FX_BYTE second = 0, FX_WORD millisecond = 0);
+ virtual FX_BOOL Set(int32_t year, uint8_t month, uint8_t day, uint8_t hour = 0, uint8_t minute = 0, uint8_t second = 0, FX_WORD millisecond = 0);
virtual FX_BOOL FromUnitime(FX_UNITIME t);
virtual FX_UNITIME ToUnitime() const;
- virtual FX_INT32 GetYear() const;
- virtual FX_BYTE GetMonth() const;
- virtual FX_BYTE GetDay() const;
+ virtual int32_t GetYear() const;
+ virtual uint8_t GetMonth() const;
+ virtual uint8_t GetDay() const;
virtual FX_WEEKDAY GetDayOfWeek() const;
virtual FX_WORD GetDayOfYear() const;
- virtual FX_INT64 GetDayOfAD() const;
- virtual FX_BYTE GetHour() const;
- virtual FX_BYTE GetMinute() const;
- virtual FX_BYTE GetSecond() const;
+ virtual int64_t GetDayOfAD() const;
+ virtual uint8_t GetHour() const;
+ virtual uint8_t GetMinute() const;
+ virtual uint8_t GetSecond() const;
virtual FX_WORD GetMillisecond() const;
- virtual FX_BOOL AddYears(FX_INT32 iYears);
- virtual FX_BOOL AddMonths(FX_INT32 iMonths);
- virtual FX_BOOL AddDays(FX_INT32 iDays);
- virtual FX_BOOL AddHours(FX_INT32 iHours);
- virtual FX_BOOL AddMinutes(FX_INT32 iMinutes);
- virtual FX_BOOL AddSeconds(FX_INT32 iSeconds);
- virtual FX_BOOL AddMilliseconds(FX_INT32 iMilliseconds);
+ virtual FX_BOOL AddYears(int32_t iYears);
+ virtual FX_BOOL AddMonths(int32_t iMonths);
+ virtual FX_BOOL AddDays(int32_t iDays);
+ virtual FX_BOOL AddHours(int32_t iHours);
+ virtual FX_BOOL AddMinutes(int32_t iMinutes);
+ virtual FX_BOOL AddSeconds(int32_t iSeconds);
+ virtual FX_BOOL AddMilliseconds(int32_t iMilliseconds);
friend CFX_DateTime operator + (const CFX_DateTime &dt1, const CFX_DateTime &dt2)
{
CFX_DateTime dt;
diff --git a/xfa/src/fgas/include/fx_fnt.h b/xfa/src/fgas/include/fx_fnt.h index 491feaea37..85d6e3edff 100644 --- a/xfa/src/fgas/include/fx_fnt.h +++ b/xfa/src/fgas/include/fx_fnt.h @@ -40,13 +40,13 @@ class IFX_FontMgr; class IFX_FontProvider
{
public:
- virtual FX_BOOL GetCharWidth(IFX_Font* pFont, FX_WCHAR wUnicode, FX_INT32 &iWidth, FX_BOOL bCharCode = FALSE) = 0;
+ virtual FX_BOOL GetCharWidth(IFX_Font* pFont, FX_WCHAR wUnicode, int32_t &iWidth, FX_BOOL bCharCode = FALSE) = 0;
};
class IFX_Font
{
public:
static IFX_Font* LoadFont(FX_LPCWSTR pszFontFamily, FX_DWORD dwFontStyles, FX_WORD wCodePage, IFX_FontMgr *pFontMgr);
- static IFX_Font* LoadFont(FX_LPCBYTE pBuffer, FX_INT32 iLength, IFX_FontMgr *pFontMgr);
+ static IFX_Font* LoadFont(FX_LPCBYTE pBuffer, int32_t iLength, IFX_FontMgr *pFontMgr);
static IFX_Font* LoadFont(FX_LPCWSTR pszFileName, IFX_FontMgr *pFontMgr);
static IFX_Font* LoadFont(IFX_Stream *pFontStream, IFX_FontMgr *pFontMgr, FX_BOOL bSaveStream = FALSE);
static IFX_Font* LoadFont(CFX_Font *pExtFont, IFX_FontMgr *pFontMgr, FX_BOOL bTakeOver = FALSE);
@@ -56,16 +56,16 @@ public: virtual void GetFamilyName(CFX_WideString &wsFamily) const = 0;
virtual void GetPsName(CFX_WideString &wsName) const = 0;
virtual FX_DWORD GetFontStyles() const = 0;
- virtual FX_BYTE GetCharSet() const = 0;
- virtual FX_BOOL GetCharWidth(FX_WCHAR wUnicode, FX_INT32 &iWidth, FX_BOOL bCharCode = FALSE) = 0;
- virtual FX_INT32 GetGlyphIndex(FX_WCHAR wUnicode, FX_BOOL bCharCode = FALSE) = 0;
- virtual FX_INT32 GetAscent() const = 0;
- virtual FX_INT32 GetDescent() const = 0;
+ virtual uint8_t GetCharSet() const = 0;
+ virtual FX_BOOL GetCharWidth(FX_WCHAR wUnicode, int32_t &iWidth, FX_BOOL bCharCode = FALSE) = 0;
+ virtual int32_t GetGlyphIndex(FX_WCHAR wUnicode, FX_BOOL bCharCode = FALSE) = 0;
+ virtual int32_t GetAscent() const = 0;
+ virtual int32_t GetDescent() const = 0;
virtual FX_BOOL GetCharBBox(FX_WCHAR wUnicode, CFX_Rect &bbox, FX_BOOL bCharCode = FALSE) = 0;
virtual FX_BOOL GetBBox(CFX_Rect &bbox) = 0;
- virtual FX_INT32 GetItalicAngle() const = 0;
+ virtual int32_t GetItalicAngle() const = 0;
virtual void Reset() = 0;
- virtual IFX_Font* GetSubstFont(FX_INT32 iGlyphIndex) const = 0;
+ virtual IFX_Font* GetSubstFont(int32_t iGlyphIndex) const = 0;
virtual void* GetDevFont() const = 0;
virtual void SetFontProvider(IFX_FontProvider* pProvider) = 0;
#if _FXM_PLATFORM_ != _FXM_PLATFORM_WINDOWS_
@@ -89,7 +89,7 @@ typedef struct _FX_FONTSIGNATURE : public CFX_Target { typedef struct _FX_FONTDESCRIPTOR : public CFX_Target {
FX_WCHAR wsFontFace[32];
FX_DWORD dwFontStyles;
- FX_BYTE uCharSet;
+ uint8_t uCharSet;
FX_FONTSIGNATURE FontSignature;
} FX_FONTDESCRIPTOR, * FX_LPFONTDESCRIPTOR;
typedef FX_FONTDESCRIPTOR const * FX_LPCFONTDESCRIPTOR;
@@ -114,11 +114,11 @@ public: static IFX_FontMgr* Create(FX_LPEnumAllFonts pEnumerator, FX_LPMatchFont pMatcher = NULL, FX_LPVOID pUserData = NULL);
virtual void Release() = 0;
virtual IFX_Font* GetDefFontByCodePage(FX_WORD wCodePage, FX_DWORD dwFontStyles, FX_LPCWSTR pszFontFamily = NULL) = 0;
- virtual IFX_Font* GetDefFontByCharset(FX_BYTE nCharset, FX_DWORD dwFontStyles, FX_LPCWSTR pszFontFamily = NULL) = 0;
+ virtual IFX_Font* GetDefFontByCharset(uint8_t nCharset, FX_DWORD dwFontStyles, FX_LPCWSTR pszFontFamily = NULL) = 0;
virtual IFX_Font* GetDefFontByUnicode(FX_WCHAR wUnicode, FX_DWORD dwFontStyles, FX_LPCWSTR pszFontFamily = NULL) = 0;
virtual IFX_Font* GetDefFontByLanguage(FX_WORD wLanguage, FX_DWORD dwFontStyles, FX_LPCWSTR pszFontFamily = NULL) = 0;
virtual IFX_Font* LoadFont(FX_LPCWSTR pszFontFamily, FX_DWORD dwFontStyles, FX_WORD wCodePage = 0xFFFF) = 0;
- virtual IFX_Font* LoadFont(FX_LPCBYTE pBuffer, FX_INT32 iLength) = 0;
+ virtual IFX_Font* LoadFont(FX_LPCBYTE pBuffer, int32_t iLength) = 0;
virtual IFX_Font* LoadFont(FX_LPCWSTR pszFileName) = 0;
virtual IFX_Font* LoadFont(IFX_Stream *pFontStream, FX_LPCWSTR pszFontAlias = NULL, FX_DWORD dwFontStyles = 0, FX_WORD wCodePage = 0, FX_BOOL bSaveStream = FALSE) = 0;
virtual IFX_Font* LoadFont(IFX_Font *pSrcFont, FX_DWORD dwFontStyles, FX_WORD wCodePage = 0xFFFF) = 0;
@@ -130,7 +130,7 @@ class IFX_FontMgrDelegate {
public:
virtual IFX_Font* GetDefFontByCodePage(IFX_FontMgr* pFontMgr, FX_WORD wCodePage, FX_DWORD dwFontStyles, FX_LPCWSTR pszFontFamily = NULL) = 0;
- virtual IFX_Font* GetDefFontByCharset(IFX_FontMgr* pFontMgr, FX_BYTE nCharset, FX_DWORD dwFontStyles, FX_LPCWSTR pszFontFamily = NULL) = 0;
+ virtual IFX_Font* GetDefFontByCharset(IFX_FontMgr* pFontMgr, uint8_t nCharset, FX_DWORD dwFontStyles, FX_LPCWSTR pszFontFamily = NULL) = 0;
virtual IFX_Font* GetDefFontByUnicode(IFX_FontMgr* pFontMgr, FX_WCHAR wUnicode, FX_DWORD dwFontStyles, FX_LPCWSTR pszFontFamily = NULL) = 0;
virtual IFX_Font* GetDefFontByLanguage(IFX_FontMgr* pFontMgr, FX_WORD wLanguage, FX_DWORD dwFontStyles, FX_LPCWSTR pszFontFamily = NULL) = 0;
};
@@ -148,7 +148,7 @@ public: static IFX_FontMgr* Create(IFX_FontSourceEnum* pFontEnum, IFX_FontMgrDelegate* pDelegate = NULL, FX_LPVOID pUserData = NULL);
virtual void Release() = 0;
virtual IFX_Font* GetDefFontByCodePage(FX_WORD wCodePage, FX_DWORD dwFontStyles, FX_LPCWSTR pszFontFamily = NULL) = 0;
- virtual IFX_Font* GetDefFontByCharset(FX_BYTE nCharset, FX_DWORD dwFontStyles, FX_LPCWSTR pszFontFamily = NULL) = 0;
+ virtual IFX_Font* GetDefFontByCharset(uint8_t nCharset, FX_DWORD dwFontStyles, FX_LPCWSTR pszFontFamily = NULL) = 0;
virtual IFX_Font* GetDefFontByUnicode(FX_WCHAR wUnicode, FX_DWORD dwFontStyles, FX_LPCWSTR pszFontFamily = NULL) = 0;
virtual IFX_Font* GetDefFontByLanguage(FX_WORD wLanguage, FX_DWORD dwFontStyles, FX_LPCWSTR pszFontFamily = NULL) = 0;
virtual IFX_Font* GetFontByCodePage(FX_WORD wCodePage, FX_DWORD dwFontStyles, FX_LPCWSTR pszFontFamily = NULL) = 0;
@@ -156,12 +156,12 @@ public: {
return GetFontByCodePage(wCodePage, dwFontStyles, pszFontFamily);
}
- virtual IFX_Font* GetFontByCharset(FX_BYTE nCharset, FX_DWORD dwFontStyles, FX_LPCWSTR pszFontFamily = NULL) = 0;
+ virtual IFX_Font* GetFontByCharset(uint8_t nCharset, FX_DWORD dwFontStyles, FX_LPCWSTR pszFontFamily = NULL) = 0;
virtual IFX_Font* GetFontByUnicode(FX_WCHAR wUnicode, FX_DWORD dwFontStyles, FX_LPCWSTR pszFontFamily = NULL) = 0;
virtual IFX_Font* GetFontByLanguage(FX_WORD wLanguage, FX_DWORD dwFontStyles, FX_LPCWSTR pszFontFamily = NULL) = 0;
- virtual IFX_Font* LoadFont(FX_LPCBYTE pBuffer, FX_INT32 iLength, FX_INT32 iFaceIndex, FX_INT32* pFaceCount = NULL) = 0;
- virtual IFX_Font* LoadFont(FX_LPCWSTR pszFileName, FX_INT32 iFaceIndex, FX_INT32* pFaceCount = NULL) = 0;
- virtual IFX_Font* LoadFont(IFX_Stream *pFontStream, FX_INT32 iFaceIndex, FX_INT32* pFaceCount = NULL, FX_BOOL bSaveStream = FALSE) = 0;
+ virtual IFX_Font* LoadFont(FX_LPCBYTE pBuffer, int32_t iLength, int32_t iFaceIndex, int32_t* pFaceCount = NULL) = 0;
+ virtual IFX_Font* LoadFont(FX_LPCWSTR pszFileName, int32_t iFaceIndex, int32_t* pFaceCount = NULL) = 0;
+ virtual IFX_Font* LoadFont(IFX_Stream *pFontStream, int32_t iFaceIndex, int32_t* pFaceCount = NULL, FX_BOOL bSaveStream = FALSE) = 0;
virtual void ClearFontCache() = 0;
virtual void RemoveFont(IFX_Font *pFont) = 0;
diff --git a/xfa/src/fgas/include/fx_lbk.h b/xfa/src/fgas/include/fx_lbk.h index 3c7aa5d7dd..f161bb4355 100644 --- a/xfa/src/fgas/include/fx_lbk.h +++ b/xfa/src/fgas/include/fx_lbk.h @@ -22,6 +22,6 @@ enum FX_LINEBREAKTYPE { #define FX_LBCP FX_LBT_COM_PROHIBITED_BRK
#define FX_LBPB FX_LBT_PROHIBITED_BRK
#define FX_LBHS FX_LBT_HANGUL_SPACE_BRK
-void FX_GetLineBreakPositions(FX_LPCWSTR pwsText, FX_LINEBREAKTYPE *pBrkType, FX_INT32 iLength);
-void FX_GetLineBreakPositions(FX_LPCWSTR pwsText, FX_INT32 iLength, CFX_Int32MassArray &bp);
+void FX_GetLineBreakPositions(FX_LPCWSTR pwsText, FX_LINEBREAKTYPE *pBrkType, int32_t iLength);
+void FX_GetLineBreakPositions(FX_LPCWSTR pwsText, int32_t iLength, CFX_Int32MassArray &bp);
#endif
diff --git a/xfa/src/fgas/include/fx_locale.h b/xfa/src/fgas/include/fx_locale.h index 25a6dda4e1..7f4cce5776 100644 --- a/xfa/src/fgas/include/fx_locale.h +++ b/xfa/src/fgas/include/fx_locale.h @@ -61,8 +61,8 @@ public: virtual void GetNumbericSymbol(FX_LOCALENUMSYMBOL eType, CFX_WideString& wsNumSymbol) const = 0;
virtual void GetDateTimeSymbols(CFX_WideString& wsDtSymbol) const = 0;
- virtual void GetMonthName(FX_INT32 nMonth, CFX_WideString& wsMonthName, FX_BOOL bAbbr = TRUE) const = 0;
- virtual void GetDayName(FX_INT32 nWeek, CFX_WideString& wsDayName, FX_BOOL bAbbr = TRUE) const = 0;
+ virtual void GetMonthName(int32_t nMonth, CFX_WideString& wsMonthName, FX_BOOL bAbbr = TRUE) const = 0;
+ virtual void GetDayName(int32_t nWeek, CFX_WideString& wsDayName, FX_BOOL bAbbr = TRUE) const = 0;
virtual void GetMeridiemName(CFX_WideString& wsMeridiemName, FX_BOOL bAM = TRUE) const = 0;
virtual void GetTimeZone(FX_TIMEZONE& tz) const = 0;
virtual void GetEraName(CFX_WideString& wsEraName, FX_BOOL bAD = TRUE) const = 0;
@@ -112,11 +112,11 @@ class CFX_Decimal {
public:
CFX_Decimal();
- CFX_Decimal(FX_UINT32 val);
- CFX_Decimal(FX_UINT64 val);
- CFX_Decimal(FX_INT32 val);
- CFX_Decimal(FX_INT64 val);
- CFX_Decimal(FX_FLOAT val, FX_UINT8 scale = 3);
+ CFX_Decimal(uint32_t val);
+ CFX_Decimal(uint64_t val);
+ CFX_Decimal(int32_t val);
+ CFX_Decimal(int64_t val);
+ CFX_Decimal(FX_FLOAT val, uint8_t scale = 3);
CFX_Decimal(FX_WSTR str);
CFX_Decimal(FX_BSTR str);
operator CFX_WideString() const;
@@ -132,29 +132,29 @@ public: CFX_Decimal operator * (const CFX_Decimal& val) const;
CFX_Decimal operator / (const CFX_Decimal& val) const;
CFX_Decimal operator % (const CFX_Decimal& val) const;
- void SetScale(FX_UINT8 newScale);
- FX_UINT8 GetScale();
+ void SetScale(uint8_t newScale);
+ uint8_t GetScale();
void SetAbs();
void SetNegate();
void SetFloor();
void SetCeiling();
void SetTruncate();
protected:
- CFX_Decimal(FX_UINT32 hi, FX_UINT32 mid, FX_UINT32 lo, FX_BOOL neg, FX_UINT8 scale);
+ CFX_Decimal(uint32_t hi, uint32_t mid, uint32_t lo, FX_BOOL neg, uint8_t scale);
inline FX_BOOL IsNotZero() const
{
return m_uHi || m_uMid || m_uLo;
}
- inline FX_INT8 Compare (const CFX_Decimal& val) const;
+ inline int8_t Compare (const CFX_Decimal& val) const;
inline void Swap(CFX_Decimal& val);
inline void FloorOrCeil(FX_BOOL bFloor);
CFX_Decimal AddOrMinus(const CFX_Decimal& val, FX_BOOL isAdding) const;
CFX_Decimal Multiply(const CFX_Decimal& val) const;
CFX_Decimal Divide(const CFX_Decimal& val) const;
CFX_Decimal Modulus(const CFX_Decimal& val) const;
- FX_UINT32 m_uFlags;
- FX_UINT32 m_uHi;
- FX_UINT32 m_uLo;
- FX_UINT32 m_uMid;
+ uint32_t m_uFlags;
+ uint32_t m_uHi;
+ uint32_t m_uLo;
+ uint32_t m_uMid;
};
#endif
diff --git a/xfa/src/fgas/include/fx_mem.h b/xfa/src/fgas/include/fx_mem.h index 18cd85e422..265c582884 100644 --- a/xfa/src/fgas/include/fx_mem.h +++ b/xfa/src/fgas/include/fx_mem.h @@ -31,7 +31,7 @@ class CFX_Target public:
void* operator new(size_t size)
{
- return FX_Alloc(FX_BYTE, size);
+ return FX_Alloc(uint8_t, size);
}
void operator delete(void *p)
{
diff --git a/xfa/src/fgas/include/fx_rbk.h b/xfa/src/fgas/include/fx_rbk.h index 3053fc5e1b..cff63ee490 100644 --- a/xfa/src/fgas/include/fx_rbk.h +++ b/xfa/src/fgas/include/fx_rbk.h @@ -69,17 +69,17 @@ typedef struct _FX_RTFTEXTOBJ { iVerticalScale = 100;
}
FX_LPCWSTR pStr;
- FX_INT32 *pWidths;
- FX_INT32 iLength;
+ int32_t *pWidths;
+ int32_t iLength;
IFX_Font *pFont;
FX_FLOAT fFontSize;
FX_DWORD dwLayoutStyles;
- FX_INT32 iCharRotation;
- FX_INT32 iBidiLevel;
+ int32_t iCharRotation;
+ int32_t iBidiLevel;
FX_LPCRECTF pRect;
FX_WCHAR wLineBreakChar;
- FX_INT32 iHorizontalScale;
- FX_INT32 iVerticalScale;
+ int32_t iHorizontalScale;
+ int32_t iVerticalScale;
} FX_RTFTEXTOBJ, * FX_LPRTFTEXTOBJ;
typedef FX_RTFTEXTOBJ const * FX_LPCRTFTEXTOBJ;
class CFX_RTFPiece : public CFX_Target
@@ -117,24 +117,24 @@ public: }
m_iChars ++;
}
- FX_INT32 GetEndPos() const
+ int32_t GetEndPos() const
{
return m_iWidth < 0 ? m_iStartPos : m_iStartPos + m_iWidth;
}
- FX_INT32 GetLength() const
+ int32_t GetLength() const
{
return m_iChars;
}
- FX_INT32 GetEndChar() const
+ int32_t GetEndChar() const
{
return m_iStartChar + m_iChars;
}
- CFX_RTFChar& GetChar(FX_INT32 index)
+ CFX_RTFChar& GetChar(int32_t index)
{
FXSYS_assert(index > -1 && index < m_iChars && m_pChars != NULL);
return *m_pChars->GetDataPtr(m_iStartChar + index);
}
- CFX_RTFChar* GetCharPtr(FX_INT32 index) const
+ CFX_RTFChar* GetCharPtr(int32_t index) const
{
FXSYS_assert(index > -1 && index < m_iChars && m_pChars != NULL);
return m_pChars->GetDataPtr(m_iStartChar + index);
@@ -142,9 +142,9 @@ public: void GetString (FX_LPWSTR pText) const
{
FXSYS_assert(pText != NULL);
- FX_INT32 iEndChar = m_iStartChar + m_iChars;
+ int32_t iEndChar = m_iStartChar + m_iChars;
CFX_RTFChar *pChar;
- for (FX_INT32 i = m_iStartChar; i < iEndChar; i ++) {
+ for (int32_t i = m_iStartChar; i < iEndChar; i ++) {
pChar = m_pChars->GetDataPtr(i);
*pText ++ = (FX_WCHAR)pChar->m_wCharCode;
}
@@ -155,12 +155,12 @@ public: GetString(pText);
wsText.ReleaseBuffer(m_iChars);
}
- void GetWidths(FX_INT32 *pWidths) const
+ void GetWidths(int32_t *pWidths) const
{
FXSYS_assert(pWidths != NULL);
- FX_INT32 iEndChar = m_iStartChar + m_iChars;
+ int32_t iEndChar = m_iStartChar + m_iChars;
CFX_RTFChar *pChar;
- for (FX_INT32 i = m_iStartChar; i < iEndChar; i ++) {
+ for (int32_t i = m_iStartChar; i < iEndChar; i ++) {
pChar = m_pChars->GetDataPtr(i);
*pWidths ++ = pChar->m_iCharWidth;
}
@@ -180,16 +180,16 @@ public: m_iVerticalScale = 100;
}
FX_DWORD m_dwStatus;
- FX_INT32 m_iStartPos;
- FX_INT32 m_iWidth;
- FX_INT32 m_iStartChar;
- FX_INT32 m_iChars;
- FX_INT32 m_iBidiLevel;
- FX_INT32 m_iBidiPos;
- FX_INT32 m_iFontSize;
- FX_INT32 m_iFontHeight;
- FX_INT32 m_iHorizontalScale;
- FX_INT32 m_iVerticalScale;
+ int32_t m_iStartPos;
+ int32_t m_iWidth;
+ int32_t m_iStartChar;
+ int32_t m_iChars;
+ int32_t m_iBidiLevel;
+ int32_t m_iBidiPos;
+ int32_t m_iFontSize;
+ int32_t m_iFontHeight;
+ int32_t m_iHorizontalScale;
+ int32_t m_iVerticalScale;
FX_DWORD m_dwLayoutStyles;
FX_DWORD m_dwIdentity;
CFX_RTFCharArray *m_pChars;
@@ -214,22 +214,22 @@ public: virtual void SetDefaultChar(FX_WCHAR wch) = 0;
virtual void SetLineBreakChar(FX_WCHAR wch) = 0;
virtual void SetLineBreakTolerance(FX_FLOAT fTolerance) = 0;
- virtual void SetHorizontalScale(FX_INT32 iScale) = 0;
- virtual void SetVerticalScale(FX_INT32 iScale) = 0;
- virtual void SetCharRotation(FX_INT32 iCharRotation) = 0;
+ virtual void SetHorizontalScale(int32_t iScale) = 0;
+ virtual void SetVerticalScale(int32_t iScale) = 0;
+ virtual void SetCharRotation(int32_t iCharRotation) = 0;
virtual void SetCharSpace(FX_FLOAT fCharSpace) = 0;
virtual void SetWordSpace(FX_BOOL bDefault, FX_FLOAT fWordSpace) = 0;
virtual void SetReadingOrder(FX_BOOL bRTL = FALSE) = 0;
- virtual void SetAlignment(FX_INT32 iAlignment = FX_RTFLINEALIGNMENT_Left) = 0;
+ virtual void SetAlignment(int32_t iAlignment = FX_RTFLINEALIGNMENT_Left) = 0;
virtual void SetUserData(IFX_Unknown *pUserData) = 0;
virtual FX_DWORD AppendChar(FX_WCHAR wch) = 0;
virtual FX_DWORD EndBreak(FX_DWORD dwStatus = FX_RTFBREAK_PieceBreak) = 0;
- virtual FX_INT32 CountBreakPieces() const = 0;
- virtual const CFX_RTFPiece* GetBreakPiece(FX_INT32 index) const = 0;
+ virtual int32_t CountBreakPieces() const = 0;
+ virtual const CFX_RTFPiece* GetBreakPiece(int32_t index) const = 0;
virtual void GetLineRect(CFX_RectF &rect) const = 0;
virtual void ClearBreakPieces() = 0;
virtual void Reset() = 0;
- virtual FX_INT32 GetDisplayPos(FX_LPCRTFTEXTOBJ pText, FXTEXT_CHARPOS *pCharPos, FX_BOOL bCharCode = FALSE, CFX_WideString *pWSForms = NULL, FX_AdjustCharDisplayPos pAdjustPos = NULL) const = 0;
- virtual FX_INT32 GetCharRects(FX_LPCRTFTEXTOBJ pText, CFX_RectFArray &rtArray, FX_BOOL bCharBBox = FALSE) const = 0;
+ virtual int32_t GetDisplayPos(FX_LPCRTFTEXTOBJ pText, FXTEXT_CHARPOS *pCharPos, FX_BOOL bCharCode = FALSE, CFX_WideString *pWSForms = NULL, FX_AdjustCharDisplayPos pAdjustPos = NULL) const = 0;
+ virtual int32_t GetCharRects(FX_LPCRTFTEXTOBJ pText, CFX_RectFArray &rtArray, FX_BOOL bCharBBox = FALSE) const = 0;
};
#endif
diff --git a/xfa/src/fgas/include/fx_sax.h b/xfa/src/fgas/include/fx_sax.h index c0159f8c22..e45ca4e6d8 100644 --- a/xfa/src/fgas/include/fx_sax.h +++ b/xfa/src/fgas/include/fx_sax.h @@ -39,8 +39,8 @@ class IFX_SAXReader {
public:
virtual void Release() = 0;
- virtual FX_INT32 StartParse(IFX_FileRead *pFile, FX_DWORD dwStart = 0, FX_DWORD dwLen = -1, FX_DWORD dwParseMode = 0) = 0;
- virtual FX_INT32 ContinueParse(IFX_Pause *pPause = NULL) = 0;
+ virtual int32_t StartParse(IFX_FileRead *pFile, FX_DWORD dwStart = 0, FX_DWORD dwLen = -1, FX_DWORD dwParseMode = 0) = 0;
+ virtual int32_t ContinueParse(IFX_Pause *pPause = NULL) = 0;
virtual void SkipCurrentNode() = 0;
virtual void SetHandler(IFX_SAXReaderHandler *pHandler) = 0;
};
diff --git a/xfa/src/fgas/include/fx_stm.h b/xfa/src/fgas/include/fx_stm.h index ae424dba2d..e6094d445c 100644 --- a/xfa/src/fgas/include/fx_stm.h +++ b/xfa/src/fgas/include/fx_stm.h @@ -11,7 +11,7 @@ IFX_FileRead* FX_CreateFileRead(IFX_Stream *pBaseStream, FX_BOOL bReleaseStream #ifdef FX_FILESIZE
IFX_FileRead* FX_CreateFileRead(IFX_BufferRead *pBufferRead, FX_FILESIZE iFileSize = -1, FX_BOOL bReleaseStream = TRUE);
#else
-IFX_FileRead* FX_CreateFileRead(IFX_BufferRead *pBufferRead, FX_INT32 iFileSize = -1, FX_BOOL bReleaseStream = TRUE);
+IFX_FileRead* FX_CreateFileRead(IFX_BufferRead *pBufferRead, int32_t iFileSize = -1, FX_BOOL bReleaseStream = TRUE);
#endif
IFX_FileWrite* FX_CreateFileWrite(IFX_Stream *pBaseStream, FX_BOOL bReleaseStream = FALSE);
enum FX_STREAMACCESS {
@@ -34,27 +34,27 @@ public: static IFX_Stream* CreateStream(IFX_FileRead *pFileRead, FX_DWORD dwAccess);
static IFX_Stream* CreateStream(IFX_FileWrite *pFileWrite, FX_DWORD dwAccess);
static IFX_Stream* CreateStream(FX_LPCWSTR pszFileName, FX_DWORD dwAccess);
- static IFX_Stream* CreateStream(FX_LPBYTE pData, FX_INT32 length, FX_DWORD dwAccess);
- static IFX_Stream* CreateStream(IFX_BufferRead *pBufferRead, FX_DWORD dwAccess, FX_INT32 iFileSize = -1, FX_BOOL bReleaseBufferRead = TRUE);
+ static IFX_Stream* CreateStream(FX_LPBYTE pData, int32_t length, FX_DWORD dwAccess);
+ static IFX_Stream* CreateStream(IFX_BufferRead *pBufferRead, FX_DWORD dwAccess, int32_t iFileSize = -1, FX_BOOL bReleaseBufferRead = TRUE);
static IFX_Stream* CreateTextStream(IFX_Stream *pBaseStream, FX_BOOL bDeleteOnRelease);
virtual void Release() = 0;
virtual IFX_Stream* Retain() = 0;
virtual FX_DWORD GetAccessModes() const = 0;
- virtual FX_INT32 GetLength() const = 0;
- virtual FX_INT32 Seek(FX_STREAMSEEK eSeek, FX_INT32 iOffset) = 0;
- virtual FX_INT32 GetPosition() = 0;
+ virtual int32_t GetLength() const = 0;
+ virtual int32_t Seek(FX_STREAMSEEK eSeek, int32_t iOffset) = 0;
+ virtual int32_t GetPosition() = 0;
virtual FX_BOOL IsEOF() const = 0;
- virtual FX_INT32 ReadData(FX_LPBYTE pBuffer, FX_INT32 iBufferSize) = 0;
- virtual FX_INT32 ReadString(FX_LPWSTR pStr, FX_INT32 iMaxLength, FX_BOOL &bEOS, FX_INT32 const *pByteSize = NULL) = 0;
- virtual FX_INT32 WriteData(FX_LPCBYTE pBuffer, FX_INT32 iBufferSize) = 0;
- virtual FX_INT32 WriteString(FX_LPCWSTR pStr, FX_INT32 iLength) = 0;
+ virtual int32_t ReadData(FX_LPBYTE pBuffer, int32_t iBufferSize) = 0;
+ virtual int32_t ReadString(FX_LPWSTR pStr, int32_t iMaxLength, FX_BOOL &bEOS, int32_t const *pByteSize = NULL) = 0;
+ virtual int32_t WriteData(FX_LPCBYTE pBuffer, int32_t iBufferSize) = 0;
+ virtual int32_t WriteString(FX_LPCWSTR pStr, int32_t iLength) = 0;
virtual void Flush() = 0;
- virtual FX_BOOL SetLength(FX_INT32 iLength) = 0;
- virtual FX_INT32 GetBOM(FX_BYTE bom[4]) const = 0;
+ virtual FX_BOOL SetLength(int32_t iLength) = 0;
+ virtual int32_t GetBOM(uint8_t bom[4]) const = 0;
virtual FX_WORD GetCodePage() const = 0;
virtual FX_WORD SetCodePage(FX_WORD wCodePage) = 0;
virtual void Lock() = 0;
virtual void Unlock() = 0;
- virtual IFX_Stream* CreateSharedStream(FX_DWORD dwAccess, FX_INT32 iOffset, FX_INT32 iLength) = 0;
+ virtual IFX_Stream* CreateSharedStream(FX_DWORD dwAccess, int32_t iOffset, int32_t iLength) = 0;
};
#endif
diff --git a/xfa/src/fgas/include/fx_sys.h b/xfa/src/fgas/include/fx_sys.h index c0b5c7445f..8e099bce05 100644 --- a/xfa/src/fgas/include/fx_sys.h +++ b/xfa/src/fgas/include/fx_sys.h @@ -11,10 +11,10 @@ extern "C" { #endif
#define FX_RAD2DEG(r) ((r) * 180.0f / FX_PI)
#define FX_DEG2RAD(a) ((a) * FX_PI / 180.0f)
-typedef FX_INT8 * FX_LPINT8;
-typedef FX_INT8 const * FX_LPCINT8;
-typedef FX_INT32 * FX_LPINT32;
-typedef FX_INT32 const * FX_LPCINT32;
+typedef int8_t * FX_LPINT8;
+typedef int8_t const * FX_LPCINT8;
+typedef int32_t * FX_LPINT32;
+typedef int32_t const * FX_LPCINT32;
typedef long FX_LONG;
typedef FX_LONG * FX_LPLONG;
typedef FX_LONG const * FX_LPCLONG;
@@ -24,30 +24,30 @@ typedef FX_DOUBLE * FX_LPDOUBLE; typedef FX_DOUBLE const * FX_LPCDOUBLE;
FX_FLOAT FX_tan(FX_FLOAT a);
FX_FLOAT FX_log(FX_FLOAT b, FX_FLOAT x);
-FX_FLOAT FX_strtof(FX_LPCSTR pcsStr, FX_INT32 iLength = -1, FX_INT32 *pUsedLen = NULL);
-FX_FLOAT FX_wcstof(FX_LPCWSTR pwsStr, FX_INT32 iLength = -1, FX_INT32 *pUsedLen = NULL);
+FX_FLOAT FX_strtof(FX_LPCSTR pcsStr, int32_t iLength = -1, int32_t *pUsedLen = NULL);
+FX_FLOAT FX_wcstof(FX_LPCWSTR pwsStr, int32_t iLength = -1, int32_t *pUsedLen = NULL);
FX_LPWSTR FX_wcsncpy(FX_LPWSTR dstStr, FX_LPCWSTR srcStr, size_t count);
-FX_INT32 FX_wcsnicmp(FX_LPCWSTR s1, FX_LPCWSTR s2, size_t count);
-FX_INT32 FX_strnicmp(FX_LPCSTR s1, FX_LPCSTR s2, size_t count);
-inline FX_BOOL FX_islower(FX_INT32 ch)
+int32_t FX_wcsnicmp(FX_LPCWSTR s1, FX_LPCWSTR s2, size_t count);
+int32_t FX_strnicmp(FX_LPCSTR s1, FX_LPCSTR s2, size_t count);
+inline FX_BOOL FX_islower(int32_t ch)
{
return ch >= 'a' && ch <= 'z';
}
-inline FX_BOOL FX_isupper(FX_INT32 ch)
+inline FX_BOOL FX_isupper(int32_t ch)
{
return ch >= 'A' && ch <= 'Z';
}
-inline FX_INT32 FX_tolower(FX_INT32 ch)
+inline int32_t FX_tolower(int32_t ch)
{
return FX_isupper(ch) ? (ch + 0x20) : ch;
}
-inline FX_INT32 FX_toupper(FX_INT32 ch)
+inline int32_t FX_toupper(int32_t ch)
{
return FX_islower(ch) ? (ch - 0x20) : ch;
}
-FX_INT32 FX_filelength(FXSYS_FILE *file);
-FX_BOOL FX_fsetsize(FXSYS_FILE *file, FX_INT32 size);
-void FX_memset(FX_LPVOID pBuf, FX_INT32 iValue, size_t size);
+int32_t FX_filelength(FXSYS_FILE *file);
+FX_BOOL FX_fsetsize(FXSYS_FILE *file, int32_t size);
+void FX_memset(FX_LPVOID pBuf, int32_t iValue, size_t size);
void FX_memcpy(FX_LPVOID pDst, FX_LPCVOID pSrc, size_t size);
FX_BOOL FX_IsRelativePath(const CFX_WideStringC &wsPath);
FX_BOOL FX_JoinPath(const CFX_WideStringC &wsBasePath, const CFX_WideStringC &wsRelativePath, CFX_WideString &wsAbsolutePath);
diff --git a/xfa/src/fgas/include/fx_tbk.h b/xfa/src/fgas/include/fx_tbk.h index ab64d1dac0..69b42f1fd7 100644 --- a/xfa/src/fgas/include/fx_tbk.h +++ b/xfa/src/fgas/include/fx_tbk.h @@ -60,8 +60,8 @@ class IFX_TxtBreak; class IFX_TxtAccess
{
public:
- virtual FX_WCHAR GetChar(FX_LPVOID pIdentity, FX_INT32 index) const = 0;
- virtual FX_INT32 GetWidth(FX_LPVOID pIdentity, FX_INT32 index) const = 0;
+ virtual FX_WCHAR GetChar(FX_LPVOID pIdentity, int32_t index) const = 0;
+ virtual int32_t GetWidth(FX_LPVOID pIdentity, int32_t index) const = 0;
};
typedef struct _FX_TXTRUN {
_FX_TXTRUN()
@@ -85,14 +85,14 @@ typedef struct _FX_TXTRUN { IFX_TxtAccess *pAccess;
FX_LPVOID pIdentity;
FX_LPCWSTR pStr;
- FX_INT32 *pWidths;
- FX_INT32 iLength;
+ int32_t *pWidths;
+ int32_t iLength;
IFX_Font *pFont;
FX_FLOAT fFontSize;
FX_DWORD dwStyles;
- FX_INT32 iHorizontalScale;
- FX_INT32 iVerticalScale;
- FX_INT32 iCharRotation;
+ int32_t iHorizontalScale;
+ int32_t iVerticalScale;
+ int32_t iCharRotation;
FX_DWORD dwCharStyles;
FX_LPCRECTF pRect;
FX_WCHAR wLineBreakChar;
@@ -116,19 +116,19 @@ public: , m_pUserData(NULL)
{
}
- FX_INT32 GetEndPos() const
+ int32_t GetEndPos() const
{
return m_iWidth < 0 ? m_iStartPos : m_iStartPos + m_iWidth;
}
- FX_INT32 GetLength() const
+ int32_t GetLength() const
{
return m_iChars;
}
- FX_INT32 GetEndChar() const
+ int32_t GetEndChar() const
{
return m_iStartChar + m_iChars;
}
- CFX_TxtChar* GetCharPtr(FX_INT32 index) const
+ CFX_TxtChar* GetCharPtr(int32_t index) const
{
FXSYS_assert(index > -1 && index < m_iChars && m_pChars != NULL);
return m_pChars->GetDataPtr(m_iStartChar + index);
@@ -136,9 +136,9 @@ public: void GetString(FX_LPWSTR pText) const
{
FXSYS_assert(pText != NULL);
- FX_INT32 iEndChar = m_iStartChar + m_iChars;
+ int32_t iEndChar = m_iStartChar + m_iChars;
CFX_Char *pChar;
- for (FX_INT32 i = m_iStartChar; i < iEndChar; i ++) {
+ for (int32_t i = m_iStartChar; i < iEndChar; i ++) {
pChar = m_pChars->GetDataPtr(i);
*pText ++ = (FX_WCHAR)pChar->m_wCharCode;
}
@@ -150,25 +150,25 @@ public: GetString(pText);
wsText.ReleaseBuffer(m_iChars);
}
- void GetWidths(FX_INT32 *pWidths) const
+ void GetWidths(int32_t *pWidths) const
{
FXSYS_assert(pWidths != NULL);
- FX_INT32 iEndChar = m_iStartChar + m_iChars;
+ int32_t iEndChar = m_iStartChar + m_iChars;
CFX_Char *pChar;
- for (FX_INT32 i = m_iStartChar; i < iEndChar; i ++) {
+ for (int32_t i = m_iStartChar; i < iEndChar; i ++) {
pChar = m_pChars->GetDataPtr(i);
*pWidths ++ = pChar->m_iCharWidth;
}
}
FX_DWORD m_dwStatus;
- FX_INT32 m_iStartPos;
- FX_INT32 m_iWidth;
- FX_INT32 m_iStartChar;
- FX_INT32 m_iChars;
- FX_INT32 m_iBidiLevel;
- FX_INT32 m_iBidiPos;
- FX_INT32 m_iHorizontalScale;
- FX_INT32 m_iVerticalScale;
+ int32_t m_iStartPos;
+ int32_t m_iWidth;
+ int32_t m_iStartChar;
+ int32_t m_iChars;
+ int32_t m_iBidiLevel;
+ int32_t m_iBidiPos;
+ int32_t m_iHorizontalScale;
+ int32_t m_iVerticalScale;
FX_DWORD m_dwCharStyles;
CFX_TxtCharArray *m_pChars;
FX_LPVOID m_pUserData;
@@ -189,23 +189,23 @@ public: virtual void SetDefaultChar(FX_WCHAR wch) = 0;
virtual void SetParagraphBreakChar(FX_WCHAR wch) = 0;
virtual void SetLineBreakTolerance(FX_FLOAT fTolerance) = 0;
- virtual void SetHorizontalScale(FX_INT32 iScale) = 0;
- virtual void SetVerticalScale(FX_INT32 iScale) = 0;
- virtual void SetCharRotation(FX_INT32 iCharRotation) = 0;
+ virtual void SetHorizontalScale(int32_t iScale) = 0;
+ virtual void SetVerticalScale(int32_t iScale) = 0;
+ virtual void SetCharRotation(int32_t iCharRotation) = 0;
virtual void SetCharSpace(FX_FLOAT fCharSpace) = 0;
- virtual void SetAlignment(FX_INT32 iAlignment) = 0;
+ virtual void SetAlignment(int32_t iAlignment) = 0;
virtual FX_DWORD GetContextCharStyles() const = 0;
virtual void SetContextCharStyles(FX_DWORD dwCharStyles) = 0;
virtual void SetCombWidth(FX_FLOAT fCombWidth) = 0;
virtual void SetUserData(FX_LPVOID pUserData) = 0;
virtual FX_DWORD AppendChar(FX_WCHAR wch) = 0;
virtual FX_DWORD EndBreak(FX_DWORD dwStatus = FX_TXTBREAK_PieceBreak) = 0;
- virtual FX_INT32 CountBreakChars() const = 0;
- virtual FX_INT32 CountBreakPieces() const = 0;
- virtual const CFX_TxtPiece* GetBreakPiece(FX_INT32 index) const = 0;
+ virtual int32_t CountBreakChars() const = 0;
+ virtual int32_t CountBreakPieces() const = 0;
+ virtual const CFX_TxtPiece* GetBreakPiece(int32_t index) const = 0;
virtual void ClearBreakPieces() = 0;
virtual void Reset() = 0;
- virtual FX_INT32 GetDisplayPos(FX_LPCTXTRUN pTxtRun, FXTEXT_CHARPOS *pCharPos, FX_BOOL bCharCode = FALSE, CFX_WideString *pWSForms = NULL, FX_AdjustCharDisplayPos pAdjustPos = NULL) const = 0;
- virtual FX_INT32 GetCharRects(FX_LPCTXTRUN pTxtRun, CFX_RectFArray &rtArray, FX_BOOL bCharBBox = FALSE) const = 0;
+ virtual int32_t GetDisplayPos(FX_LPCTXTRUN pTxtRun, FXTEXT_CHARPOS *pCharPos, FX_BOOL bCharCode = FALSE, CFX_WideString *pWSForms = NULL, FX_AdjustCharDisplayPos pAdjustPos = NULL) const = 0;
+ virtual int32_t GetCharRects(FX_LPCTXTRUN pTxtRun, CFX_RectFArray &rtArray, FX_BOOL bCharBBox = FALSE) const = 0;
};
#endif
diff --git a/xfa/src/fgas/include/fx_ucd.h b/xfa/src/fgas/include/fx_ucd.h index 715c8af4dd..7b5b6532a5 100644 --- a/xfa/src/fgas/include/fx_ucd.h +++ b/xfa/src/fgas/include/fx_ucd.h @@ -14,7 +14,7 @@ #define FX_JAPCHARPROPERTYEX_Bottom 0x30
typedef struct _FX_JAPCHARPROPERTYEX {
FX_WCHAR wChar;
- FX_BYTE uAlign;
+ uint8_t uAlign;
} FX_JAPCHARPROPERTYEX, *FX_LPJAPCHARPROPERTYEX;
typedef FX_JAPCHARPROPERTYEX const * FX_LPCJAPCHARPROPERTYEX;
FX_LPCJAPCHARPROPERTYEX FX_GetJapCharPropertyEx(FX_WCHAR wch);
diff --git a/xfa/src/fgas/include/fx_utl.h b/xfa/src/fgas/include/fx_utl.h index 850543786c..35b676f41e 100644 --- a/xfa/src/fgas/include/fx_utl.h +++ b/xfa/src/fgas/include/fx_utl.h @@ -34,16 +34,16 @@ private: class CFX_BaseArray : public CFX_Target
{
protected:
- CFX_BaseArray(FX_INT32 iGrowSize, FX_INT32 iBlockSize);
+ CFX_BaseArray(int32_t iGrowSize, int32_t iBlockSize);
~CFX_BaseArray();
- FX_INT32 GetSize() const;
- FX_INT32 GetBlockSize() const;
- FX_LPBYTE AddSpaceTo(FX_INT32 index);
- FX_LPBYTE GetAt(FX_INT32 index) const;
+ int32_t GetSize() const;
+ int32_t GetBlockSize() const;
+ FX_LPBYTE AddSpaceTo(int32_t index);
+ FX_LPBYTE GetAt(int32_t index) const;
FX_LPBYTE GetBuffer() const;
- FX_INT32 Append(const CFX_BaseArray &src, FX_INT32 iStart = 0, FX_INT32 iCount = -1);
- FX_INT32 Copy(const CFX_BaseArray &src, FX_INT32 iStart = 0, FX_INT32 iCount = -1);
- FX_INT32 RemoveLast(FX_INT32 iCount = -1);
+ int32_t Append(const CFX_BaseArray &src, int32_t iStart = 0, int32_t iCount = -1);
+ int32_t Copy(const CFX_BaseArray &src, int32_t iStart = 0, int32_t iCount = -1);
+ int32_t RemoveLast(int32_t iCount = -1);
void RemoveAll(FX_BOOL bLeaveMemory = FALSE);
FX_LPVOID m_pData;
};
@@ -51,13 +51,13 @@ template<class baseType> class CFX_BaseArrayTemplate : public CFX_BaseArray
{
public:
- CFX_BaseArrayTemplate(FX_INT32 iGrowSize = 100) : CFX_BaseArray(iGrowSize, sizeof(baseType)) {}
- CFX_BaseArrayTemplate(FX_INT32 iGrowSize, FX_INT32 iBlockSize) : CFX_BaseArray(iGrowSize, iBlockSize) {}
- FX_INT32 GetSize() const
+ CFX_BaseArrayTemplate(int32_t iGrowSize = 100) : CFX_BaseArray(iGrowSize, sizeof(baseType)) {}
+ CFX_BaseArrayTemplate(int32_t iGrowSize, int32_t iBlockSize) : CFX_BaseArray(iGrowSize, iBlockSize) {}
+ int32_t GetSize() const
{
return CFX_BaseArray::GetSize();
}
- FX_INT32 GetBlockSize() const
+ int32_t GetBlockSize() const
{
return CFX_BaseArray::GetBlockSize();
}
@@ -65,9 +65,9 @@ public: {
return (baseType*)CFX_BaseArray::AddSpaceTo(CFX_BaseArray::GetSize());
}
- FX_INT32 Add(const baseType &element)
+ int32_t Add(const baseType &element)
{
- FX_INT32 index = CFX_BaseArray::GetSize();
+ int32_t index = CFX_BaseArray::GetSize();
*(baseType*)CFX_BaseArray::AddSpaceTo(index) = element;
return index;
}
@@ -75,31 +75,31 @@ public: {
return (baseType*)CFX_BaseArray::GetBuffer();
}
- baseType& GetAt(FX_INT32 index) const
+ baseType& GetAt(int32_t index) const
{
return *(baseType*)CFX_BaseArray::GetAt(index);
}
- baseType* GetPtrAt(FX_INT32 index) const
+ baseType* GetPtrAt(int32_t index) const
{
return (baseType*)CFX_BaseArray::GetAt(index);
}
- void SetAt(FX_INT32 index, const baseType &element)
+ void SetAt(int32_t index, const baseType &element)
{
*(baseType*)CFX_BaseArray::GetAt(index) = element;
}
- void SetAtGrow(FX_INT32 index, const baseType &element)
+ void SetAtGrow(int32_t index, const baseType &element)
{
*(baseType*)CFX_BaseArray::AddSpaceTo(index) = element;
}
- FX_INT32 Append(const CFX_BaseArrayTemplate &src, FX_INT32 iStart = 0, FX_INT32 iCount = -1)
+ int32_t Append(const CFX_BaseArrayTemplate &src, int32_t iStart = 0, int32_t iCount = -1)
{
return CFX_BaseArray::Append(src, iStart, iCount);
}
- FX_INT32 Copy(const CFX_BaseArrayTemplate &src, FX_INT32 iStart = 0, FX_INT32 iCount = -1)
+ int32_t Copy(const CFX_BaseArrayTemplate &src, int32_t iStart = 0, int32_t iCount = -1)
{
return CFX_BaseArray::Copy(src, iStart, iCount);
}
- FX_INT32 RemoveLast(FX_INT32 iCount = -1)
+ int32_t RemoveLast(int32_t iCount = -1)
{
return CFX_BaseArray::RemoveLast(iCount);
}
@@ -115,41 +115,41 @@ template<class baseType> class CFX_ObjectBaseArrayTemplate : public CFX_BaseArray
{
public:
- CFX_ObjectBaseArrayTemplate(FX_INT32 iGrowSize = 100) : CFX_BaseArray(iGrowSize, sizeof(baseType)) {}
+ CFX_ObjectBaseArrayTemplate(int32_t iGrowSize = 100) : CFX_BaseArray(iGrowSize, sizeof(baseType)) {}
~CFX_ObjectBaseArrayTemplate()
{
RemoveAll(FALSE);
}
- FX_INT32 GetSize() const
+ int32_t GetSize() const
{
return CFX_BaseArray::GetSize();
}
- FX_INT32 GetBlockSize() const
+ int32_t GetBlockSize() const
{
return CFX_BaseArray::GetBlockSize();
}
- FX_INT32 Add(const baseType &element)
+ int32_t Add(const baseType &element)
{
- FX_INT32 index = CFX_BaseArray::GetSize();
+ int32_t index = CFX_BaseArray::GetSize();
baseType *p = (baseType*)CFX_BaseArray::AddSpaceTo(index);
FXTARGET_New ((void*)p)baseType(element);
return index;
}
- baseType& GetAt(FX_INT32 index) const
+ baseType& GetAt(int32_t index) const
{
return *(baseType*)CFX_BaseArray::GetAt(index);
}
- baseType* GetPtrAt(FX_INT32 index) const
+ baseType* GetPtrAt(int32_t index) const
{
return (baseType*)CFX_BaseArray::GetAt(index);
}
- FX_INT32 Append(const CFX_ObjectBaseArrayTemplate &src, FX_INT32 iStart = 0, FX_INT32 iCount = -1)
+ int32_t Append(const CFX_ObjectBaseArrayTemplate &src, int32_t iStart = 0, int32_t iCount = -1)
{
FXSYS_assert(GetBlockSize() == src.GetBlockSize());
if (iCount == 0) {
return 0;
}
- FX_INT32 iSize = src.GetSize();
+ int32_t iSize = src.GetSize();
FXSYS_assert(iStart > -1 && iStart < iSize);
if (iCount < 0) {
iCount = iSize;
@@ -163,21 +163,21 @@ public: iSize = CFX_BaseArray::GetSize();
CFX_BaseArray::AddSpaceTo(iSize + iCount - 1);
FX_LPBYTE *pStart = CFX_BaseArray::GetAt(iSize);
- FX_INT32 iBlockSize = CFX_BaseArray::GetBlockSize();
+ int32_t iBlockSize = CFX_BaseArray::GetBlockSize();
iSize = iStart + iCount;
- for (FX_INT32 i = iStart; i < iSize; i ++) {
+ for (int32_t i = iStart; i < iSize; i ++) {
FXTARGET_NewWith ((void*)pStart)baseType(src.GetAt(i));
pStart += iBlockSize;
}
return iCount;
}
- FX_INT32 Copy(const CFX_ObjectBaseArrayTemplate &src, FX_INT32 iStart = 0, FX_INT32 iCount = -1)
+ int32_t Copy(const CFX_ObjectBaseArrayTemplate &src, int32_t iStart = 0, int32_t iCount = -1)
{
FXSYS_assert(GetBlockSize() == src.GetBlockSize());
if (iCount == 0) {
return 0;
}
- FX_INT32 iSize = src.GetSize();
+ int32_t iSize = src.GetSize();
FXSYS_assert(iStart > -1 && iStart < iSize);
if (iCount < 0) {
iCount = iSize;
@@ -191,32 +191,32 @@ public: RemoveAll(TRUE);
CFX_BaseArray::AddSpaceTo(iCount - 1);
FX_LPBYTE *pStart = CFX_BaseArray::GetAt(0);
- FX_INT32 iBlockSize = CFX_BaseArray::GetBlockSize();
+ int32_t iBlockSize = CFX_BaseArray::GetBlockSize();
iSize = iStart + iCount;
- for (FX_INT32 i = iStart; i < iSize; i ++) {
+ for (int32_t i = iStart; i < iSize; i ++) {
FXTARGET_New ((void*)pStart)baseType(src.GetAt(i));
pStart += iBlockSize;
}
return iCount;
}
- FX_INT32 RemoveLast(FX_INT32 iCount = -1)
+ int32_t RemoveLast(int32_t iCount = -1)
{
- FX_INT32 iSize = CFX_BaseArray::GetSize();
+ int32_t iSize = CFX_BaseArray::GetSize();
if (iCount < 0 || iCount > iSize) {
iCount = iSize;
}
if (iCount == 0) {
return iSize;
}
- for (FX_INT32 i = iSize - iCount; i < iSize; i ++) {
+ for (int32_t i = iSize - iCount; i < iSize; i ++) {
((baseType*)GetPtrAt(i))->~baseType();
}
return CFX_BaseArray::RemoveLast(iCount);
}
void RemoveAll(FX_BOOL bLeaveMemory = FALSE)
{
- FX_INT32 iSize = CFX_BaseArray::GetSize();
- for (FX_INT32 i = 0; i < iSize; i ++) {
+ int32_t iSize = CFX_BaseArray::GetSize();
+ for (int32_t i = 0; i < iSize; i ++) {
((baseType*)GetPtrAt(i))->~baseType();
}
CFX_BaseArray::RemoveAll(bLeaveMemory);
@@ -225,14 +225,14 @@ public: class CFX_BaseMassArray : public CFX_Target
{
protected:
- CFX_BaseMassArray(FX_INT32 iChunkSize, FX_INT32 iBlockSize);
+ CFX_BaseMassArray(int32_t iChunkSize, int32_t iBlockSize);
~CFX_BaseMassArray();
- FX_INT32 GetSize() const;
- FX_LPBYTE AddSpaceTo(FX_INT32 index);
- FX_LPBYTE GetAt(FX_INT32 index) const;
- FX_INT32 Append(const CFX_BaseMassArray &src, FX_INT32 iStart = 0, FX_INT32 iCount = -1);
- FX_INT32 Copy(const CFX_BaseMassArray &src, FX_INT32 iStart = 0, FX_INT32 iCount = -1);
- FX_INT32 RemoveLast(FX_INT32 iCount = -1);
+ int32_t GetSize() const;
+ FX_LPBYTE AddSpaceTo(int32_t index);
+ FX_LPBYTE GetAt(int32_t index) const;
+ int32_t Append(const CFX_BaseMassArray &src, int32_t iStart = 0, int32_t iCount = -1);
+ int32_t Copy(const CFX_BaseMassArray &src, int32_t iStart = 0, int32_t iCount = -1);
+ int32_t RemoveLast(int32_t iCount = -1);
void RemoveAll(FX_BOOL bLeaveMemory = FALSE);
CFX_BaseMassArrayImp* m_pData;
};
@@ -240,9 +240,9 @@ template<class baseType> class CFX_MassArrayTemplate : public CFX_BaseMassArray
{
public:
- CFX_MassArrayTemplate(FX_INT32 iChunkSize = 100) : CFX_BaseMassArray(iChunkSize, sizeof(baseType)) {}
- CFX_MassArrayTemplate(FX_INT32 iChunkSize, FX_INT32 iBlockSize) : CFX_BaseMassArray(iChunkSize, iBlockSize) {}
- FX_INT32 GetSize() const
+ CFX_MassArrayTemplate(int32_t iChunkSize = 100) : CFX_BaseMassArray(iChunkSize, sizeof(baseType)) {}
+ CFX_MassArrayTemplate(int32_t iChunkSize, int32_t iBlockSize) : CFX_BaseMassArray(iChunkSize, iBlockSize) {}
+ int32_t GetSize() const
{
return CFX_BaseMassArray::GetSize();
}
@@ -250,37 +250,37 @@ public: {
return (baseType*)CFX_BaseMassArray::AddSpaceTo(CFX_BaseMassArray::GetSize());
}
- FX_INT32 Add(const baseType &element)
+ int32_t Add(const baseType &element)
{
- FX_INT32 index = CFX_BaseMassArray::GetSize();
+ int32_t index = CFX_BaseMassArray::GetSize();
*(baseType*)CFX_BaseMassArray::AddSpaceTo(index) = element;
return index;
}
- baseType& GetAt(FX_INT32 index) const
+ baseType& GetAt(int32_t index) const
{
return *(baseType*)CFX_BaseMassArray::GetAt(index);
}
- baseType* GetPtrAt(FX_INT32 index) const
+ baseType* GetPtrAt(int32_t index) const
{
return (baseType*)CFX_BaseMassArray::GetAt(index);
}
- void SetAt(FX_INT32 index, const baseType &element)
+ void SetAt(int32_t index, const baseType &element)
{
*(baseType*)CFX_BaseMassArray::GetAt(index) = element;
}
- void SetAtGrow(FX_INT32 index, const baseType &element)
+ void SetAtGrow(int32_t index, const baseType &element)
{
*(baseType*)CFX_BaseMassArray::AddSpaceTo(index) = element;
}
- FX_INT32 Append(const CFX_MassArrayTemplate &src, FX_INT32 iStart = 0, FX_INT32 iCount = -1)
+ int32_t Append(const CFX_MassArrayTemplate &src, int32_t iStart = 0, int32_t iCount = -1)
{
return CFX_BaseMassArray::Append(src, iStart, iCount);
}
- FX_INT32 Copy(const CFX_MassArrayTemplate &src, FX_INT32 iStart = 0, FX_INT32 iCount = -1)
+ int32_t Copy(const CFX_MassArrayTemplate &src, int32_t iStart = 0, int32_t iCount = -1)
{
return CFX_BaseMassArray::Copy(src, iStart, iCount);
}
- FX_INT32 RemoveLast(FX_INT32 iCount = -1)
+ int32_t RemoveLast(int32_t iCount = -1)
{
return CFX_BaseMassArray::RemoveLast(iCount);
}
@@ -290,7 +290,7 @@ public: }
};
typedef CFX_MassArrayTemplate<FX_LPVOID> CFX_PtrMassArray;
-typedef CFX_MassArrayTemplate<FX_INT32> CFX_Int32MassArray;
+typedef CFX_MassArrayTemplate<int32_t> CFX_Int32MassArray;
typedef CFX_MassArrayTemplate<FX_DWORD> CFX_DWordMassArray;
typedef CFX_MassArrayTemplate<FX_WORD> CFX_WordMassArray;
typedef CFX_MassArrayTemplate<CFX_Rect> CFX_RectMassArray;
@@ -299,87 +299,87 @@ template<class baseType> class CFX_ObjectMassArrayTemplate : public CFX_BaseMassArray
{
public:
- CFX_ObjectMassArrayTemplate(FX_INT32 iChunkSize = 100) : CFX_BaseMassArray(iChunkSize, sizeof(baseType)) {}
+ CFX_ObjectMassArrayTemplate(int32_t iChunkSize = 100) : CFX_BaseMassArray(iChunkSize, sizeof(baseType)) {}
~CFX_ObjectMassArrayTemplate()
{
RemoveAll(FALSE);
}
- FX_INT32 GetSize() const
+ int32_t GetSize() const
{
return CFX_BaseMassArray::GetSize();
}
- FX_INT32 Add(const baseType &element)
+ int32_t Add(const baseType &element)
{
- FX_INT32 index = CFX_BaseMassArray::GetSize();
+ int32_t index = CFX_BaseMassArray::GetSize();
baseType *p = (baseType*)CFX_BaseMassArray::AddSpaceTo(index);
FXTARGET_New ((void*)p)baseType(element);
return index;
}
- baseType& GetAt(FX_INT32 index) const
+ baseType& GetAt(int32_t index) const
{
return *(baseType*)CFX_BaseMassArray::GetAt(index);
}
- baseType* GetPtrAt(FX_INT32 index) const
+ baseType* GetPtrAt(int32_t index) const
{
return (baseType*)CFX_BaseMassArray::GetAt(index);
}
- FX_INT32 Append(const CFX_ObjectMassArrayTemplate &src, FX_INT32 iStart = 0, FX_INT32 iCount = -1)
+ int32_t Append(const CFX_ObjectMassArrayTemplate &src, int32_t iStart = 0, int32_t iCount = -1)
{
if (iCount == 0) {
return CFX_BaseMassArray::GetSize();
}
- FX_INT32 iSize = src.GetSize();
+ int32_t iSize = src.GetSize();
FXSYS_assert(iStart > -1 && iStart < iSize);
if (iCount < 0) {
iCount = iSize;
}
- FX_INT32 iEnd = iStart + iCount;
+ int32_t iEnd = iStart + iCount;
if (iEnd > iSize) {
iEnd = iSize;
}
- for (FX_INT32 i = iStart; i < iEnd; i ++) {
+ for (int32_t i = iStart; i < iEnd; i ++) {
Add(src.GetAt(i));
}
return CFX_BaseMassArray::GetSize();
}
- FX_INT32 Copy(const CFX_ObjectMassArrayTemplate &src, FX_INT32 iStart = 0, FX_INT32 iCount = -1)
+ int32_t Copy(const CFX_ObjectMassArrayTemplate &src, int32_t iStart = 0, int32_t iCount = -1)
{
if (iCount == 0) {
return CFX_BaseMassArray::GetSize();
}
- FX_INT32 iSize = src.GetSize();
+ int32_t iSize = src.GetSize();
FXSYS_assert(iStart > -1 && iStart < iSize);
if (iCount < 0) {
iCount = iSize;
}
- FX_INT32 iEnd = iStart + iCount;
+ int32_t iEnd = iStart + iCount;
if (iEnd > iSize) {
iEnd = iSize;
}
RemoveAll(TRUE);
- for (FX_INT32 i = iStart; i < iEnd; i ++) {
+ for (int32_t i = iStart; i < iEnd; i ++) {
Add(src.GetAt(i));
}
return CFX_BaseMassArray::GetSize();
}
- FX_INT32 RemoveLast(FX_INT32 iCount = -1)
+ int32_t RemoveLast(int32_t iCount = -1)
{
- FX_INT32 iSize = CFX_BaseMassArray::GetSize();
+ int32_t iSize = CFX_BaseMassArray::GetSize();
if (iCount < 0 || iCount > iSize) {
iCount = iSize;
}
if (iCount == 0) {
return iSize;
}
- for (FX_INT32 i = iSize - iCount; i < iSize; i ++) {
+ for (int32_t i = iSize - iCount; i < iSize; i ++) {
((baseType*)GetPtrAt(i))->~baseType();
}
return CFX_BaseMassArray::RemoveLast(iCount);
}
void RemoveAll(FX_BOOL bLeaveMemory = FALSE)
{
- FX_INT32 iSize = CFX_BaseMassArray::GetSize();
- for (FX_INT32 i = 0; i < iSize; i ++) {
+ int32_t iSize = CFX_BaseMassArray::GetSize();
+ for (int32_t i = 0; i < iSize; i ++) {
((baseType*)GetPtrAt(i))->~baseType();
}
CFX_BaseMassArray::RemoveAll(bLeaveMemory);
@@ -388,10 +388,10 @@ public: class CFX_BaseDiscreteArray : public CFX_Target
{
protected:
- CFX_BaseDiscreteArray(FX_INT32 iChunkSize, FX_INT32 iBlockSize);
+ CFX_BaseDiscreteArray(int32_t iChunkSize, int32_t iBlockSize);
~CFX_BaseDiscreteArray();
- FX_LPBYTE AddSpaceTo(FX_INT32 index);
- FX_LPBYTE GetAt(FX_INT32 index) const;
+ FX_LPBYTE AddSpaceTo(int32_t index);
+ FX_LPBYTE GetAt(int32_t index) const;
void RemoveAll();
FX_LPVOID m_pData;
};
@@ -399,17 +399,17 @@ template<class baseType> class CFX_DiscreteArrayTemplate : public CFX_BaseDiscreteArray
{
public:
- CFX_DiscreteArrayTemplate(FX_INT32 iChunkSize = 100) : CFX_BaseDiscreteArray(iChunkSize, sizeof(baseType)) {}
- baseType& GetAt(FX_INT32 index, const baseType &defValue) const
+ CFX_DiscreteArrayTemplate(int32_t iChunkSize = 100) : CFX_BaseDiscreteArray(iChunkSize, sizeof(baseType)) {}
+ baseType& GetAt(int32_t index, const baseType &defValue) const
{
baseType *p = (baseType*)CFX_BaseDiscreteArray::GetAt(index);
return p == NULL ? (baseType&)defValue : *p;
}
- baseType* GetPtrAt(FX_INT32 index) const
+ baseType* GetPtrAt(int32_t index) const
{
return (baseType*)CFX_BaseDiscreteArray::GetAt(index);
}
- void SetAtGrow(FX_INT32 index, const baseType &element)
+ void SetAtGrow(int32_t index, const baseType &element)
{
*(baseType*)CFX_BaseDiscreteArray::AddSpaceTo(index) = element;
}
@@ -424,13 +424,13 @@ typedef CFX_DiscreteArrayTemplate<FX_WORD> CFX_WordDiscreteArray; class CFX_BaseStack : public CFX_Target
{
protected:
- CFX_BaseStack(FX_INT32 iChunkSize, FX_INT32 iBlockSize);
+ CFX_BaseStack(int32_t iChunkSize, int32_t iBlockSize);
~CFX_BaseStack();
FX_LPBYTE Push();
void Pop();
FX_LPBYTE GetTopElement() const;
- FX_INT32 GetSize() const;
- FX_LPBYTE GetAt(FX_INT32 index) const;
+ int32_t GetSize() const;
+ FX_LPBYTE GetAt(int32_t index) const;
void RemoveAll(FX_BOOL bLeaveMemory = FALSE);
CFX_BaseMassArrayImp* m_pData;
};
@@ -438,10 +438,10 @@ template<class baseType> class CFX_StackTemplate : public CFX_BaseStack
{
public:
- CFX_StackTemplate(FX_INT32 iChunkSize = 100) : CFX_BaseStack(iChunkSize, sizeof(baseType)) {}
- FX_INT32 Push(const baseType &element)
+ CFX_StackTemplate(int32_t iChunkSize = 100) : CFX_BaseStack(iChunkSize, sizeof(baseType)) {}
+ int32_t Push(const baseType &element)
{
- FX_INT32 index = CFX_BaseStack::GetSize();
+ int32_t index = CFX_BaseStack::GetSize();
*(baseType*)CFX_BaseStack::Push() = element;
return index;
}
@@ -453,11 +453,11 @@ public: {
return (baseType*)CFX_BaseStack::GetTopElement();
}
- FX_INT32 GetSize() const
+ int32_t GetSize() const
{
return CFX_BaseStack::GetSize();
}
- baseType* GetAt(FX_INT32 index) const
+ baseType* GetAt(int32_t index) const
{
return (baseType*)CFX_BaseStack::GetAt(index);
}
@@ -469,19 +469,19 @@ public: typedef CFX_StackTemplate<FX_LPVOID> CFX_PtrStack;
typedef CFX_StackTemplate<FX_DWORD> CFX_DWordStack;
typedef CFX_StackTemplate<FX_WORD> CFX_WordStack;
-typedef CFX_StackTemplate<FX_INT32> CFX_Int32Stack;
+typedef CFX_StackTemplate<int32_t> CFX_Int32Stack;
template<class baseType>
class CFX_ObjectStackTemplate : public CFX_BaseStack
{
public:
- CFX_ObjectStackTemplate(FX_INT32 iChunkSize = 100) : CFX_BaseStack(iChunkSize, sizeof(baseType)) {}
+ CFX_ObjectStackTemplate(int32_t iChunkSize = 100) : CFX_BaseStack(iChunkSize, sizeof(baseType)) {}
~CFX_ObjectStackTemplate()
{
RemoveAll();
}
- FX_INT32 Push(const baseType &element)
+ int32_t Push(const baseType &element)
{
- FX_INT32 index = CFX_BaseStack::GetSize();
+ int32_t index = CFX_BaseStack::GetSize();
baseType *p = (baseType*)CFX_BaseStack::Push();
FXTARGET_New ((void*)p)baseType(element);
return index;
@@ -498,38 +498,38 @@ public: {
return (baseType*)CFX_BaseStack::GetTopElement();
}
- FX_INT32 GetSize() const
+ int32_t GetSize() const
{
return CFX_BaseStack::GetSize();
}
- baseType* GetAt(FX_INT32 index) const
+ baseType* GetAt(int32_t index) const
{
return (baseType*)CFX_BaseStack::GetAt(index);
}
void RemoveAll(FX_BOOL bLeaveMemory = FALSE)
{
- FX_INT32 iSize = CFX_BaseStack::GetSize();
- for (FX_INT32 i = 0; i < iSize; i ++) {
+ int32_t iSize = CFX_BaseStack::GetSize();
+ for (int32_t i = 0; i < iSize; i ++) {
((baseType*)CFX_BaseStack::GetAt(i))->~baseType();
}
CFX_BaseStack::RemoveAll(bLeaveMemory);
}
- FX_INT32 Copy(const CFX_ObjectStackTemplate &src, FX_INT32 iStart = 0, FX_INT32 iCount = -1)
+ int32_t Copy(const CFX_ObjectStackTemplate &src, int32_t iStart = 0, int32_t iCount = -1)
{
if (iCount == 0) {
return CFX_BaseStack::GetSize();
}
- FX_INT32 iSize = src.GetSize();
+ int32_t iSize = src.GetSize();
FXSYS_assert(iStart > -1 && iStart < iSize);
if (iCount < 0) {
iCount = iSize;
}
- FX_INT32 iEnd = iStart + iCount;
+ int32_t iEnd = iStart + iCount;
if (iEnd > iSize) {
iEnd = iSize;
}
RemoveAll(TRUE);
- for (FX_INT32 i = iStart; i < iEnd; i ++) {
+ for (int32_t i = iStart; i < iEnd; i ++) {
Push(*src.GetAt(i));
}
return CFX_BaseStack::GetSize();
@@ -659,9 +659,9 @@ public: {
m_pParentNode = pNode;
}
- FX_INT32 CountChildNodes() const
+ int32_t CountChildNodes() const
{
- FX_INT32 iCount = 0;
+ int32_t iCount = 0;
CPLTreeNode *pNode = m_pChildNode;
while (pNode) {
iCount ++;
@@ -669,9 +669,9 @@ public: }
return iCount;
}
- CPLTreeNode* GetChildNode(FX_INT32 iIndex) const
+ CPLTreeNode* GetChildNode(int32_t iIndex) const
{
- FX_INT32 iCount = 0;
+ int32_t iCount = 0;
CPLTreeNode *pNode = m_pChildNode;
while (pNode) {
if (iIndex == iCount) {
@@ -682,9 +682,9 @@ public: }
return NULL;
}
- FX_INT32 GetNodeIndex() const
+ int32_t GetNodeIndex() const
{
- FX_INT32 index = 0;
+ int32_t index = 0;
CPLTreeNode *pNode = m_pPrevNode;
while (pNode != NULL) {
index ++;
@@ -722,9 +722,9 @@ public: {
m_pNextNode = pNode;
}
- FX_INT32 GetNodeLevel() const
+ int32_t GetNodeLevel() const
{
- FX_INT32 iLevel = 0;
+ int32_t iLevel = 0;
CPLTreeNode *pNode = (CPLTreeNode*)this;
while ((pNode = pNode->m_pParentNode) != NULL) {
iLevel ++;
|