summaryrefslogtreecommitdiff
path: root/core/src/fpdfapi
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2015-08-19 10:28:50 -0700
committerTom Sepez <tsepez@chromium.org>2015-08-19 10:28:50 -0700
commit71c15a5e6652952a94ba3a3ef7ac0392e3a06962 (patch)
treec6983e985c49e4f30906082b73045db14d8cb481 /core/src/fpdfapi
parenta2b3ae23556fb2f1adbc008574f33bf365476af9 (diff)
downloadpdfium-71c15a5e6652952a94ba3a3ef7ac0392e3a06962.tar.xz
Extern in .cpp files is a code smell.
Part 1. Move to headers so compiler can type check against the definitions. R=thestig@chromium.org Review URL: https://codereview.chromium.org/1299963002 .
Diffstat (limited to 'core/src/fpdfapi')
-rw-r--r--core/src/fpdfapi/fpdf_edit/fpdf_edit_create.cpp15
-rw-r--r--core/src/fpdfapi/fpdf_font/font_int.h3
-rw-r--r--core/src/fpdfapi/fpdf_font/fpdf_font_cid.cpp5
3 files changed, 5 insertions, 18 deletions
diff --git a/core/src/fpdfapi/fpdf_edit/fpdf_edit_create.cpp b/core/src/fpdfapi/fpdf_edit/fpdf_edit_create.cpp
index 668c70b243..4e6c72355d 100644
--- a/core/src/fpdfapi/fpdf_edit/fpdf_edit_create.cpp
+++ b/core/src/fpdfapi/fpdf_edit/fpdf_edit_create.cpp
@@ -6,23 +6,12 @@
#include "../../../include/fxcrt/fx_ext.h"
#include "../../../include/fpdfapi/fpdf_serial.h"
+#include "../../../include/fpdfapi/fpdf_parser.h"
#include "editint.h"
#define PDF_OBJECTSTREAM_MAXLENGTH (256 * 1024)
#define PDF_XREFSTREAM_MAXSIZE 10000
-extern void FlateEncode(const uint8_t* src_buf,
- FX_DWORD src_data,
- uint8_t*& dest_buf,
- FX_DWORD& dest_size);
-extern void FlateEncode(const uint8_t* src_buf,
- FX_DWORD src_size,
- int predictor,
- int Colors,
- int BitsPerComponent,
- int Columns,
- uint8_t*& dest_buf,
- FX_DWORD& dest_size);
-extern FX_BOOL IsSignatureDict(const CPDF_Dictionary* pDict);
+
int32_t PDF_CreatorAppendObject(const CPDF_Object* pObj,
CFX_FileBufferArchive* pFile,
FX_FILESIZE& offset) {
diff --git a/core/src/fpdfapi/fpdf_font/font_int.h b/core/src/fpdfapi/fpdf_font/font_int.h
index 59acfcbd35..79c25219a0 100644
--- a/core/src/fpdfapi/fpdf_font/font_int.h
+++ b/core/src/fpdfapi/fpdf_font/font_int.h
@@ -19,6 +19,9 @@ class CPDF_Stream;
typedef void* FXFT_Library;
+short TT2PDF(int m, FXFT_Face face);
+FX_BOOL FT_UseTTCharmap(FXFT_Face face, int platform_id, int encoding_id);
+
class CPDF_CMapManager {
public:
CPDF_CMapManager();
diff --git a/core/src/fpdfapi/fpdf_font/fpdf_font_cid.cpp b/core/src/fpdfapi/fpdf_font/fpdf_font_cid.cpp
index 4814e93e7b..acbb567834 100644
--- a/core/src/fpdfapi/fpdf_font/fpdf_font_cid.cpp
+++ b/core/src/fpdfapi/fpdf_font/fpdf_font_cid.cpp
@@ -12,11 +12,6 @@
#include "../fpdf_cmaps/cmap_int.h"
#include "font_int.h"
-extern short TT2PDF(int m, FXFT_Face face);
-extern FX_BOOL FT_UseTTCharmap(FXFT_Face face,
- int platform_id,
- int encoding_id);
-
CPDF_CMapManager::CPDF_CMapManager() {
m_bPrompted = FALSE;
FXSYS_memset(m_CID2UnicodeMaps, 0, sizeof m_CID2UnicodeMaps);