From d7e5cc754a937605d1f73db5e7967c58ddd80742 Mon Sep 17 00:00:00 2001 From: Tom Sepez Date: Wed, 10 Jun 2015 14:33:37 -0700 Subject: Merge to XFA: Remove typdefs for pointer types in fx_system.h. Original Review URL: https://codereview.chromium.org/1171733003 R=thestig@chromium.org Review URL: https://codereview.chromium.org/1178613002. --- xfa/src/fgas/include/fx_alg.h | 8 ++--- xfa/src/fgas/include/fx_cpg.h | 24 +++++++-------- xfa/src/fgas/include/fx_fnt.h | 66 ++++++++++++++++++++-------------------- xfa/src/fgas/include/fx_lbk.h | 4 +-- xfa/src/fgas/include/fx_locale.h | 2 +- xfa/src/fgas/include/fx_rbk.h | 6 ++-- xfa/src/fgas/include/fx_sax.h | 14 ++++----- xfa/src/fgas/include/fx_stm.h | 12 ++++---- xfa/src/fgas/include/fx_sys.h | 14 ++++----- xfa/src/fgas/include/fx_tbk.h | 16 +++++----- xfa/src/fgas/include/fx_utl.h | 38 +++++++++++------------ 11 files changed, 102 insertions(+), 102 deletions(-) (limited to 'xfa/src/fgas/include') diff --git a/xfa/src/fgas/include/fx_alg.h b/xfa/src/fgas/include/fx_alg.h index 0ee8508083..65403ec7da 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 -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); +int32_t FX_Base64EncodeA(const uint8_t* pSrc, int32_t iSrcLen, FX_CHAR* pDst); +int32_t FX_Base64DecodeA(const FX_CHAR* pSrc, int32_t iSrcLen, uint8_t* pDst); +int32_t FX_Base64DecodeW(const FX_WCHAR* pSrc, int32_t iSrcLen, uint8_t* 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); +int32_t FX_SeparateStringW(const FX_WCHAR* pStr, int32_t iStrLen, FX_WCHAR delimiter, CFX_WideStringArray &pieces); #ifdef __cplusplus }; #endif diff --git a/xfa/src/fgas/include/fx_cpg.h b/xfa/src/fgas/include/fx_cpg.h index 2556426dbc..0b58727fa3 100644 --- a/xfa/src/fgas/include/fx_cpg.h +++ b/xfa/src/fgas/include/fx_cpg.h @@ -132,17 +132,17 @@ class IFX_CodePage; #define FX_CHARSET_OEM 255 FX_WORD FX_GetCodePageFromCharset(uint8_t charset); FX_WORD FX_GetCharsetFromCodePage(FX_WORD codepage); -FX_WORD FX_GetCodePageFromStringA(FX_LPCSTR pStr, int32_t iLength); -FX_WORD FX_GetCodePageFormStringW(FX_LPCWSTR pStr, int32_t iLength); +FX_WORD FX_GetCodePageFromStringA(const FX_CHAR* pStr, int32_t iLength); +FX_WORD FX_GetCodePageFormStringW(const FX_WCHAR* pStr, int32_t iLength); FX_WORD FX_GetDefCodePageByLanguage(FX_WORD wLanguage); -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); +void FX_SwapByteOrder(FX_WCHAR* pStr, int32_t iLength); +void FX_SwapByteOrderCopy(const FX_WCHAR* pSrc, FX_WCHAR* pDst, int32_t iLength); +void FX_UTF16ToWChar(void* pBuffer, int32_t iLength); +void FX_UTF16ToWCharCopy(const FX_WORD *pUTF16, FX_WCHAR* pWChar, int32_t iLength); +void FX_WCharToUTF16(void* pBuffer, int32_t iLength); +void FX_WCharToUTF16Copy(const FX_WCHAR* pWChar, FX_WORD *pUTF16, int32_t iLength); +int32_t FX_DecodeString(FX_WORD wCodePage, const FX_CHAR* pSrc, int32_t *pSrcLen, FX_WCHAR* pDst, int32_t *pDstLen, FX_BOOL bErrBreak = FALSE); +int32_t FX_UTF8Decode(const FX_CHAR* pSrc, int32_t *pSrcLen, FX_WCHAR* pDst, int32_t *pDstLen); enum FX_CODESYSTEM { FX_MBCS = 0, FX_SBCS , @@ -177,7 +177,7 @@ typedef struct _FX_CPCU_MAPTABLE2 { typedef struct _FX_CPCU_MAPINFO { FX_CPCU_MAPTABLE1 *pMapTable1; FX_CPCU_MAPTABLE2 *pMapTable2; - FX_LPCBYTE pMapData; + const uint8_t* pMapData; } FX_CPCU_MAPINFO; typedef struct _FX_CPUC_MAPTABLE { uint16_t uStartUnicode; @@ -188,7 +188,7 @@ typedef struct _FX_CPUC_MAPTABLE { typedef struct _FX_CPUC_MAPINFO { uint32_t uMapCount; FX_CPUC_MAPTABLE *pMapTable; - FX_LPCBYTE pMapData; + const uint8_t* pMapData; } FX_CPUC_MAPINFO; typedef struct _FX_CODEPAGE { FX_CODEPAGE_HEADER const *pCPHeader; diff --git a/xfa/src/fgas/include/fx_fnt.h b/xfa/src/fgas/include/fx_fnt.h index 85d6e3edff..6b328d9741 100644 --- a/xfa/src/fgas/include/fx_fnt.h +++ b/xfa/src/fgas/include/fx_fnt.h @@ -45,9 +45,9 @@ public: 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, int32_t iLength, IFX_FontMgr *pFontMgr); - static IFX_Font* LoadFont(FX_LPCWSTR pszFileName, IFX_FontMgr *pFontMgr); + static IFX_Font* LoadFont(const FX_WCHAR* pszFontFamily, FX_DWORD dwFontStyles, FX_WORD wCodePage, IFX_FontMgr *pFontMgr); + static IFX_Font* LoadFont(const uint8_t* pBuffer, int32_t iLength, IFX_FontMgr *pFontMgr); + static IFX_Font* LoadFont(const FX_WCHAR* 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); virtual void Release() = 0; @@ -74,7 +74,7 @@ public: }; #if _FXM_PLATFORM_ == _FXM_PLATFORM_WINDOWS_ typedef struct _FX_FONTMATCHPARAMS { - FX_LPCWSTR pwsFamily; + const FX_WCHAR* pwsFamily; FX_DWORD dwFontStyles; FX_DWORD dwUSB; FX_DWORD dwMatchFlags; @@ -104,23 +104,23 @@ inline FX_BOOL operator == (const FX_FONTDESCRIPTOR &left, const FX_FONTDESCRIPT #define FX_FONTMATCHPARA_MacthStyle 0x01 #define FX_FONTMATCHPARA_MacthFamily 0x02 #define FX_FONTMATCHPARA_MacthUnicode 0x04 -typedef void (*FX_LPEnumAllFonts)(CFX_FontDescriptors &fonts, FX_LPVOID pUserData, FX_LPCWSTR pwsFaceName, FX_WCHAR wUnicode); +typedef void (*FX_LPEnumAllFonts)(CFX_FontDescriptors &fonts, void* pUserData, const FX_WCHAR* pwsFaceName, FX_WCHAR wUnicode); FX_LPEnumAllFonts FX_GetDefFontEnumerator(); -typedef FX_LPCFONTDESCRIPTOR (*FX_LPMatchFont)(FX_LPFONTMATCHPARAMS pParams, const CFX_FontDescriptors &fonts, FX_LPVOID pUserData); +typedef FX_LPCFONTDESCRIPTOR (*FX_LPMatchFont)(FX_LPFONTMATCHPARAMS pParams, const CFX_FontDescriptors &fonts, void* pUserData); FX_LPMatchFont FX_GetDefFontMatchor(); class IFX_FontMgr { public: - static IFX_FontMgr* Create(FX_LPEnumAllFonts pEnumerator, FX_LPMatchFont pMatcher = NULL, FX_LPVOID pUserData = NULL); + static IFX_FontMgr* Create(FX_LPEnumAllFonts pEnumerator, FX_LPMatchFont pMatcher = NULL, void* 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(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, 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* GetDefFontByCodePage(FX_WORD wCodePage, FX_DWORD dwFontStyles, const FX_WCHAR* pszFontFamily = NULL) = 0; + virtual IFX_Font* GetDefFontByCharset(uint8_t nCharset, FX_DWORD dwFontStyles, const FX_WCHAR* pszFontFamily = NULL) = 0; + virtual IFX_Font* GetDefFontByUnicode(FX_WCHAR wUnicode, FX_DWORD dwFontStyles, const FX_WCHAR* pszFontFamily = NULL) = 0; + virtual IFX_Font* GetDefFontByLanguage(FX_WORD wLanguage, FX_DWORD dwFontStyles, const FX_WCHAR* pszFontFamily = NULL) = 0; + virtual IFX_Font* LoadFont(const FX_WCHAR* pszFontFamily, FX_DWORD dwFontStyles, FX_WORD wCodePage = 0xFFFF) = 0; + virtual IFX_Font* LoadFont(const uint8_t* pBuffer, int32_t iLength) = 0; + virtual IFX_Font* LoadFont(const FX_WCHAR* pszFileName) = 0; + virtual IFX_Font* LoadFont(IFX_Stream *pFontStream, const FX_WCHAR* 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; virtual void ClearFontCache() = 0; virtual void RemoveFont(IFX_Font *pFont) = 0; @@ -129,38 +129,38 @@ public: 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, 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; + virtual IFX_Font* GetDefFontByCodePage(IFX_FontMgr* pFontMgr, FX_WORD wCodePage, FX_DWORD dwFontStyles, const FX_WCHAR* pszFontFamily = NULL) = 0; + virtual IFX_Font* GetDefFontByCharset(IFX_FontMgr* pFontMgr, uint8_t nCharset, FX_DWORD dwFontStyles, const FX_WCHAR* pszFontFamily = NULL) = 0; + virtual IFX_Font* GetDefFontByUnicode(IFX_FontMgr* pFontMgr, FX_WCHAR wUnicode, FX_DWORD dwFontStyles, const FX_WCHAR* pszFontFamily = NULL) = 0; + virtual IFX_Font* GetDefFontByLanguage(IFX_FontMgr* pFontMgr, FX_WORD wLanguage, FX_DWORD dwFontStyles, const FX_WCHAR* pszFontFamily = NULL) = 0; }; class IFX_FontSourceEnum { public: virtual void Release() = 0; - virtual FX_POSITION GetStartPosition(FX_LPVOID pUserData = NULL) = 0; - virtual IFX_FileAccess* GetNext(FX_POSITION& pos, FX_LPVOID pUserData = NULL) = 0; + virtual FX_POSITION GetStartPosition(void* pUserData = NULL) = 0; + virtual IFX_FileAccess* GetNext(FX_POSITION& pos, void* pUserData = NULL) = 0; }; IFX_FontSourceEnum* FX_CreateDefaultFontSourceEnum(); class IFX_FontMgr { public: - static IFX_FontMgr* Create(IFX_FontSourceEnum* pFontEnum, IFX_FontMgrDelegate* pDelegate = NULL, FX_LPVOID pUserData = NULL); + static IFX_FontMgr* Create(IFX_FontSourceEnum* pFontEnum, IFX_FontMgrDelegate* pDelegate = NULL, void* 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(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; - inline IFX_Font* LoadFont(FX_LPCWSTR pszFontFamily, FX_DWORD dwFontStyles, FX_WORD wCodePage) + virtual IFX_Font* GetDefFontByCodePage(FX_WORD wCodePage, FX_DWORD dwFontStyles, const FX_WCHAR* pszFontFamily = NULL) = 0; + virtual IFX_Font* GetDefFontByCharset(uint8_t nCharset, FX_DWORD dwFontStyles, const FX_WCHAR* pszFontFamily = NULL) = 0; + virtual IFX_Font* GetDefFontByUnicode(FX_WCHAR wUnicode, FX_DWORD dwFontStyles, const FX_WCHAR* pszFontFamily = NULL) = 0; + virtual IFX_Font* GetDefFontByLanguage(FX_WORD wLanguage, FX_DWORD dwFontStyles, const FX_WCHAR* pszFontFamily = NULL) = 0; + virtual IFX_Font* GetFontByCodePage(FX_WORD wCodePage, FX_DWORD dwFontStyles, const FX_WCHAR* pszFontFamily = NULL) = 0; + inline IFX_Font* LoadFont(const FX_WCHAR* pszFontFamily, FX_DWORD dwFontStyles, FX_WORD wCodePage) { return GetFontByCodePage(wCodePage, dwFontStyles, pszFontFamily); } - 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, 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* GetFontByCharset(uint8_t nCharset, FX_DWORD dwFontStyles, const FX_WCHAR* pszFontFamily = NULL) = 0; + virtual IFX_Font* GetFontByUnicode(FX_WCHAR wUnicode, FX_DWORD dwFontStyles, const FX_WCHAR* pszFontFamily = NULL) = 0; + virtual IFX_Font* GetFontByLanguage(FX_WORD wLanguage, FX_DWORD dwFontStyles, const FX_WCHAR* pszFontFamily = NULL) = 0; + virtual IFX_Font* LoadFont(const uint8_t* pBuffer, int32_t iLength, int32_t iFaceIndex, int32_t* pFaceCount = NULL) = 0; + virtual IFX_Font* LoadFont(const FX_WCHAR* 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; diff --git a/xfa/src/fgas/include/fx_lbk.h b/xfa/src/fgas/include/fx_lbk.h index f161bb4355..27a072a3b8 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, int32_t iLength); -void FX_GetLineBreakPositions(FX_LPCWSTR pwsText, int32_t iLength, CFX_Int32MassArray &bp); +void FX_GetLineBreakPositions(const FX_WCHAR* pwsText, FX_LINEBREAKTYPE *pBrkType, int32_t iLength); +void FX_GetLineBreakPositions(const FX_WCHAR* 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 7f4cce5776..ef6b910b00 100644 --- a/xfa/src/fgas/include/fx_locale.h +++ b/xfa/src/fgas/include/fx_locale.h @@ -79,7 +79,7 @@ public: virtual IFX_Locale* GetLocale(FX_WORD lcid) = 0; virtual IFX_Locale* GetLocaleByName(FX_WSTR wsLocaleName) = 0; }; -IFX_LocaleMgr* FX_LocaleMgr_Create(FX_LPCWSTR pszLocalPath, FX_WORD wDefaultLCID); +IFX_LocaleMgr* FX_LocaleMgr_Create(const FX_WCHAR* pszLocalPath, FX_WORD wDefaultLCID); void FX_ParseNumString(const CFX_WideString& wsNum, CFX_WideString& wsResult); FX_BOOL FX_DateFromCanonical(const CFX_WideString& wsDate, CFX_Unitime& datetime); FX_BOOL FX_TimeFromCanonical(FX_WSTR wsTime, CFX_Unitime& datetime, IFX_Locale* pLocale); diff --git a/xfa/src/fgas/include/fx_rbk.h b/xfa/src/fgas/include/fx_rbk.h index cff63ee490..282b6e37db 100644 --- a/xfa/src/fgas/include/fx_rbk.h +++ b/xfa/src/fgas/include/fx_rbk.h @@ -68,7 +68,7 @@ typedef struct _FX_RTFTEXTOBJ { iHorizontalScale = 100; iVerticalScale = 100; } - FX_LPCWSTR pStr; + const FX_WCHAR* pStr; int32_t *pWidths; int32_t iLength; IFX_Font *pFont; @@ -139,7 +139,7 @@ public: FXSYS_assert(index > -1 && index < m_iChars && m_pChars != NULL); return m_pChars->GetDataPtr(m_iStartChar + index); } - void GetString (FX_LPWSTR pText) const + void GetString (FX_WCHAR* pText) const { FXSYS_assert(pText != NULL); int32_t iEndChar = m_iStartChar + m_iChars; @@ -151,7 +151,7 @@ public: } void GetString(CFX_WideString &wsText) const { - FX_LPWSTR pText = wsText.GetBuffer(m_iChars); + FX_WCHAR* pText = wsText.GetBuffer(m_iChars); GetString(pText); wsText.ReleaseBuffer(m_iChars); } diff --git a/xfa/src/fgas/include/fx_sax.h b/xfa/src/fgas/include/fx_sax.h index e45ca4e6d8..a6122c48e5 100644 --- a/xfa/src/fgas/include/fx_sax.h +++ b/xfa/src/fgas/include/fx_sax.h @@ -27,13 +27,13 @@ enum FX_SAXNODE { class IFX_SAXReaderHandler { public: - virtual FX_LPVOID OnTagEnter(FX_BSTR bsTagName, FX_SAXNODE eType, FX_DWORD dwStartPos) = 0; - virtual void OnTagAttribute(FX_LPVOID pTag, FX_BSTR bsAttri, FX_BSTR bsValue) = 0; - virtual void OnTagBreak(FX_LPVOID pTag) = 0; - virtual void OnTagData(FX_LPVOID pTag, FX_SAXNODE eType, FX_BSTR bsData, FX_DWORD dwStartPos) = 0; - virtual void OnTagClose(FX_LPVOID pTag, FX_DWORD dwEndPos) = 0; - virtual void OnTagEnd(FX_LPVOID pTag, FX_BSTR bsTagName, FX_DWORD dwEndPos) = 0; - virtual void OnTargetData(FX_LPVOID pTag, FX_SAXNODE eType, FX_BSTR bsData, FX_DWORD dwStartPos) = 0; + virtual void* OnTagEnter(FX_BSTR bsTagName, FX_SAXNODE eType, FX_DWORD dwStartPos) = 0; + virtual void OnTagAttribute(void* pTag, FX_BSTR bsAttri, FX_BSTR bsValue) = 0; + virtual void OnTagBreak(void* pTag) = 0; + virtual void OnTagData(void* pTag, FX_SAXNODE eType, FX_BSTR bsData, FX_DWORD dwStartPos) = 0; + virtual void OnTagClose(void* pTag, FX_DWORD dwEndPos) = 0; + virtual void OnTagEnd(void* pTag, FX_BSTR bsTagName, FX_DWORD dwEndPos) = 0; + virtual void OnTargetData(void* pTag, FX_SAXNODE eType, FX_BSTR bsData, FX_DWORD dwStartPos) = 0; }; class IFX_SAXReader { diff --git a/xfa/src/fgas/include/fx_stm.h b/xfa/src/fgas/include/fx_stm.h index e6094d445c..b10b06a830 100644 --- a/xfa/src/fgas/include/fx_stm.h +++ b/xfa/src/fgas/include/fx_stm.h @@ -33,8 +33,8 @@ class IFX_Stream 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, int32_t length, FX_DWORD dwAccess); + static IFX_Stream* CreateStream(const FX_WCHAR* pszFileName, FX_DWORD dwAccess); + static IFX_Stream* CreateStream(uint8_t* 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; @@ -44,10 +44,10 @@ public: virtual int32_t Seek(FX_STREAMSEEK eSeek, int32_t iOffset) = 0; virtual int32_t GetPosition() = 0; virtual FX_BOOL IsEOF() const = 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 int32_t ReadData(uint8_t* pBuffer, int32_t iBufferSize) = 0; + virtual int32_t ReadString(FX_WCHAR* pStr, int32_t iMaxLength, FX_BOOL &bEOS, int32_t const *pByteSize = NULL) = 0; + virtual int32_t WriteData(const uint8_t* pBuffer, int32_t iBufferSize) = 0; + virtual int32_t WriteString(const FX_WCHAR* pStr, int32_t iLength) = 0; virtual void Flush() = 0; virtual FX_BOOL SetLength(int32_t iLength) = 0; virtual int32_t GetBOM(uint8_t bom[4]) const = 0; diff --git a/xfa/src/fgas/include/fx_sys.h b/xfa/src/fgas/include/fx_sys.h index 8e099bce05..3982e0d285 100644 --- a/xfa/src/fgas/include/fx_sys.h +++ b/xfa/src/fgas/include/fx_sys.h @@ -24,11 +24,11 @@ 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, 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); -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); +FX_FLOAT FX_strtof(const FX_CHAR* pcsStr, int32_t iLength = -1, int32_t *pUsedLen = NULL); +FX_FLOAT FX_wcstof(const FX_WCHAR* pwsStr, int32_t iLength = -1, int32_t *pUsedLen = NULL); +FX_WCHAR* FX_wcsncpy(FX_WCHAR* dstStr, const FX_WCHAR* srcStr, size_t count); +int32_t FX_wcsnicmp(const FX_WCHAR* s1, const FX_WCHAR* s2, size_t count); +int32_t FX_strnicmp(const FX_CHAR* s1, const FX_CHAR* s2, size_t count); inline FX_BOOL FX_islower(int32_t ch) { return ch >= 'a' && ch <= 'z'; @@ -47,8 +47,8 @@ inline int32_t FX_toupper(int32_t ch) } 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); +void FX_memset(void* pBuf, int32_t iValue, size_t size); +void FX_memcpy(void* pDst, const void* 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); typedef struct _FX_VERSION { diff --git a/xfa/src/fgas/include/fx_tbk.h b/xfa/src/fgas/include/fx_tbk.h index 69b42f1fd7..e48e2eedf4 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, int32_t index) const = 0; - virtual int32_t GetWidth(FX_LPVOID pIdentity, int32_t index) const = 0; + virtual FX_WCHAR GetChar(void* pIdentity, int32_t index) const = 0; + virtual int32_t GetWidth(void* pIdentity, int32_t index) const = 0; }; typedef struct _FX_TXTRUN { _FX_TXTRUN() @@ -83,8 +83,8 @@ typedef struct _FX_TXTRUN { bSkipSpace = TRUE; } IFX_TxtAccess *pAccess; - FX_LPVOID pIdentity; - FX_LPCWSTR pStr; + void* pIdentity; + const FX_WCHAR* pStr; int32_t *pWidths; int32_t iLength; IFX_Font *pFont; @@ -133,7 +133,7 @@ public: FXSYS_assert(index > -1 && index < m_iChars && m_pChars != NULL); return m_pChars->GetDataPtr(m_iStartChar + index); } - void GetString(FX_LPWSTR pText) const + void GetString(FX_WCHAR* pText) const { FXSYS_assert(pText != NULL); int32_t iEndChar = m_iStartChar + m_iChars; @@ -146,7 +146,7 @@ public: void GetString(CFX_WideString &wsText) const { - FX_LPWSTR pText = wsText.GetBuffer(m_iChars); + FX_WCHAR* pText = wsText.GetBuffer(m_iChars); GetString(pText); wsText.ReleaseBuffer(m_iChars); } @@ -171,7 +171,7 @@ public: int32_t m_iVerticalScale; FX_DWORD m_dwCharStyles; CFX_TxtCharArray *m_pChars; - FX_LPVOID m_pUserData; + void* m_pUserData; }; typedef CFX_BaseArrayTemplate CFX_TxtPieceArray; class IFX_TxtBreak @@ -197,7 +197,7 @@ public: 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 void SetUserData(void* pUserData) = 0; virtual FX_DWORD AppendChar(FX_WCHAR wch) = 0; virtual FX_DWORD EndBreak(FX_DWORD dwStatus = FX_TXTBREAK_PieceBreak) = 0; virtual int32_t CountBreakChars() const = 0; diff --git a/xfa/src/fgas/include/fx_utl.h b/xfa/src/fgas/include/fx_utl.h index 35b676f41e..38342a8cc8 100644 --- a/xfa/src/fgas/include/fx_utl.h +++ b/xfa/src/fgas/include/fx_utl.h @@ -29,7 +29,7 @@ public: void Lock(); void Unlock(); private: - FX_LPVOID m_pData; + void* m_pData; }; class CFX_BaseArray : public CFX_Target { @@ -38,14 +38,14 @@ protected: ~CFX_BaseArray(); 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; + uint8_t* AddSpaceTo(int32_t index); + uint8_t* GetAt(int32_t index) const; + uint8_t* GetBuffer() const; 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; + void* m_pData; }; template class CFX_BaseArrayTemplate : public CFX_BaseArray @@ -108,7 +108,7 @@ public: CFX_BaseArray::RemoveAll(bLeaveMemory); } }; -typedef CFX_BaseArrayTemplate CFDE_PtrArray; +typedef CFX_BaseArrayTemplate CFDE_PtrArray; typedef CFX_BaseArrayTemplate CFDE_DWordArray; typedef CFX_BaseArrayTemplate CFDE_WordArray; template @@ -162,7 +162,7 @@ public: } iSize = CFX_BaseArray::GetSize(); CFX_BaseArray::AddSpaceTo(iSize + iCount - 1); - FX_LPBYTE *pStart = CFX_BaseArray::GetAt(iSize); + uint8_t* *pStart = CFX_BaseArray::GetAt(iSize); int32_t iBlockSize = CFX_BaseArray::GetBlockSize(); iSize = iStart + iCount; for (int32_t i = iStart; i < iSize; i ++) { @@ -190,7 +190,7 @@ public: } RemoveAll(TRUE); CFX_BaseArray::AddSpaceTo(iCount - 1); - FX_LPBYTE *pStart = CFX_BaseArray::GetAt(0); + uint8_t* *pStart = CFX_BaseArray::GetAt(0); int32_t iBlockSize = CFX_BaseArray::GetBlockSize(); iSize = iStart + iCount; for (int32_t i = iStart; i < iSize; i ++) { @@ -228,8 +228,8 @@ protected: CFX_BaseMassArray(int32_t iChunkSize, int32_t iBlockSize); ~CFX_BaseMassArray(); int32_t GetSize() const; - FX_LPBYTE AddSpaceTo(int32_t index); - FX_LPBYTE GetAt(int32_t index) const; + uint8_t* AddSpaceTo(int32_t index); + uint8_t* 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); @@ -289,7 +289,7 @@ public: CFX_BaseMassArray::RemoveAll(bLeaveMemory); } }; -typedef CFX_MassArrayTemplate CFX_PtrMassArray; +typedef CFX_MassArrayTemplate CFX_PtrMassArray; typedef CFX_MassArrayTemplate CFX_Int32MassArray; typedef CFX_MassArrayTemplate CFX_DWordMassArray; typedef CFX_MassArrayTemplate CFX_WordMassArray; @@ -390,10 +390,10 @@ class CFX_BaseDiscreteArray : public CFX_Target protected: CFX_BaseDiscreteArray(int32_t iChunkSize, int32_t iBlockSize); ~CFX_BaseDiscreteArray(); - FX_LPBYTE AddSpaceTo(int32_t index); - FX_LPBYTE GetAt(int32_t index) const; + uint8_t* AddSpaceTo(int32_t index); + uint8_t* GetAt(int32_t index) const; void RemoveAll(); - FX_LPVOID m_pData; + void* m_pData; }; template class CFX_DiscreteArrayTemplate : public CFX_BaseDiscreteArray @@ -418,7 +418,7 @@ public: CFX_BaseDiscreteArray::RemoveAll(); } }; -typedef CFX_DiscreteArrayTemplate CFX_PtrDiscreteArray; +typedef CFX_DiscreteArrayTemplate CFX_PtrDiscreteArray; typedef CFX_DiscreteArrayTemplate CFX_DWordDiscreteArray; typedef CFX_DiscreteArrayTemplate CFX_WordDiscreteArray; class CFX_BaseStack : public CFX_Target @@ -426,11 +426,11 @@ class CFX_BaseStack : public CFX_Target protected: CFX_BaseStack(int32_t iChunkSize, int32_t iBlockSize); ~CFX_BaseStack(); - FX_LPBYTE Push(); + uint8_t* Push(); void Pop(); - FX_LPBYTE GetTopElement() const; + uint8_t* GetTopElement() const; int32_t GetSize() const; - FX_LPBYTE GetAt(int32_t index) const; + uint8_t* GetAt(int32_t index) const; void RemoveAll(FX_BOOL bLeaveMemory = FALSE); CFX_BaseMassArrayImp* m_pData; }; @@ -466,7 +466,7 @@ public: CFX_BaseStack::RemoveAll(bLeaveMemory); } }; -typedef CFX_StackTemplate CFX_PtrStack; +typedef CFX_StackTemplate CFX_PtrStack; typedef CFX_StackTemplate CFX_DWordStack; typedef CFX_StackTemplate CFX_WordStack; typedef CFX_StackTemplate CFX_Int32Stack; -- cgit v1.2.3