Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(83)

Side by Side Diff: xfa/fgas/font/fgas_stdfontmgr.h

Issue 2095653002: Remove NULL in xfa/ (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Rebase to master Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « xfa/fgas/font/fgas_gefont.cpp ('k') | xfa/fgas/font/fgas_stdfontmgr.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 PDFium Authors. All rights reserved. 1 // Copyright 2014 PDFium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
6 6
7 #ifndef XFA_FGAS_FONT_FGAS_STDFONTMGR_H_ 7 #ifndef XFA_FGAS_FONT_FGAS_STDFONTMGR_H_
8 #define XFA_FGAS_FONT_FGAS_STDFONTMGR_H_ 8 #define XFA_FGAS_FONT_FGAS_STDFONTMGR_H_
9 9
10 #include <vector> 10 #include <vector>
(...skipping 12 matching lines...) Expand all
23 class CFGAS_StdFontMgrImp : public IFGAS_FontMgr { 23 class CFGAS_StdFontMgrImp : public IFGAS_FontMgr {
24 public: 24 public:
25 explicit CFGAS_StdFontMgrImp(FX_LPEnumAllFonts pEnumerator); 25 explicit CFGAS_StdFontMgrImp(FX_LPEnumAllFonts pEnumerator);
26 ~CFGAS_StdFontMgrImp() override; 26 ~CFGAS_StdFontMgrImp() override;
27 27
28 // IFGAS_FontMgr: 28 // IFGAS_FontMgr:
29 void Release() override; 29 void Release() override;
30 CFGAS_GEFont* GetDefFontByCodePage( 30 CFGAS_GEFont* GetDefFontByCodePage(
31 uint16_t wCodePage, 31 uint16_t wCodePage,
32 uint32_t dwFontStyles, 32 uint32_t dwFontStyles,
33 const FX_WCHAR* pszFontFamily = NULL) override; 33 const FX_WCHAR* pszFontFamily = nullptr) override;
34 CFGAS_GEFont* GetDefFontByCharset( 34 CFGAS_GEFont* GetDefFontByCharset(
35 uint8_t nCharset, 35 uint8_t nCharset,
36 uint32_t dwFontStyles, 36 uint32_t dwFontStyles,
37 const FX_WCHAR* pszFontFamily = NULL) override; 37 const FX_WCHAR* pszFontFamily = nullptr) override;
38 CFGAS_GEFont* GetDefFontByUnicode( 38 CFGAS_GEFont* GetDefFontByUnicode(
39 FX_WCHAR wUnicode, 39 FX_WCHAR wUnicode,
40 uint32_t dwFontStyles, 40 uint32_t dwFontStyles,
41 const FX_WCHAR* pszFontFamily = NULL) override; 41 const FX_WCHAR* pszFontFamily = nullptr) override;
42 CFGAS_GEFont* GetDefFontByLanguage( 42 CFGAS_GEFont* GetDefFontByLanguage(
43 uint16_t wLanguage, 43 uint16_t wLanguage,
44 uint32_t dwFontStyles, 44 uint32_t dwFontStyles,
45 const FX_WCHAR* pszFontFamily = NULL) override; 45 const FX_WCHAR* pszFontFamily = nullptr) override;
46 CFGAS_GEFont* LoadFont(const FX_WCHAR* pszFontFamily, 46 CFGAS_GEFont* LoadFont(const FX_WCHAR* pszFontFamily,
47 uint32_t dwFontStyles, 47 uint32_t dwFontStyles,
48 uint16_t wCodePage = 0xFFFF) override; 48 uint16_t wCodePage = 0xFFFF) override;
49 CFGAS_GEFont* LoadFont(const uint8_t* pBuffer, int32_t iLength) override; 49 CFGAS_GEFont* LoadFont(const uint8_t* pBuffer, int32_t iLength) override;
50 CFGAS_GEFont* LoadFont(IFX_Stream* pFontStream, 50 CFGAS_GEFont* LoadFont(IFX_Stream* pFontStream,
51 const FX_WCHAR* pszFontAlias = NULL, 51 const FX_WCHAR* pszFontAlias = nullptr,
52 uint32_t dwFontStyles = 0, 52 uint32_t dwFontStyles = 0,
53 uint16_t wCodePage = 0, 53 uint16_t wCodePage = 0,
54 FX_BOOL bSaveStream = FALSE) override; 54 FX_BOOL bSaveStream = FALSE) override;
55 CFGAS_GEFont* LoadFont(CFGAS_GEFont* pSrcFont, 55 CFGAS_GEFont* LoadFont(CFGAS_GEFont* pSrcFont,
56 uint32_t dwFontStyles, 56 uint32_t dwFontStyles,
57 uint16_t wCodePage = 0xFFFF) override; 57 uint16_t wCodePage = 0xFFFF) override;
58 58
59 void ClearFontCache() override; 59 void ClearFontCache() override;
60 void RemoveFont(CFGAS_GEFont* pFont) override; 60 void RemoveFont(CFGAS_GEFont* pFont) override;
61 61
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
145 class CFGAS_FontMgrImp : public IFGAS_FontMgr { 145 class CFGAS_FontMgrImp : public IFGAS_FontMgr {
146 public: 146 public:
147 explicit CFGAS_FontMgrImp(CFX_FontSourceEnum_File* pFontEnum); 147 explicit CFGAS_FontMgrImp(CFX_FontSourceEnum_File* pFontEnum);
148 ~CFGAS_FontMgrImp() override; 148 ~CFGAS_FontMgrImp() override;
149 149
150 // IFGAS_FontMgr: 150 // IFGAS_FontMgr:
151 void Release() override; 151 void Release() override;
152 CFGAS_GEFont* GetDefFontByCodePage( 152 CFGAS_GEFont* GetDefFontByCodePage(
153 uint16_t wCodePage, 153 uint16_t wCodePage,
154 uint32_t dwFontStyles, 154 uint32_t dwFontStyles,
155 const FX_WCHAR* pszFontFamily = NULL) override; 155 const FX_WCHAR* pszFontFamily = nullptr) override;
156 CFGAS_GEFont* GetDefFontByCharset( 156 CFGAS_GEFont* GetDefFontByCharset(
157 uint8_t nCharset, 157 uint8_t nCharset,
158 uint32_t dwFontStyles, 158 uint32_t dwFontStyles,
159 const FX_WCHAR* pszFontFamily = NULL) override; 159 const FX_WCHAR* pszFontFamily = nullptr) override;
160 CFGAS_GEFont* GetDefFontByUnicode( 160 CFGAS_GEFont* GetDefFontByUnicode(
161 FX_WCHAR wUnicode, 161 FX_WCHAR wUnicode,
162 uint32_t dwFontStyles, 162 uint32_t dwFontStyles,
163 const FX_WCHAR* pszFontFamily = NULL) override; 163 const FX_WCHAR* pszFontFamily = nullptr) override;
164 CFGAS_GEFont* GetDefFontByLanguage( 164 CFGAS_GEFont* GetDefFontByLanguage(
165 uint16_t wLanguage, 165 uint16_t wLanguage,
166 uint32_t dwFontStyles, 166 uint32_t dwFontStyles,
167 const FX_WCHAR* pszFontFamily = NULL) override; 167 const FX_WCHAR* pszFontFamily = nullptr) override;
168 CFGAS_GEFont* GetFontByCodePage( 168 CFGAS_GEFont* GetFontByCodePage(
169 uint16_t wCodePage, 169 uint16_t wCodePage,
170 uint32_t dwFontStyles, 170 uint32_t dwFontStyles,
171 const FX_WCHAR* pszFontFamily = NULL) override; 171 const FX_WCHAR* pszFontFamily = nullptr) override;
172 CFGAS_GEFont* GetFontByCharset(uint8_t nCharset, 172 CFGAS_GEFont* GetFontByCharset(
173 uint32_t dwFontStyles, 173 uint8_t nCharset,
174 const FX_WCHAR* pszFontFamily = NULL) override; 174 uint32_t dwFontStyles,
175 CFGAS_GEFont* GetFontByUnicode(FX_WCHAR wUnicode, 175 const FX_WCHAR* pszFontFamily = nullptr) override;
176 uint32_t dwFontStyles, 176 CFGAS_GEFont* GetFontByUnicode(
177 const FX_WCHAR* pszFontFamily = NULL) override; 177 FX_WCHAR wUnicode,
178 uint32_t dwFontStyles,
179 const FX_WCHAR* pszFontFamily = nullptr) override;
178 CFGAS_GEFont* GetFontByLanguage( 180 CFGAS_GEFont* GetFontByLanguage(
179 uint16_t wLanguage, 181 uint16_t wLanguage,
180 uint32_t dwFontStyles, 182 uint32_t dwFontStyles,
181 const FX_WCHAR* pszFontFamily = NULL) override; 183 const FX_WCHAR* pszFontFamily = nullptr) override;
182 void ClearFontCache() override; 184 void ClearFontCache() override;
183 void RemoveFont(CFGAS_GEFont* pFont) override; 185 void RemoveFont(CFGAS_GEFont* pFont) override;
184 186
185 CFGAS_GEFont* LoadFont(const CFX_WideString& wsFaceName, 187 CFGAS_GEFont* LoadFont(const CFX_WideString& wsFaceName,
186 int32_t iFaceIndex, 188 int32_t iFaceIndex,
187 int32_t* pFaceCount); 189 int32_t* pFaceCount);
188 FX_BOOL EnumFonts(); 190 FX_BOOL EnumFonts();
189 FX_BOOL EnumFontsFromFontMapper(); 191 FX_BOOL EnumFontsFromFontMapper();
190 FX_BOOL EnumFontsFromFiles(); 192 FX_BOOL EnumFontsFromFiles();
191 193
(...skipping 23 matching lines...) Expand all
215 FX_WCHAR wcUnicode = 0xFFFE); 217 FX_WCHAR wcUnicode = 0xFFFE);
216 FXFT_Face LoadFace(IFX_FileRead* pFontStream, int32_t iFaceIndex); 218 FXFT_Face LoadFace(IFX_FileRead* pFontStream, int32_t iFaceIndex);
217 IFX_FileRead* CreateFontStream(CFX_FontMapper* pFontMapper, 219 IFX_FileRead* CreateFontStream(CFX_FontMapper* pFontMapper,
218 IFX_SystemFontInfo* pSystemFontInfo, 220 IFX_SystemFontInfo* pSystemFontInfo,
219 uint32_t index); 221 uint32_t index);
220 IFX_FileRead* CreateFontStream(const CFX_ByteString& bsFaceName); 222 IFX_FileRead* CreateFontStream(const CFX_ByteString& bsFaceName);
221 223
222 CFX_MapPtrTemplate<uint32_t, CFX_FontDescriptorInfos*> m_Hash2CandidateList; 224 CFX_MapPtrTemplate<uint32_t, CFX_FontDescriptorInfos*> m_Hash2CandidateList;
223 CFX_MapPtrTemplate<uint32_t, CFX_ArrayTemplate<CFGAS_GEFont*>*> m_Hash2Fonts; 225 CFX_MapPtrTemplate<uint32_t, CFX_ArrayTemplate<CFGAS_GEFont*>*> m_Hash2Fonts;
224 CFX_MapPtrTemplate<CFGAS_GEFont*, IFX_FileRead*> m_IFXFont2FileRead; 226 CFX_MapPtrTemplate<CFGAS_GEFont*, IFX_FileRead*> m_IFXFont2FileRead;
225 CFX_MapPtrTemplate<FX_WCHAR, CFGAS_GEFont*> m_FailedUnicodes2NULL; 227 CFX_MapPtrTemplate<FX_WCHAR, CFGAS_GEFont*> m_FailedUnicodes2Nullptr;
226 CFX_FontSourceEnum_File* const m_pFontSource; 228 CFX_FontSourceEnum_File* const m_pFontSource;
227 }; 229 };
228 #endif 230 #endif
229 231
230 #endif // XFA_FGAS_FONT_FGAS_STDFONTMGR_H_ 232 #endif // XFA_FGAS_FONT_FGAS_STDFONTMGR_H_
OLDNEW
« no previous file with comments | « xfa/fgas/font/fgas_gefont.cpp ('k') | xfa/fgas/font/fgas_stdfontmgr.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698