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

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

Issue 1428593005: Add test for StringToCode and StringToWideString. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Created 5 years, 1 month 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 6
7 #ifndef CORE_SRC_FPDFAPI_FPDF_FONT_FONT_INT_H_ 7 #ifndef CORE_SRC_FPDFAPI_FPDF_FONT_FONT_INT_H_
8 #define CORE_SRC_FPDFAPI_FPDF_FONT_FONT_INT_H_ 8 #define CORE_SRC_FPDFAPI_FPDF_FONT_FONT_INT_H_
9 9
10 #include <map> 10 #include <map>
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after
167 class CPDF_ToUnicodeMap { 167 class CPDF_ToUnicodeMap {
168 public: 168 public:
169 void Load(CPDF_Stream* pStream); 169 void Load(CPDF_Stream* pStream);
170 CFX_WideString Lookup(FX_DWORD charcode); 170 CFX_WideString Lookup(FX_DWORD charcode);
171 FX_DWORD ReverseLookup(FX_WCHAR unicode); 171 FX_DWORD ReverseLookup(FX_WCHAR unicode);
172 172
173 protected: 173 protected:
174 std::map<FX_DWORD, FX_DWORD> m_Map; 174 std::map<FX_DWORD, FX_DWORD> m_Map;
175 CPDF_CID2UnicodeMap* m_pBaseMap; 175 CPDF_CID2UnicodeMap* m_pBaseMap;
176 CFX_WideTextBuf m_MultiCharBuf; 176 CFX_WideTextBuf m_MultiCharBuf;
177
178 private:
179 friend class fpdf_font_StringToCode_Test;
180 friend class fpdf_font_StringToWideString_Test;
181
182 FX_DWORD StringToCode(const CFX_ByteStringC& str) const;
Tom Sepez 2015/11/02 18:00:28 can these be static methods since they don't refer
dsinclair 2015/11/02 18:14:28 Done.
183 CFX_WideString StringToWideString(const CFX_ByteStringC& str) const;
177 }; 184 };
178 class CPDF_FontCharMap : public CFX_CharMap { 185 class CPDF_FontCharMap : public CFX_CharMap {
179 public: 186 public:
180 CPDF_FontCharMap(CPDF_Font* pFont); 187 CPDF_FontCharMap(CPDF_Font* pFont);
181 CPDF_Font* m_pFont; 188 CPDF_Font* m_pFont;
182 }; 189 };
183 190
184 void FPDFAPI_LoadCID2UnicodeMap(CIDSet charset, 191 void FPDFAPI_LoadCID2UnicodeMap(CIDSet charset,
185 const FX_WORD*& pMap, 192 const FX_WORD*& pMap,
186 FX_DWORD& count); 193 FX_DWORD& count);
187 194
188 #endif // CORE_SRC_FPDFAPI_FPDF_FONT_FONT_INT_H_ 195 #endif // CORE_SRC_FPDFAPI_FPDF_FONT_FONT_INT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698