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

Side by Side Diff: core/src/fpdfapi/fpdf_font/font_int.h

Issue 1289703003: FX_CMapDwordToDword considered harmful. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Created 5 years, 4 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
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 #ifndef CORE_SRC_FPDFAPI_FPDF_FONT_FONT_INT_H_ 6 #ifndef CORE_SRC_FPDFAPI_FPDF_FONT_FONT_INT_H_
7 #define CORE_SRC_FPDFAPI_FPDF_FONT_FONT_INT_H_ 7 #define CORE_SRC_FPDFAPI_FPDF_FONT_FONT_INT_H_
8 8
9 #include <map>
10
9 typedef void* FXFT_Library; 11 typedef void* FXFT_Library;
10 class CPDF_CMapManager { 12 class CPDF_CMapManager {
11 public: 13 public:
12 CPDF_CMapManager(); 14 CPDF_CMapManager();
13 ~CPDF_CMapManager(); 15 ~CPDF_CMapManager();
14 void* GetPackage(FX_BOOL bPrompt); 16 void* GetPackage(FX_BOOL bPrompt);
15 CPDF_CMap* GetPredefinedCMap(const CFX_ByteString& name, FX_BOOL bPrompt); 17 CPDF_CMap* GetPredefinedCMap(const CFX_ByteString& name, FX_BOOL bPrompt);
16 CPDF_CID2UnicodeMap* GetCID2UnicodeMap(int charset, FX_BOOL bPrompt); 18 CPDF_CID2UnicodeMap* GetCID2UnicodeMap(int charset, FX_BOOL bPrompt);
17 void ReloadAll(); 19 void ReloadAll();
18 20
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after
153 const FX_WORD* m_pEmbeddedMap; 155 const FX_WORD* m_pEmbeddedMap;
154 FX_DWORD m_EmbeddedCount; 156 FX_DWORD m_EmbeddedCount;
155 }; 157 };
156 class CPDF_ToUnicodeMap { 158 class CPDF_ToUnicodeMap {
157 public: 159 public:
158 void Load(CPDF_Stream* pStream); 160 void Load(CPDF_Stream* pStream);
159 CFX_WideString Lookup(FX_DWORD charcode); 161 CFX_WideString Lookup(FX_DWORD charcode);
160 FX_DWORD ReverseLookup(FX_WCHAR unicode); 162 FX_DWORD ReverseLookup(FX_WCHAR unicode);
161 163
162 protected: 164 protected:
163 CFX_CMapDWordToDWord m_Map; 165 std::map<FX_DWORD, FX_DWORD> m_Map;
164 CPDF_CID2UnicodeMap* m_pBaseMap; 166 CPDF_CID2UnicodeMap* m_pBaseMap;
165 CFX_WideTextBuf m_MultiCharBuf; 167 CFX_WideTextBuf m_MultiCharBuf;
166 }; 168 };
167 class CPDF_FontCharMap : public CFX_CharMap { 169 class CPDF_FontCharMap : public CFX_CharMap {
168 public: 170 public:
169 CPDF_FontCharMap(CPDF_Font* pFont); 171 CPDF_FontCharMap(CPDF_Font* pFont);
170 CPDF_Font* m_pFont; 172 CPDF_Font* m_pFont;
171 }; 173 };
172 174
173 #endif // CORE_SRC_FPDFAPI_FPDF_FONT_FONT_INT_H_ 175 #endif // CORE_SRC_FPDFAPI_FPDF_FONT_FONT_INT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698