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

Unified Diff: core/src/fpdfapi/fpdf_font/font_int.h

Issue 1356373003: Fix a bunch of sign mismatch warnings. (Closed) Base URL: https://pdfium.googlesource.com/pdfium@master
Patch Set: fix a couple more trivial comparison warnings... maybe they got lost in the merge Created 5 years, 2 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « core/src/fpdfapi/fpdf_cmaps/fpdf_cmaps.cpp ('k') | core/src/fpdfapi/fpdf_font/fpdf_font.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: core/src/fpdfapi/fpdf_font/font_int.h
diff --git a/core/src/fpdfapi/fpdf_font/font_int.h b/core/src/fpdfapi/fpdf_font/font_int.h
index 79c25219a05965d7d3fbc3cfc67aa5dfb8d48f27..48e58d6345279040634338ed063fb976acd50ebc 100644
--- a/core/src/fpdfapi/fpdf_font/font_int.h
+++ b/core/src/fpdfapi/fpdf_font/font_int.h
@@ -27,13 +27,13 @@ class CPDF_CMapManager {
CPDF_CMapManager();
~CPDF_CMapManager();
void* GetPackage(FX_BOOL bPrompt);
- CPDF_CMap* GetPredefinedCMap(const CFX_ByteString& name, FX_BOOL bPrompt);
- CPDF_CID2UnicodeMap* GetCID2UnicodeMap(int charset, FX_BOOL bPrompt);
+ CPDF_CMap* GetPredefinedCMap(const CFX_ByteString& name, FX_BOOL bPromptCJK);
+ CPDF_CID2UnicodeMap* GetCID2UnicodeMap(CIDSet charset, FX_BOOL bPromptCJK);
void ReloadAll();
private:
- CPDF_CMap* LoadPredefinedCMap(const CFX_ByteString& name, FX_BOOL bPrompt);
- CPDF_CID2UnicodeMap* LoadCID2UnicodeMap(int charset, FX_BOOL bPrompt);
+ CPDF_CMap* LoadPredefinedCMap(const CFX_ByteString& name, FX_BOOL bPromptCJK);
+ CPDF_CID2UnicodeMap* LoadCID2UnicodeMap(CIDSet charset, FX_BOOL bPromptCJK);
FX_BOOL m_bPrompted;
std::map<CFX_ByteString, CPDF_CMap*> m_CMaps;
@@ -51,21 +51,23 @@ class CPDF_FontGlobals {
struct {
const struct FXCMAP_CMap* m_pMapList;
int m_Count;
- } m_EmbeddedCharsets[NUMBER_OF_CIDSETS];
+ } m_EmbeddedCharsets[CIDSET_NUM_SETS];
struct {
const FX_WORD* m_pMap;
int m_Count;
- } m_EmbeddedToUnicodes[NUMBER_OF_CIDSETS];
+ } m_EmbeddedToUnicodes[CIDSET_NUM_SETS];
private:
CFX_MapPtrToPtr m_pStockMap;
uint8_t* m_pContrastRamps;
};
-struct _CMap_CodeRange {
+
+struct CMap_CodeRange {
int m_CharSize;
uint8_t m_Lower[4];
uint8_t m_Upper[4];
};
+
class CPDF_CMapParser {
public:
CPDF_CMapParser();
@@ -79,7 +81,7 @@ class CPDF_CMapParser {
int m_Status;
int m_CodeSeq;
FX_DWORD m_CodePoints[4];
- CFX_ArrayTemplate<_CMap_CodeRange> m_CodeRanges;
+ CFX_ArrayTemplate<CMap_CodeRange> m_CodeRanges;
CFX_ByteString m_Registry, m_Ordering, m_Supplement;
CFX_ByteString m_LastWord;
};
@@ -100,7 +102,6 @@ class CPDF_CMap {
FX_BOOL LoadEmbedded(const uint8_t* pData, FX_DWORD dwSize);
void Release();
FX_BOOL IsLoaded() const { return m_bLoaded; }
- int GetCharset() { return m_Charset; }
FX_BOOL IsVertWriting() const { return m_bVertical; }
FX_WORD CIDFromCharCode(FX_DWORD charcode) const;
FX_DWORD CharCodeFromCID(FX_WORD CID) const;
@@ -124,7 +125,8 @@ class CPDF_CMap {
protected:
CFX_ByteString m_PredefinedCMap;
FX_BOOL m_bVertical;
- int m_Charset, m_Coding;
+ CIDSet m_Charset;
+ int m_Coding;
CodingScheme m_CodingScheme;
int m_nCodeRanges;
uint8_t* m_pLeadingBytes;
@@ -134,15 +136,7 @@ class CPDF_CMap {
const FXCMAP_CMap* m_pEmbedMap;
CPDF_CMap* m_pUseMap;
};
-class CPDF_PredefinedCMap {
- public:
- const FX_CHAR* m_pName;
- int m_Charset;
- int m_Coding;
- CPDF_CMap::CodingScheme m_CodingScheme;
- FX_DWORD m_LeadingSegCount;
- uint8_t m_LeadingSegs[4];
-};
+
typedef struct _FileHeader {
uint8_t btTag[4];
uint8_t btVersion;
@@ -154,20 +148,22 @@ typedef struct _FileHeader {
FX_DWORD dwDataOffset;
FX_DWORD dwRecordSize;
} FXMP_FILEHEADER;
+
class CPDF_CID2UnicodeMap {
public:
CPDF_CID2UnicodeMap();
~CPDF_CID2UnicodeMap();
FX_BOOL Initialize();
FX_BOOL IsLoaded();
- void Load(CPDF_CMapManager* pMgr, int charset, FX_BOOL bPromptCJK);
+ void Load(CPDF_CMapManager* pMgr, CIDSet charset, FX_BOOL bPromptCJK);
FX_WCHAR UnicodeFromCID(FX_WORD CID);
protected:
- int m_Charset;
+ CIDSet m_Charset;
const FX_WORD* m_pEmbeddedMap;
FX_DWORD m_EmbeddedCount;
};
+
class CPDF_ToUnicodeMap {
public:
void Load(CPDF_Stream* pStream);
@@ -185,4 +181,8 @@ class CPDF_FontCharMap : public CFX_CharMap {
CPDF_Font* m_pFont;
};
+void FPDFAPI_LoadCID2UnicodeMap(CIDSet charset,
+ const FX_WORD*& pMap,
+ FX_DWORD& count);
+
#endif // CORE_SRC_FPDFAPI_FPDF_FONT_FONT_INT_H_
« no previous file with comments | « core/src/fpdfapi/fpdf_cmaps/fpdf_cmaps.cpp ('k') | core/src/fpdfapi/fpdf_font/fpdf_font.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698