diff options
author | Nico Weber <thakis@chromium.org> | 2015-08-04 12:19:10 -0700 |
---|---|---|
committer | Nico Weber <thakis@chromium.org> | 2015-08-04 12:19:10 -0700 |
commit | b048f791a15f2da781a01eba5b09eb9d389f9c11 (patch) | |
tree | 6850a73c18bbc41eaf4b1fdc6b3c96646d45587b /core/src/fxge/ge/text_int.h | |
parent | c8eeed31f217d99a706b0cbf5e4ce0bcc12beb64 (diff) | |
download | pdfium-b048f791a15f2da781a01eba5b09eb9d389f9c11.tar.xz |
clang-format all pdfium code.
No behavior change.
Generated by:
find . -name '*.cpp' -o -name '*.h' | \
grep -E -v 'third_party|thirdparties|lpng_v163' | \
xargs ../../buildtools/mac/clang-format -i
See thread "tabs vs spaces" on pdfium@googlegroups.com for discussion.
BUG=none
R=tsepez@chromium.org
Review URL: https://codereview.chromium.org/1265503005 .
Diffstat (limited to 'core/src/fxge/ge/text_int.h')
-rw-r--r-- | core/src/fxge/ge/text_int.h | 162 |
1 files changed, 75 insertions, 87 deletions
diff --git a/core/src/fxge/ge/text_int.h b/core/src/fxge/ge/text_int.h index 12fac6a60a..a05907162c 100644 --- a/core/src/fxge/ge/text_int.h +++ b/core/src/fxge/ge/text_int.h @@ -8,98 +8,86 @@ #define CORE_SRC_FXGE_GE_TEXT_INT_H_ struct _CFX_UniqueKeyGen { - void Generate(int count, ...); - FX_CHAR m_Key[128]; - int m_KeyLen; + void Generate(int count, ...); + FX_CHAR m_Key[128]; + int m_KeyLen; }; -class CFX_SizeGlyphCache -{ -public: - CFX_SizeGlyphCache() - { - m_GlyphMap.InitHashTable(253); - } - ~CFX_SizeGlyphCache(); - CFX_MapPtrToPtr m_GlyphMap; +class CFX_SizeGlyphCache { + public: + CFX_SizeGlyphCache() { m_GlyphMap.InitHashTable(253); } + ~CFX_SizeGlyphCache(); + CFX_MapPtrToPtr m_GlyphMap; }; -class CTTFontDesc -{ -public: - CTTFontDesc() - { - m_Type = 0; - m_pFontData = NULL; - m_RefCount = 0; - } - ~CTTFontDesc(); - FX_BOOL ReleaseFace(FXFT_Face face); - int m_Type; - union { - struct { - FX_BOOL m_bItalic; - FX_BOOL m_bBold; - FXFT_Face m_pFace; - } m_SingleFace; - struct { - FXFT_Face m_pFaces[16]; - } m_TTCFace; - }; - uint8_t* m_pFontData; - int m_RefCount; +class CTTFontDesc { + public: + CTTFontDesc() { + m_Type = 0; + m_pFontData = NULL; + m_RefCount = 0; + } + ~CTTFontDesc(); + FX_BOOL ReleaseFace(FXFT_Face face); + int m_Type; + union { + struct { + FX_BOOL m_bItalic; + FX_BOOL m_bBold; + FXFT_Face m_pFace; + } m_SingleFace; + struct { + FXFT_Face m_pFaces[16]; + } m_TTCFace; + }; + uint8_t* m_pFontData; + int m_RefCount; }; -class CFX_UnicodeEncoding : public IFX_FontEncoding -{ -public: - CFX_UnicodeEncoding(CFX_Font* pFont); - virtual FX_DWORD GlyphFromCharCodeEx(FX_DWORD charcode, int encoding = ENCODING_UNICODE); -private: - CFX_Font* m_pFont; - virtual FX_DWORD GlyphFromCharCode(FX_DWORD charcode); - virtual CFX_WideString UnicodeFromCharCode(FX_DWORD charcode) const - { - return CFX_WideString((FX_WCHAR)charcode); - } - virtual FX_DWORD CharCodeFromUnicode(FX_WCHAR Unicode) const - { - return Unicode; - } - virtual FX_BOOL IsUnicodeCompatible() const - { - return TRUE; - } +class CFX_UnicodeEncoding : public IFX_FontEncoding { + public: + CFX_UnicodeEncoding(CFX_Font* pFont); + virtual FX_DWORD GlyphFromCharCodeEx(FX_DWORD charcode, + int encoding = ENCODING_UNICODE); + + private: + CFX_Font* m_pFont; + virtual FX_DWORD GlyphFromCharCode(FX_DWORD charcode); + virtual CFX_WideString UnicodeFromCharCode(FX_DWORD charcode) const { + return CFX_WideString((FX_WCHAR)charcode); + } + virtual FX_DWORD CharCodeFromUnicode(FX_WCHAR Unicode) const { + return Unicode; + } + virtual FX_BOOL IsUnicodeCompatible() const { return TRUE; } }; -#define CHARSET_FLAG_ANSI 1 -#define CHARSET_FLAG_SYMBOL 2 -#define CHARSET_FLAG_SHIFTJIS 4 -#define CHARSET_FLAG_BIG5 8 -#define CHARSET_FLAG_GB 16 -#define CHARSET_FLAG_KOREAN 32 -class CFontFaceInfo -{ -public: - CFX_ByteString m_FilePath; - CFX_ByteString m_FaceName; - FX_DWORD m_Styles; - FX_DWORD m_Charsets; - FX_DWORD m_FontOffset; - FX_DWORD m_FileSize; - CFX_ByteString m_FontTables; +#define CHARSET_FLAG_ANSI 1 +#define CHARSET_FLAG_SYMBOL 2 +#define CHARSET_FLAG_SHIFTJIS 4 +#define CHARSET_FLAG_BIG5 8 +#define CHARSET_FLAG_GB 16 +#define CHARSET_FLAG_KOREAN 32 +class CFontFaceInfo { + public: + CFX_ByteString m_FilePath; + CFX_ByteString m_FaceName; + FX_DWORD m_Styles; + FX_DWORD m_Charsets; + FX_DWORD m_FontOffset; + FX_DWORD m_FileSize; + CFX_ByteString m_FontTables; }; -class CFontFileFaceInfo -{ -public: - CFontFileFaceInfo(); - ~CFontFileFaceInfo(); - IFX_FileStream* m_pFile; - FXFT_Face m_Face; - CFX_ByteString m_FaceName; - FX_DWORD m_Charsets; - FX_DWORD m_FileSize; - FX_DWORD m_FontOffset; - int m_Weight; - FX_BOOL m_bItalic; - int m_PitchFamily; - CFX_ByteString m_FontTables; +class CFontFileFaceInfo { + public: + CFontFileFaceInfo(); + ~CFontFileFaceInfo(); + IFX_FileStream* m_pFile; + FXFT_Face m_Face; + CFX_ByteString m_FaceName; + FX_DWORD m_Charsets; + FX_DWORD m_FileSize; + FX_DWORD m_FontOffset; + int m_Weight; + FX_BOOL m_bItalic; + int m_PitchFamily; + CFX_ByteString m_FontTables; }; #endif // CORE_SRC_FXGE_GE_TEXT_INT_H_ |