From 38772e9f7456021df78eaea3258c63e8c39cf309 Mon Sep 17 00:00:00 2001 From: Tom Sepez Date: Thu, 4 Oct 2018 18:41:22 +0000 Subject: Remove more uncalled methods in core/ Change-Id: I10679c9d28eb495c6bc21fd1355cb3ef330a1209 Reviewed-on: https://pdfium-review.googlesource.com/c/43471 Reviewed-by: Lei Zhang Commit-Queue: Tom Sepez --- core/fpdftext/cpdf_textpage.cpp | 34 ---------------------------------- core/fpdftext/cpdf_textpage.h | 1 - core/fxge/cfx_cliprgn.cpp | 14 ++------------ core/fxge/cfx_cliprgn.h | 1 - core/fxge/cfx_fontmgr.cpp | 8 -------- core/fxge/cfx_fontmgr.h | 1 - 6 files changed, 2 insertions(+), 57 deletions(-) diff --git a/core/fpdftext/cpdf_textpage.cpp b/core/fpdftext/cpdf_textpage.cpp index 8c110b6814..411ba398ae 100644 --- a/core/fpdftext/cpdf_textpage.cpp +++ b/core/fpdftext/cpdf_textpage.cpp @@ -470,40 +470,6 @@ void CPDF_TextPage::GetCharInfo(int index, FPDF_CHAR_INFO* info) const { info->m_Matrix = charinfo.m_Matrix; } -void CPDF_TextPage::CheckMarkedContentObject(int32_t* pStart, - int32_t* pCount) const { - int start = *pStart; - const int nCount = *pCount; - const PAGECHAR_INFO charinfo = m_CharList[start]; - const PAGECHAR_INFO charinfo2 = m_CharList[start + nCount - 1]; - if (charinfo.m_Flag == FPDFTEXT_CHAR_PIECE) { - PAGECHAR_INFO charinfo1 = charinfo; - while (FPDFTEXT_CHAR_PIECE == charinfo1.m_Flag && - charinfo1.m_Index == charinfo.m_Index) { - --start; - if (start < 0) - break; - charinfo1 = m_CharList[start]; - } - ++start; - *pStart = start; - } - if (charinfo2.m_Flag == FPDFTEXT_CHAR_PIECE) { - PAGECHAR_INFO charinfo3 = charinfo2; - int endIndex = start + nCount - 1; - const int innerCount = CountChars(); - while (FPDFTEXT_CHAR_PIECE == charinfo3.m_Flag && - charinfo3.m_Index == charinfo2.m_Index) { - ++endIndex; - if (endIndex >= innerCount) - break; - charinfo3 = m_CharList[endIndex]; - } - --endIndex; - *pCount = endIndex - start + 1; - } -} - WideString CPDF_TextPage::GetPageText(int start, int count) const { if (start < 0 || start >= CountChars() || count <= 0 || !m_bIsParsed || m_CharList.empty() || m_TextBuf.GetLength() == 0) { diff --git a/core/fpdftext/cpdf_textpage.h b/core/fpdftext/cpdf_textpage.h index 90b45bd96b..7ab27024c8 100644 --- a/core/fpdftext/cpdf_textpage.h +++ b/core/fpdftext/cpdf_textpage.h @@ -144,7 +144,6 @@ class CPDF_TextPage { void CloseTempLine(); FPDFText_MarkedContent PreMarkedContent(PDFTEXT_Obj pObj); void ProcessMarkedContent(PDFTEXT_Obj pObj); - void CheckMarkedContentObject(int32_t* pStart, int32_t* pCount) const; void FindPreviousTextObject(); void AddCharInfoByLRDirection(wchar_t wChar, const PAGECHAR_INFO& info); void AddCharInfoByRLDirection(wchar_t wChar, const PAGECHAR_INFO& info); diff --git a/core/fxge/cfx_cliprgn.cpp b/core/fxge/cfx_cliprgn.cpp index 9569ee909c..8a3f946026 100644 --- a/core/fxge/cfx_cliprgn.cpp +++ b/core/fxge/cfx_cliprgn.cpp @@ -14,19 +14,9 @@ CFX_ClipRgn::CFX_ClipRgn(int width, int height) : m_Type(RectI), m_Box(0, 0, width, height) {} -CFX_ClipRgn::CFX_ClipRgn(const CFX_ClipRgn& src) { - m_Type = src.m_Type; - m_Box = src.m_Box; - m_Mask = src.m_Mask; -} - -CFX_ClipRgn::~CFX_ClipRgn() {} +CFX_ClipRgn::CFX_ClipRgn(const CFX_ClipRgn& src) = default; -void CFX_ClipRgn::Reset(const FX_RECT& rect) { - m_Type = RectI; - m_Box = rect; - m_Mask = nullptr; -} +CFX_ClipRgn::~CFX_ClipRgn() = default; void CFX_ClipRgn::IntersectRect(const FX_RECT& rect) { if (m_Type == RectI) { diff --git a/core/fxge/cfx_cliprgn.h b/core/fxge/cfx_cliprgn.h index 58ebb4de73..0087739ad2 100644 --- a/core/fxge/cfx_cliprgn.h +++ b/core/fxge/cfx_cliprgn.h @@ -24,7 +24,6 @@ class CFX_ClipRgn { const FX_RECT& GetBox() const { return m_Box; } RetainPtr GetMask() const { return m_Mask; } - void Reset(const FX_RECT& rect); void IntersectRect(const FX_RECT& rect); void IntersectMaskF(int left, int top, const RetainPtr& Mask); diff --git a/core/fxge/cfx_fontmgr.cpp b/core/fxge/cfx_fontmgr.cpp index 0a19156b46..e781a70507 100644 --- a/core/fxge/cfx_fontmgr.cpp +++ b/core/fxge/cfx_fontmgr.cpp @@ -201,14 +201,6 @@ FXFT_Face CFX_FontMgr::GetFixedFace(pdfium::span span, return FXFT_Set_Pixel_Sizes(face, 64, 64) ? nullptr : face; } -FXFT_Face CFX_FontMgr::GetFileFace(const char* filename, int face_index) { - InitFTLibrary(); - FXFT_Face face = nullptr; - if (FXFT_New_Face(m_FTLibrary, filename, face_index, &face)) - return nullptr; - return FXFT_Set_Pixel_Sizes(face, 64, 64) ? nullptr : face; -} - void CFX_FontMgr::ReleaseFace(FXFT_Face face) { if (!face) return; diff --git a/core/fxge/cfx_fontmgr.h b/core/fxge/cfx_fontmgr.h index 5ac8305d9a..609d51b125 100644 --- a/core/fxge/cfx_fontmgr.h +++ b/core/fxge/cfx_fontmgr.h @@ -46,7 +46,6 @@ class CFX_FontMgr { std::unique_ptr pData, uint32_t size, int font_offset); - FXFT_Face GetFileFace(const char* filename, int face_index); FXFT_Face GetFixedFace(pdfium::span span, int face_index); void ReleaseFace(FXFT_Face face); void SetSystemFontInfo(std::unique_ptr pFontInfo); -- cgit v1.2.3