summaryrefslogtreecommitdiff
path: root/core/src/fpdfapi/fpdf_font
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2015-08-19 13:25:44 -0700
committerTom Sepez <tsepez@chromium.org>2015-08-19 13:25:44 -0700
commitc3f4894a6862c74b9ab32b4ec38c531de6ecd83c (patch)
treef5ad333e8d418d5a978a595f51e94b3ad8f365da /core/src/fpdfapi/fpdf_font
parent71c15a5e6652952a94ba3a3ef7ac0392e3a06962 (diff)
downloadpdfium-c3f4894a6862c74b9ab32b4ec38c531de6ecd83c.tar.xz
Extern in .cpp file is a code smell, part 2.
Fixes the remaining issues, except for JBIG2/Skia ... R=thestig@chromium.org Review URL: https://codereview.chromium.org/1298393003 .
Diffstat (limited to 'core/src/fpdfapi/fpdf_font')
-rw-r--r--core/src/fpdfapi/fpdf_font/fpdf_font.cpp1
-rw-r--r--core/src/fpdfapi/fpdf_font/fpdf_font_charset.cpp12
-rw-r--r--core/src/fpdfapi/fpdf_font/fpdf_font_cid.cpp8
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 a228cf76ec..20c4082d4a 100644
--- a/core/src/fpdfapi/fpdf_font/fpdf_font.cpp
+++ b/core/src/fpdfapi/fpdf_font/fpdf_font.cpp
@@ -1041,7 +1041,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 acbb567834..9a37cccfc9 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) {
@@ -814,7 +809,6 @@ FX_BOOL CPDF_CIDFont::IsVertWriting() const {
}
#if _FXM_PLATFORM_ != _FXM_PLATFORM_WINDOWS_
-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) {