summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Sinclair <dsinclair@chromium.org>2017-10-05 15:22:53 -0400
committerChromium commit bot <commit-bot@chromium.org>2017-10-05 19:39:37 +0000
commit3bea564a5f6d1a66c082ec4df8c999fccf7ec046 (patch)
tree2301756735b57be304ac2a8cd8ec33616a2af7a5
parentc720e3f7981706898de6847604dce0ef68e1be4e (diff)
downloadpdfium-3bea564a5f6d1a66c082ec4df8c999fccf7ec046.tar.xz
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 <rharrison@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
-rw-r--r--core/fpdfdoc/cpdf_variabletext.cpp36
-rw-r--r--core/fpdfdoc/cpdf_variabletext.h3
2 files changed, 0 insertions, 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<int32_t>(pLastSection->m_LineArray) - 1, -1);
- return true;
-}
-
-bool CPDF_VariableText::Iterator::NextSection() {
- if (m_CurPos.nSecIndex <
- pdfium::CollectionSize<int32_t>(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;