From c3f4894a6862c74b9ab32b4ec38c531de6ecd83c Mon Sep 17 00:00:00 2001 From: Tom Sepez Date: Wed, 19 Aug 2015 13:25:44 -0700 Subject: 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 . --- core/src/fpdftext/fpdf_text.cpp | 6 +----- core/src/fpdftext/fpdf_text_search.cpp | 10 ++++++---- core/src/fpdftext/text_int.h | 13 ++++++++++++- 3 files changed, 19 insertions(+), 10 deletions(-) (limited to 'core/src/fpdftext') diff --git a/core/src/fpdftext/fpdf_text.cpp b/core/src/fpdftext/fpdf_text.cpp index af944d965e..40f5dd4926 100644 --- a/core/src/fpdftext/fpdf_text.cpp +++ b/core/src/fpdftext/fpdf_text.cpp @@ -783,10 +783,6 @@ void PDF_GetPageText(CFX_ByteStringArray& lines, lines.Add(str); } } -extern void _PDF_GetTextStream_Unicode(CFX_WideTextBuf& buffer, - CPDF_PageObjects* pPage, - FX_BOOL bUseLF, - CFX_PtrArray* pObjArray); void PDF_GetTextStream_Unicode(CFX_WideTextBuf& buffer, CPDF_Document* pDoc, CPDF_Dictionary* pPage, @@ -798,5 +794,5 @@ void PDF_GetTextStream_Unicode(CFX_WideTextBuf& buffer, options.m_bTextOnly = TRUE; options.m_bSeparateForm = FALSE; page.ParseContent(&options); - _PDF_GetTextStream_Unicode(buffer, &page, TRUE, NULL); + GetTextStream_Unicode(buffer, &page, TRUE, NULL); } diff --git a/core/src/fpdftext/fpdf_text_search.cpp b/core/src/fpdftext/fpdf_text_search.cpp index 95839b54fb..6640018de0 100644 --- a/core/src/fpdftext/fpdf_text_search.cpp +++ b/core/src/fpdftext/fpdf_text_search.cpp @@ -6,6 +6,8 @@ #include "../../include/fpdfapi/fpdf_pageobj.h" #include "../../include/fpdfapi/fpdf_page.h" +#include "text_int.h" + class CPDF_TextStream { public: CPDF_TextStream(CFX_WideTextBuf& buffer, @@ -293,10 +295,10 @@ FX_BOOL CPDF_TextStream::ProcessObject(const CPDF_TextObject* pObj, } return FALSE; } -void _PDF_GetTextStream_Unicode(CFX_WideTextBuf& buffer, - CPDF_PageObjects* pPage, - FX_BOOL bUseLF, - CFX_PtrArray* pObjArray) { +void GetTextStream_Unicode(CFX_WideTextBuf& buffer, + CPDF_PageObjects* pPage, + FX_BOOL bUseLF, + CFX_PtrArray* pObjArray) { CPDF_TextStream textstream(buffer, bUseLF, pObjArray); FX_POSITION pos = pPage->GetFirstObjectPosition(); while (pos) { diff --git a/core/src/fpdftext/text_int.h b/core/src/fpdftext/text_int.h index 3f1023ac8a..481c48294f 100644 --- a/core/src/fpdftext/text_int.h +++ b/core/src/fpdftext/text_int.h @@ -7,9 +7,15 @@ #ifndef CORE_SRC_FPDFTEXT_TEXT_INT_H_ #define CORE_SRC_FPDFTEXT_TEXT_INT_H_ +#include "../../include/fpdftext/fpdf_text.h" +#include "../../include/fxcrt/fx_basic.h" + +class CFX_BidiChar; +class CPDF_DocProgressiveSearch; +class CPDF_FormObject; class CPDF_LinkExtract; class CPDF_TextPageFind; -class CPDF_DocProgressiveSearch; + #define FPDFTEXT_CHAR_ERROR -1 #define FPDFTEXT_CHAR_NORMAL 0 #define FPDFTEXT_CHAR_GENERATED 1 @@ -19,6 +25,7 @@ class CPDF_DocProgressiveSearch; #define FPDFTEXT_MC_PASS 0 #define FPDFTEXT_MC_DONE 1 #define FPDFTEXT_MC_DELAY 2 + typedef struct _PAGECHAR_INFO { int m_CharCode; FX_WCHAR m_Unicode; @@ -235,5 +242,9 @@ class CPDF_LinkExtract : public IPDF_LinkExtract { FX_STRSIZE FX_Unicode_GetNormalization(FX_WCHAR wch, FX_WCHAR* pDst); void NormalizeString(CFX_WideString& str); void NormalizeCompositeChar(FX_WCHAR wChar, CFX_WideString& sDest); +void GetTextStream_Unicode(CFX_WideTextBuf& buffer, + CPDF_PageObjects* pPage, + FX_BOOL bUseLF, + CFX_PtrArray* pObjArray); #endif // CORE_SRC_FPDFTEXT_TEXT_INT_H_ -- cgit v1.2.3