diff options
author | Tom Sepez <tsepez@chromium.org> | 2015-08-19 14:13:36 -0700 |
---|---|---|
committer | Tom Sepez <tsepez@chromium.org> | 2015-08-19 14:13:36 -0700 |
commit | 5417f067844892644486d7b0581c247904059a88 (patch) | |
tree | 34597c3bf0363c807c2cd9226cb7d7537ea60470 /core/src/fpdfapi/fpdf_font | |
parent | 7da980351d6fc428fd95be3015081d911f4470c0 (diff) | |
download | pdfium-5417f067844892644486d7b0581c247904059a88.tar.xz |
Merge to XFA: Extern in .cpp file is a code smell, part 2.
(cherry picked from commit c3f4894a6862c74b9ab32b4ec38c531de6ecd83c)
Original Review URL: https://codereview.chromium.org/1298393003 .
Fixed IWYU in core/src/fpdftext/text_int.h exposed by new inclusion.
R=thestig@chromium.org
Review URL: https://codereview.chromium.org/1294933008 .
Diffstat (limited to 'core/src/fpdfapi/fpdf_font')
-rw-r--r-- | core/src/fpdfapi/fpdf_font/fpdf_font.cpp | 1 | ||||
-rw-r--r-- | core/src/fpdfapi/fpdf_font/fpdf_font_charset.cpp | 12 | ||||
-rw-r--r-- | core/src/fpdfapi/fpdf_font/fpdf_font_cid.cpp | 8 |
3 files changed, 2 insertions, 19 deletions
diff --git a/core/src/fpdfapi/fpdf_font/fpdf_font.cpp b/core/src/fpdfapi/fpdf_font/fpdf_font.cpp index 7f593c7be3..d64c77f03f 100644 --- a/core/src/fpdfapi/fpdf_font/fpdf_font.cpp +++ b/core/src/fpdfapi/fpdf_font/fpdf_font.cpp @@ -1049,7 +1049,6 @@ static FX_BOOL FT_UseType1Charmap(FXFT_Face face) { } return TRUE; } -extern FX_WCHAR FT_UnicodeFromCharCode(int encoding, FX_DWORD charcode); #if _FXM_PLATFORM_ == _FXM_PLATFORM_APPLE_ #include "../../fxge/apple/apple_int.h" #endif diff --git a/core/src/fpdfapi/fpdf_font/fpdf_font_charset.cpp b/core/src/fpdfapi/fpdf_font/fpdf_font_charset.cpp index a0b65af9c5..308dac9782 100644 --- a/core/src/fpdfapi/fpdf_font/fpdf_font_charset.cpp +++ b/core/src/fpdfapi/fpdf_font/fpdf_font_charset.cpp @@ -5,12 +5,10 @@ // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com #include "../../../include/fpdfapi/fpdf_page.h" +#include "../../../include/fpdfapi/fpdf_parser.h" #include "../../../include/fpdfapi/fpdf_resource.h" #include "../../../include/fxge/fx_freetype.h" -// TODO(tsepez): These belong in headers, too. -extern const FX_WORD PDFDocEncoding[256]; - static const struct _UnicodeAlt { FX_WORD m_Unicode; const FX_CHAR* m_Alter; @@ -1774,14 +1772,6 @@ const FX_WORD* PDF_UnicodesForPredefinedCharSet(int encoding) { FX_DWORD PDF_PredefinedCharCodeFromUnicode(int encoding, FX_WCHAR unicode) { return PDF_FindCode(PDF_UnicodesForPredefinedCharSet(encoding), unicode); } -#ifdef __cplusplus -extern "C" { -#endif -extern int FXFT_unicode_from_adobe_name(const char* name); -extern void FXFT_adobe_name_from_unicode(char* glyph_name, FX_WCHAR unicode); -#ifdef __cplusplus -} -#endif FX_WCHAR PDF_UnicodeFromAdobeName(const FX_CHAR* name) { return (FX_WCHAR)(FXFT_unicode_from_adobe_name(name) & 0x7FFFFFFF); } diff --git a/core/src/fpdfapi/fpdf_font/fpdf_font_cid.cpp b/core/src/fpdfapi/fpdf_font/fpdf_font_cid.cpp index 2fc1255989..c934124a8a 100644 --- a/core/src/fpdfapi/fpdf_font/fpdf_font_cid.cpp +++ b/core/src/fpdfapi/fpdf_font/fpdf_font_cid.cpp @@ -430,12 +430,7 @@ const CPDF_PredefinedCMap g_PredefinedCMaps[] = { {"UniKS-UCS2", CIDSET_KOREA1, CIDCODING_UCS2, CPDF_CMap::TwoBytes}, {"UniKS-UTF16", CIDSET_KOREA1, CIDCODING_UTF16, CPDF_CMap::TwoBytes}, {NULL, 0, 0}}; -extern void FPDFAPI_FindEmbeddedCMap(const char* name, - int charset, - int coding, - const FXCMAP_CMap*& pMap); -extern FX_WORD FPDFAPI_CIDFromCharCode(const FXCMAP_CMap* pMap, - FX_DWORD charcode); + FX_BOOL CPDF_CMap::LoadPredefined(CPDF_CMapManager* pMgr, const FX_CHAR* pName, FX_BOOL bPromptCJK) { @@ -812,7 +807,6 @@ FX_WORD CPDF_CIDFont::CIDFromCharCode(FX_DWORD charcode) const { FX_BOOL CPDF_CIDFont::IsVertWriting() const { return m_pCMap ? m_pCMap->IsVertWriting() : FALSE; } -extern FX_DWORD FPDFAPI_CharCodeFromCID(const FXCMAP_CMap* pMap, FX_WORD cid); static FX_DWORD _EmbeddedCharcodeFromUnicode(const FXCMAP_CMap* pEmbedMap, int charset, FX_WCHAR unicode) { |