diff options
author | John Abd-El-Malek <jam@chromium.org> | 2014-12-12 16:42:18 -0800 |
---|---|---|
committer | John Abd-El-Malek <jam@chromium.org> | 2014-12-12 16:42:18 -0800 |
commit | 217ecf3b39f8d5c01260684848a8886c8ed2bf89 (patch) | |
tree | 1ab05e729480f2d8fab6882285c2e169c8ba007e /core/src/fpdftext | |
parent | 239955073722582152d9ab190794317dd775a1c1 (diff) | |
download | pdfium-217ecf3b39f8d5c01260684848a8886c8ed2bf89.tar.xz |
Simplify PDFium by removing code that's not used in the open source repo.
-remove parameter from FPDF_InitLibrary
-remove a bunch of ifdefs that are unused
R=tsepez@chromium.org
Review URL: https://codereview.chromium.org/801913002
Diffstat (limited to 'core/src/fpdftext')
-rw-r--r-- | core/src/fpdftext/fpdf_text.cpp | 2 | ||||
-rw-r--r-- | core/src/fpdftext/fpdf_text_int.cpp | 17 |
2 files changed, 0 insertions, 19 deletions
diff --git a/core/src/fpdftext/fpdf_text.cpp b/core/src/fpdftext/fpdf_text.cpp index f633e19517..a4a124d5e6 100644 --- a/core/src/fpdftext/fpdf_text.cpp +++ b/core/src/fpdftext/fpdf_text.cpp @@ -9,7 +9,6 @@ #include "../../include/fpdftext/fpdf_text.h" #include "txtproc.h" #include "text_int.h" -#if !defined(_FPDFAPI_MINI_) || defined(_FXCORE_FEATURE_ALL_) extern FX_LPCSTR FCS_GetAltStr(FX_WCHAR); CFX_ByteString CharFromUnicodeAlt(FX_WCHAR unicode, int destcp, FX_LPCSTR defchar) { @@ -776,7 +775,6 @@ void PDF_GetPageText(CFX_ByteStringArray& lines, CPDF_Document* pDoc, CPDF_Dicti lines.Add(str); } } -#endif 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, FX_DWORD flags) diff --git a/core/src/fpdftext/fpdf_text_int.cpp b/core/src/fpdftext/fpdf_text_int.cpp index 42bbffa52e..7526abc240 100644 --- a/core/src/fpdftext/fpdf_text_int.cpp +++ b/core/src/fpdftext/fpdf_text_int.cpp @@ -160,11 +160,7 @@ FX_BOOL CPDF_TextPage::ParseTextPage() if(charinfo.m_Flag == FPDFTEXT_CHAR_GENERATED) { bNormal = TRUE; } -#ifdef FOXIT_CHROME_BUILD else if(charinfo.m_Unicode == 0 || IsControlChar(&charinfo)) -#else - else if(charinfo.m_Unicode == 0) -#endif bNormal = FALSE; else { bNormal = TRUE; @@ -1118,11 +1114,7 @@ void CPDF_TextPage::AddCharInfoByLRDirection(CFX_WideString& str, int i) { PAGECHAR_INFO Info = *(PAGECHAR_INFO*)m_TempCharList.GetAt(i); FX_WCHAR wChar = str.GetAt(i); -#ifdef FOXIT_CHROME_BUILD if(!IsControlChar(&Info)) { -#else - if(wChar != 0xfffe) { -#endif Info.m_Index = m_TextBuf.GetLength(); if (wChar >= 0xFB00 && wChar <= 0xFB06) { FX_LPWSTR pDst = NULL; @@ -1157,11 +1149,7 @@ void CPDF_TextPage::AddCharInfoByLRDirection(CFX_WideString& str, int i) void CPDF_TextPage::AddCharInfoByRLDirection(CFX_WideString& str, int i) { PAGECHAR_INFO Info = *(PAGECHAR_INFO*)m_TempCharList.GetAt(i); -#ifdef FOXIT_CHROME_BUILD if(!IsControlChar(&Info)) { -#else - if(str.GetAt(i) != 0xfffe) { -#endif Info.m_Index = m_TextBuf.GetLength(); FX_WCHAR wChar = FX_GetMirrorChar(str.GetAt(i), TRUE, FALSE); FX_LPWSTR pDst = NULL; @@ -1638,14 +1626,9 @@ void CPDF_TextPage::ProcessTextObject(PDFTEXT_Obj Obj) } PAGECHAR_INFO* cha = (PAGECHAR_INFO*)m_TempCharList.GetAt(m_TempCharList.GetSize() - 1); m_TempTextBuf.Delete(m_TempTextBuf.GetLength() - 1, 1); -#ifdef FOXIT_CHROME_BUILD cha->m_Unicode = 0x2; cha->m_Flag = FPDFTEXT_CHAR_HYPHEN; m_TempTextBuf.AppendChar(0xfffe); -#else - cha->m_Unicode = 0; - m_TempTextBuf.AppendChar(0xfffe); -#endif } } else { m_CurlineRect = CFX_FloatRect(Obj.m_pTextObj->m_Left, Obj.m_pTextObj->m_Bottom, Obj.m_pTextObj->m_Right, Obj.m_pTextObj->m_Top); |