summaryrefslogtreecommitdiff
path: root/xfa/fgas/font
diff options
context:
space:
mode:
authortsepez <tsepez@chromium.org>2016-03-25 14:38:58 -0700
committerCommit bot <commit-bot@chromium.org>2016-03-25 14:38:58 -0700
commitdeee3d2ee201d62e7ef41e7d8378d7f52e057a9c (patch)
treef9f64d5f24376108a697299f8574ae3a7fe3511b /xfa/fgas/font
parent736f28ab2434e2da1de66ff91b64741483ff9cba (diff)
downloadpdfium-deee3d2ee201d62e7ef41e7d8378d7f52e057a9c.tar.xz
Remove FX_DWORD from XFA, part 2
Some headers were missed in the previous CL. Review URL: https://codereview.chromium.org/1835703002
Diffstat (limited to 'xfa/fgas/font')
-rw-r--r--xfa/fgas/font/fgas_font.h60
-rw-r--r--xfa/fgas/font/fgas_fontutils.h6
-rw-r--r--xfa/fgas/font/fgas_gefont.h12
-rw-r--r--xfa/fgas/font/fgas_stdfontmgr.h66
4 files changed, 72 insertions, 72 deletions
diff --git a/xfa/fgas/font/fgas_font.h b/xfa/fgas/font/fgas_font.h
index b13602cee6..8b1091ff50 100644
--- a/xfa/fgas/font/fgas_font.h
+++ b/xfa/fgas/font/fgas_font.h
@@ -60,7 +60,7 @@ class IFX_FontProvider {
class IFX_Font {
public:
static IFX_Font* LoadFont(const FX_WCHAR* pszFontFamily,
- FX_DWORD dwFontStyles,
+ uint32_t dwFontStyles,
uint16_t wCodePage,
IFX_FontMgr* pFontMgr);
static IFX_Font* LoadFont(const uint8_t* pBuffer,
@@ -76,10 +76,10 @@ class IFX_Font {
virtual ~IFX_Font() {}
virtual void Release() = 0;
virtual IFX_Font* Retain() = 0;
- virtual IFX_Font* Derive(FX_DWORD dwFontStyles, uint16_t wCodePage = 0) = 0;
+ virtual IFX_Font* Derive(uint32_t dwFontStyles, uint16_t wCodePage = 0) = 0;
virtual void GetFamilyName(CFX_WideString& wsFamily) const = 0;
virtual void GetPsName(CFX_WideString& wsName) const = 0;
- virtual FX_DWORD GetFontStyles() const = 0;
+ virtual uint32_t GetFontStyles() const = 0;
virtual uint8_t GetCharSet() const = 0;
virtual FX_BOOL GetCharWidth(FX_WCHAR wUnicode,
int32_t& iWidth,
@@ -98,15 +98,15 @@ class IFX_Font {
virtual void* GetDevFont() const = 0;
virtual void SetFontProvider(IFX_FontProvider* pProvider) = 0;
#if _FXM_PLATFORM_ != _FXM_PLATFORM_WINDOWS_
- virtual void SetLogicalFontStyle(FX_DWORD dwLogFontStyle) = 0;
+ virtual void SetLogicalFontStyle(uint32_t dwLogFontStyle) = 0;
#endif
};
#if _FXM_PLATFORM_ == _FXM_PLATFORM_WINDOWS_
struct FX_FONTMATCHPARAMS {
const FX_WCHAR* pwsFamily;
- FX_DWORD dwFontStyles;
- FX_DWORD dwUSB;
- FX_DWORD dwMatchFlags;
+ uint32_t dwFontStyles;
+ uint32_t dwUSB;
+ uint32_t dwMatchFlags;
FX_WCHAR wUnicode;
uint16_t wCodePage;
};
@@ -114,8 +114,8 @@ typedef FX_FONTMATCHPARAMS* FX_LPFONTMATCHPARAMS;
typedef FX_FONTMATCHPARAMS const* FX_LPCFONTMATCHPARAMS;
struct FX_FONTSIGNATURE {
- FX_DWORD fsUsb[4];
- FX_DWORD fsCsb[2];
+ uint32_t fsUsb[4];
+ uint32_t fsCsb[2];
};
inline bool operator==(const FX_FONTSIGNATURE& left,
const FX_FONTSIGNATURE& right) {
@@ -126,7 +126,7 @@ inline bool operator==(const FX_FONTSIGNATURE& left,
struct FX_FONTDESCRIPTOR {
FX_WCHAR wsFontFace[32];
- FX_DWORD dwFontStyles;
+ uint32_t dwFontStyles;
uint8_t uCharSet;
FX_FONTSIGNATURE FontSignature;
};
@@ -162,32 +162,32 @@ class IFX_FontMgr {
virtual void Release() = 0;
virtual IFX_Font* GetDefFontByCodePage(
uint16_t wCodePage,
- FX_DWORD dwFontStyles,
+ uint32_t dwFontStyles,
const FX_WCHAR* pszFontFamily = NULL) = 0;
virtual IFX_Font* GetDefFontByCharset(
uint8_t nCharset,
- FX_DWORD dwFontStyles,
+ uint32_t dwFontStyles,
const FX_WCHAR* pszFontFamily = NULL) = 0;
virtual IFX_Font* GetDefFontByUnicode(
FX_WCHAR wUnicode,
- FX_DWORD dwFontStyles,
+ uint32_t dwFontStyles,
const FX_WCHAR* pszFontFamily = NULL) = 0;
virtual IFX_Font* GetDefFontByLanguage(
uint16_t wLanguage,
- FX_DWORD dwFontStyles,
+ uint32_t dwFontStyles,
const FX_WCHAR* pszFontFamily = NULL) = 0;
virtual IFX_Font* LoadFont(const FX_WCHAR* pszFontFamily,
- FX_DWORD dwFontStyles,
+ uint32_t dwFontStyles,
uint16_t 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,
+ uint32_t dwFontStyles = 0,
uint16_t wCodePage = 0,
FX_BOOL bSaveStream = FALSE) = 0;
virtual IFX_Font* LoadFont(IFX_Font* pSrcFont,
- FX_DWORD dwFontStyles,
+ uint32_t dwFontStyles,
uint16_t wCodePage = 0xFFFF) = 0;
virtual void ClearFontCache() = 0;
virtual void RemoveFont(IFX_Font* pFont) = 0;
@@ -199,22 +199,22 @@ class IFX_FontMgrDelegate {
virtual IFX_Font* GetDefFontByCodePage(
IFX_FontMgr* pFontMgr,
uint16_t wCodePage,
- FX_DWORD dwFontStyles,
+ uint32_t dwFontStyles,
const FX_WCHAR* pszFontFamily = NULL) = 0;
virtual IFX_Font* GetDefFontByCharset(
IFX_FontMgr* pFontMgr,
uint8_t nCharset,
- FX_DWORD dwFontStyles,
+ uint32_t dwFontStyles,
const FX_WCHAR* pszFontFamily = NULL) = 0;
virtual IFX_Font* GetDefFontByUnicode(
IFX_FontMgr* pFontMgr,
FX_WCHAR wUnicode,
- FX_DWORD dwFontStyles,
+ uint32_t dwFontStyles,
const FX_WCHAR* pszFontFamily = NULL) = 0;
virtual IFX_Font* GetDefFontByLanguage(
IFX_FontMgr* pFontMgr,
uint16_t wLanguage,
- FX_DWORD dwFontStyles,
+ uint32_t dwFontStyles,
const FX_WCHAR* pszFontFamily = NULL) = 0;
};
class IFX_FontSourceEnum {
@@ -234,36 +234,36 @@ class IFX_FontMgr {
virtual void Release() = 0;
virtual IFX_Font* GetDefFontByCodePage(
uint16_t wCodePage,
- FX_DWORD dwFontStyles,
+ uint32_t dwFontStyles,
const FX_WCHAR* pszFontFamily = NULL) = 0;
virtual IFX_Font* GetDefFontByCharset(
uint8_t nCharset,
- FX_DWORD dwFontStyles,
+ uint32_t dwFontStyles,
const FX_WCHAR* pszFontFamily = NULL) = 0;
virtual IFX_Font* GetDefFontByUnicode(
FX_WCHAR wUnicode,
- FX_DWORD dwFontStyles,
+ uint32_t dwFontStyles,
const FX_WCHAR* pszFontFamily = NULL) = 0;
virtual IFX_Font* GetDefFontByLanguage(
uint16_t wLanguage,
- FX_DWORD dwFontStyles,
+ uint32_t dwFontStyles,
const FX_WCHAR* pszFontFamily = NULL) = 0;
virtual IFX_Font* GetFontByCodePage(uint16_t wCodePage,
- FX_DWORD dwFontStyles,
+ uint32_t dwFontStyles,
const FX_WCHAR* pszFontFamily = NULL) = 0;
inline IFX_Font* LoadFont(const FX_WCHAR* pszFontFamily,
- FX_DWORD dwFontStyles,
+ uint32_t dwFontStyles,
uint16_t wCodePage) {
return GetFontByCodePage(wCodePage, dwFontStyles, pszFontFamily);
}
virtual IFX_Font* GetFontByCharset(uint8_t nCharset,
- FX_DWORD dwFontStyles,
+ uint32_t dwFontStyles,
const FX_WCHAR* pszFontFamily = NULL) = 0;
virtual IFX_Font* GetFontByUnicode(FX_WCHAR wUnicode,
- FX_DWORD dwFontStyles,
+ uint32_t dwFontStyles,
const FX_WCHAR* pszFontFamily = NULL) = 0;
virtual IFX_Font* GetFontByLanguage(uint16_t wLanguage,
- FX_DWORD dwFontStyles,
+ uint32_t dwFontStyles,
const FX_WCHAR* pszFontFamily = NULL) = 0;
virtual IFX_Font* LoadFont(const uint8_t* pBuffer,
int32_t iLength,
diff --git a/xfa/fgas/font/fgas_fontutils.h b/xfa/fgas/font/fgas_fontutils.h
index 764aa6b937..4cb4671238 100644
--- a/xfa/fgas/font/fgas_fontutils.h
+++ b/xfa/fgas/font/fgas_fontutils.h
@@ -16,9 +16,9 @@ struct FGAS_FONTUSB {
uint16_t wCodePage;
};
-FX_DWORD FGAS_GetFontHashCode(uint16_t wCodePage, FX_DWORD dwFontStyles);
-FX_DWORD FGAS_GetFontFamilyHash(const FX_WCHAR* pszFontFamily,
- FX_DWORD dwFontStyles,
+uint32_t FGAS_GetFontHashCode(uint16_t wCodePage, uint32_t dwFontStyles);
+uint32_t FGAS_GetFontFamilyHash(const FX_WCHAR* pszFontFamily,
+ uint32_t dwFontStyles,
uint16_t wCodePage);
const FGAS_FONTUSB* FGAS_GetUnicodeBitField(FX_WCHAR wUnicode);
diff --git a/xfa/fgas/font/fgas_gefont.h b/xfa/fgas/font/fgas_gefont.h
index 03bc32ce63..044acdeb7f 100644
--- a/xfa/fgas/font/fgas_gefont.h
+++ b/xfa/fgas/font/fgas_gefont.h
@@ -14,22 +14,22 @@
class CFX_GEFont : public IFX_Font {
public:
- CFX_GEFont(const CFX_GEFont& src, FX_DWORD dwFontStyles);
+ CFX_GEFont(const CFX_GEFont& src, uint32_t dwFontStyles);
CFX_GEFont(IFX_FontMgr* pFontMgr);
~CFX_GEFont();
virtual void Release();
virtual IFX_Font* Retain();
FX_BOOL LoadFont(const FX_WCHAR* pszFontFamily,
- FX_DWORD dwFontStyles,
+ uint32_t dwFontStyles,
uint16_t wCodePage);
FX_BOOL LoadFont(const uint8_t* pBuffer, int32_t length);
FX_BOOL LoadFont(const FX_WCHAR* pszFileName);
FX_BOOL LoadFont(IFX_Stream* pFontStream, FX_BOOL bSaveStream);
FX_BOOL LoadFont(CFX_Font* pExtFont, FX_BOOL bTakeOver = FALSE);
- virtual IFX_Font* Derive(FX_DWORD dwFontStyles, uint16_t wCodePage = 0);
+ virtual IFX_Font* Derive(uint32_t dwFontStyles, uint16_t wCodePage = 0);
virtual void GetFamilyName(CFX_WideString& wsFamily) const;
virtual void GetPsName(CFX_WideString& wsName) const;
- virtual FX_DWORD GetFontStyles() const;
+ virtual uint32_t GetFontStyles() const;
virtual uint8_t GetCharSet() const;
virtual FX_BOOL GetCharWidth(FX_WCHAR wUnicode,
int32_t& iWidth,
@@ -49,7 +49,7 @@ class CFX_GEFont : public IFX_Font {
m_pProvider = pProvider;
}
#if _FXM_PLATFORM_ != _FXM_PLATFORM_WINDOWS_
- virtual void SetLogicalFontStyle(FX_DWORD dwLogFontStyle) {
+ virtual void SetLogicalFontStyle(uint32_t dwLogFontStyle) {
m_bUseLogFontStyle = TRUE;
m_dwLogFontStyle = dwLogFontStyle;
}
@@ -58,7 +58,7 @@ class CFX_GEFont : public IFX_Font {
protected:
#if _FXM_PLATFORM_ != _FXM_PLATFORM_WINDOWS_
FX_BOOL m_bUseLogFontStyle;
- FX_DWORD m_dwLogFontStyle;
+ uint32_t m_dwLogFontStyle;
#endif
CFX_Font* m_pFont;
IFX_FontMgr* m_pFontMgr;
diff --git a/xfa/fgas/font/fgas_stdfontmgr.h b/xfa/fgas/font/fgas_stdfontmgr.h
index 574eefad23..433f2df276 100644
--- a/xfa/fgas/font/fgas_stdfontmgr.h
+++ b/xfa/fgas/font/fgas_stdfontmgr.h
@@ -14,7 +14,7 @@
#include "xfa/fgas/font/fgas_font.h"
#if _FXM_PLATFORM_ == _FXM_PLATFORM_WINDOWS_
-int32_t FX_GetSimilarValue(FX_LPCFONTDESCRIPTOR pFont, FX_DWORD dwFontStyles);
+int32_t FX_GetSimilarValue(FX_LPCFONTDESCRIPTOR pFont, uint32_t dwFontStyles);
FX_LPCFONTDESCRIPTOR FX_DefFontMatcher(FX_LPFONTMATCHPARAMS pParams,
const CFX_FontDescriptors& fonts,
void* pUserData);
@@ -27,29 +27,29 @@ class CFX_StdFontMgrImp : public IFX_FontMgr {
~CFX_StdFontMgrImp();
virtual void Release() { delete this; }
virtual IFX_Font* GetDefFontByCodePage(uint16_t wCodePage,
- FX_DWORD dwFontStyles,
+ uint32_t dwFontStyles,
const FX_WCHAR* pszFontFamily = NULL);
virtual IFX_Font* GetDefFontByCharset(uint8_t nCharset,
- FX_DWORD dwFontStyles,
+ uint32_t dwFontStyles,
const FX_WCHAR* pszFontFamily = NULL);
virtual IFX_Font* GetDefFontByUnicode(FX_WCHAR wUnicode,
- FX_DWORD dwFontStyles,
+ uint32_t dwFontStyles,
const FX_WCHAR* pszFontFamily = NULL);
virtual IFX_Font* GetDefFontByLanguage(uint16_t wLanguage,
- FX_DWORD dwFontStyles,
+ uint32_t dwFontStyles,
const FX_WCHAR* pszFontFamily = NULL);
virtual IFX_Font* LoadFont(const FX_WCHAR* pszFontFamily,
- FX_DWORD dwFontStyles,
+ uint32_t dwFontStyles,
uint16_t wCodePage = 0xFFFF);
virtual IFX_Font* LoadFont(const uint8_t* pBuffer, int32_t iLength);
virtual IFX_Font* LoadFont(const FX_WCHAR* pszFileName);
virtual IFX_Font* LoadFont(IFX_Stream* pFontStream,
const FX_WCHAR* pszFontAlias = NULL,
- FX_DWORD dwFontStyles = 0,
+ uint32_t dwFontStyles = 0,
uint16_t wCodePage = 0,
FX_BOOL bSaveStream = FALSE);
virtual IFX_Font* LoadFont(IFX_Font* pSrcFont,
- FX_DWORD dwFontStyles,
+ uint32_t dwFontStyles,
uint16_t wCodePage = 0xFFFF);
virtual void ClearFontCache();
virtual void RemoveFont(IFX_Font* pFont);
@@ -69,14 +69,14 @@ class CFX_StdFontMgrImp : public IFX_FontMgr {
void* m_pUserData;
void RemoveFont(CFX_MapPtrToPtr& fontMap, IFX_Font* pFont);
FX_LPCFONTDESCRIPTOR FindFont(const FX_WCHAR* pszFontFamily,
- FX_DWORD dwFontStyles,
- FX_DWORD dwMatchFlags,
+ uint32_t dwFontStyles,
+ uint32_t dwMatchFlags,
uint16_t wCodePage,
- FX_DWORD dwUSB = 999,
+ uint32_t dwUSB = 999,
FX_WCHAR wUnicode = 0);
- IFX_Font* GetFont(FX_LPCFONTDESCRIPTOR pFD, FX_DWORD dwFontStyles);
+ IFX_Font* GetFont(FX_LPCFONTDESCRIPTOR pFD, uint32_t dwFontStyles);
};
-FX_DWORD FX_GetGdiFontStyles(const LOGFONTW& lf);
+uint32_t FX_GetGdiFontStyles(const LOGFONTW& lf);
#else
@@ -96,9 +96,9 @@ class CFX_FontDescriptor {
int32_t m_nFaceIndex;
CFX_WideString m_wsFaceName;
CFX_WideStringArray m_wsFamilyNames;
- FX_DWORD m_dwFontStyles;
- FX_DWORD m_dwUsb[4];
- FX_DWORD m_dwCsb[2];
+ uint32_t m_dwFontStyles;
+ uint32_t m_dwUsb[4];
+ uint32_t m_dwCsb[2];
};
typedef CFX_ArrayTemplate<CFX_FontDescriptor*> CFX_FontDescriptors;
@@ -142,11 +142,11 @@ class CFX_FontSourceEnum_File : public IFX_FontSourceEnum {
CFX_ObjectArray<FX_HandleParentPath> m_FolderQueue;
CFX_ByteStringArray m_FolderPaths;
};
-typedef CFX_MapPtrTemplate<FX_DWORD, IFX_FileAccess*> CFX_HashFileMap;
-typedef CFX_MapPtrTemplate<FX_DWORD, IFX_Font*> CFX_HashFontMap;
-typedef CFX_MapPtrTemplate<FX_DWORD, CFX_FontDescriptorInfos*>
+typedef CFX_MapPtrTemplate<uint32_t, IFX_FileAccess*> CFX_HashFileMap;
+typedef CFX_MapPtrTemplate<uint32_t, IFX_Font*> CFX_HashFontMap;
+typedef CFX_MapPtrTemplate<uint32_t, CFX_FontDescriptorInfos*>
CFX_HashFontDescsMap;
-typedef CFX_MapPtrTemplate<FX_DWORD, CFX_ArrayTemplate<IFX_Font*>*>
+typedef CFX_MapPtrTemplate<uint32_t, CFX_ArrayTemplate<IFX_Font*>*>
CFX_HashFontsMap;
typedef CFX_MapPtrTemplate<FX_WCHAR, IFX_Font*> CFX_UnicodeFontMap;
typedef CFX_MapPtrTemplate<IFX_FileAccess*, CFX_ArrayTemplate<IFX_Font*>*>
@@ -160,28 +160,28 @@ class CFX_FontMgrImp : public IFX_FontMgr {
void* pUserData = NULL);
virtual void Release();
virtual IFX_Font* GetDefFontByCodePage(uint16_t wCodePage,
- FX_DWORD dwFontStyles,
+ uint32_t dwFontStyles,
const FX_WCHAR* pszFontFamily = NULL);
virtual IFX_Font* GetDefFontByCharset(uint8_t nCharset,
- FX_DWORD dwFontStyles,
+ uint32_t dwFontStyles,
const FX_WCHAR* pszFontFamily = NULL);
virtual IFX_Font* GetDefFontByUnicode(FX_WCHAR wUnicode,
- FX_DWORD dwFontStyles,
+ uint32_t dwFontStyles,
const FX_WCHAR* pszFontFamily = NULL);
virtual IFX_Font* GetDefFontByLanguage(uint16_t wLanguage,
- FX_DWORD dwFontStyles,
+ uint32_t dwFontStyles,
const FX_WCHAR* pszFontFamily = NULL);
virtual IFX_Font* GetFontByCodePage(uint16_t wCodePage,
- FX_DWORD dwFontStyles,
+ uint32_t dwFontStyles,
const FX_WCHAR* pszFontFamily = NULL);
virtual IFX_Font* GetFontByCharset(uint8_t nCharset,
- FX_DWORD dwFontStyles,
+ uint32_t dwFontStyles,
const FX_WCHAR* pszFontFamily = NULL);
virtual IFX_Font* GetFontByUnicode(FX_WCHAR wUnicode,
- FX_DWORD dwFontStyles,
+ uint32_t dwFontStyles,
const FX_WCHAR* pszFontFamily = NULL);
virtual IFX_Font* GetFontByLanguage(uint16_t wLanguage,
- FX_DWORD dwFontStyles,
+ uint32_t dwFontStyles,
const FX_WCHAR* pszFontFamily = NULL);
virtual IFX_Font* LoadFont(const uint8_t* pBuffer,
int32_t iLength,
@@ -212,20 +212,20 @@ class CFX_FontMgrImp : public IFX_FontMgr {
const CFX_WideString* pFaceName);
void GetNames(const uint8_t* name_table, CFX_WideStringArray& Names);
void GetCharsets(FXFT_Face pFace, CFX_ArrayTemplate<uint16_t>& Charsets);
- void GetUSBCSB(FXFT_Face pFace, FX_DWORD* USB, FX_DWORD* CSB);
- FX_DWORD GetFlags(FXFT_Face pFace);
+ void GetUSBCSB(FXFT_Face pFace, uint32_t* USB, uint32_t* CSB);
+ uint32_t GetFlags(FXFT_Face pFace);
CFX_FontDescriptors m_InstalledFonts;
FX_BOOL VerifyUnicode(CFX_FontDescriptor* pDesc, FX_WCHAR wcUnicode);
FX_BOOL VerifyUnicode(IFX_Font* pFont, FX_WCHAR wcUnicode);
int32_t IsPartName(const CFX_WideString& Name1, const CFX_WideString& Name2);
int32_t MatchFonts(CFX_FontDescriptorInfos& MatchedFonts,
uint16_t wCodePage,
- FX_DWORD dwFontStyles,
+ uint32_t dwFontStyles,
const CFX_WideString& FontName,
FX_WCHAR wcUnicode = 0xFFFE);
int32_t CalcPenalty(CFX_FontDescriptor* pInstalled,
uint16_t wCodePage,
- FX_DWORD dwFontStyles,
+ uint32_t dwFontStyles,
const CFX_WideString& FontName,
FX_WCHAR wcUnicode = 0xFFFE);
IFX_Font* LoadFont(IFX_FileAccess* pFontAccess,
@@ -235,7 +235,7 @@ class CFX_FontMgrImp : public IFX_FontMgr {
FXFT_Face LoadFace(IFX_FileRead* pFontStream, int32_t iFaceIndex);
IFX_FileRead* CreateFontStream(CFX_FontMapper* pFontMapper,
IFX_SystemFontInfo* pSystemFontInfo,
- FX_DWORD index);
+ uint32_t index);
IFX_FileRead* CreateFontStream(const CFX_ByteString& bsFaceName);
CFX_HashFontDescsMap m_Hash2CandidateList;
CFX_HashFontsMap m_Hash2Fonts;