From 3bea564a5f6d1a66c082ec4df8c999fccf7ec046 Mon Sep 17 00:00:00 2001 From: Dan Sinclair Date: Thu, 5 Oct 2017 15:22:53 -0400 Subject: Remove unused methods from CPDF_VariableText::Iterator. This CL removes methods from CPDF_VariableText::Iterator which are never called. Change-Id: I8652320f0e6576e39e7636ce9941e1f148eb9cec Reviewed-on: https://pdfium-review.googlesource.com/15674 Reviewed-by: Ryan Harrison Commit-Queue: dsinclair --- core/fpdfdoc/cpdf_variabletext.cpp | 36 ------------------------------------ core/fpdfdoc/cpdf_variabletext.h | 3 --- 2 files changed, 39 deletions(-) diff --git a/core/fpdfdoc/cpdf_variabletext.cpp b/core/fpdfdoc/cpdf_variabletext.cpp index d702f52ba4..d2643e8d64 100644 --- a/core/fpdfdoc/cpdf_variabletext.cpp +++ b/core/fpdfdoc/cpdf_variabletext.cpp @@ -132,42 +132,6 @@ bool CPDF_VariableText::Iterator::NextLine() { return false; } -bool CPDF_VariableText::Iterator::PrevLine() { - if (!pdfium::IndexInBounds(m_pVT->m_SectionArray, m_CurPos.nSecIndex)) - return false; - - if (m_CurPos.nLineIndex > 0) { - m_CurPos = CPVT_WordPlace(m_CurPos.nSecIndex, m_CurPos.nLineIndex - 1, -1); - return true; - } - if (!pdfium::IndexInBounds(m_pVT->m_SectionArray, m_CurPos.nSecIndex - 1)) - return false; - - CSection* pLastSection = m_pVT->m_SectionArray[m_CurPos.nSecIndex - 1].get(); - m_CurPos = CPVT_WordPlace( - m_CurPos.nSecIndex - 1, - pdfium::CollectionSize(pLastSection->m_LineArray) - 1, -1); - return true; -} - -bool CPDF_VariableText::Iterator::NextSection() { - if (m_CurPos.nSecIndex < - pdfium::CollectionSize(m_pVT->m_SectionArray) - 1) { - m_CurPos = CPVT_WordPlace(m_CurPos.nSecIndex + 1, 0, -1); - return true; - } - return false; -} - -bool CPDF_VariableText::Iterator::PrevSection() { - ASSERT(m_pVT); - if (m_CurPos.nSecIndex > 0) { - m_CurPos = CPVT_WordPlace(m_CurPos.nSecIndex - 1, 0, -1); - return true; - } - return false; -} - bool CPDF_VariableText::Iterator::GetWord(CPVT_Word& word) const { word.WordPlace = m_CurPos; if (!pdfium::IndexInBounds(m_pVT->m_SectionArray, m_CurPos.nSecIndex)) diff --git a/core/fpdfdoc/cpdf_variabletext.h b/core/fpdfdoc/cpdf_variabletext.h index ee68f023fa..a438a1c1c9 100644 --- a/core/fpdfdoc/cpdf_variabletext.h +++ b/core/fpdfdoc/cpdf_variabletext.h @@ -42,9 +42,6 @@ class CPDF_VariableText { bool NextWord(); bool PrevWord(); bool NextLine(); - bool PrevLine(); - bool NextSection(); - bool PrevSection(); bool GetWord(CPVT_Word& word) const; bool GetLine(CPVT_Line& line) const; bool GetSection(CPVT_Section& section) const; -- cgit v1.2.3