summaryrefslogtreecommitdiff
path: root/core/fpdftext
diff options
context:
space:
mode:
Diffstat (limited to 'core/fpdftext')
-rw-r--r--core/fpdftext/cpdf_textpagefind.cpp7
-rw-r--r--core/fpdftext/cpdf_textpagefind.h6
2 files changed, 6 insertions, 7 deletions
diff --git a/core/fpdftext/cpdf_textpagefind.cpp b/core/fpdftext/cpdf_textpagefind.cpp
index 97aa34fafe..4950a8fae2 100644
--- a/core/fpdftext/cpdf_textpagefind.cpp
+++ b/core/fpdftext/cpdf_textpagefind.cpp
@@ -81,7 +81,7 @@ int CPDF_TextPageFind::GetCharIndex(int index) const {
bool CPDF_TextPageFind::FindFirst(const WideString& findwhat,
int flags,
- pdfium::Optional<size_t> startPos) {
+ Optional<size_t> startPos) {
if (!m_pTextPage)
return false;
if (m_strText.IsEmpty() || m_bMatchCase != (flags & FPDFTEXT_MATCHCASE))
@@ -142,7 +142,7 @@ bool CPDF_TextPageFind::FindNext() {
return m_IsFind;
}
int nCount = pdfium::CollectionSize<int>(m_csFindWhatArray);
- pdfium::Optional<size_t> nResultPos = 0;
+ Optional<size_t> nResultPos = 0;
size_t nStartPos = m_findNextStart.value();
bool bSpaceStart = false;
for (int iWord = 0; iWord < nCount; iWord++) {
@@ -236,8 +236,7 @@ bool CPDF_TextPageFind::FindPrev() {
return m_IsFind;
}
CPDF_TextPageFind findEngine(m_pTextPage.Get());
- bool ret =
- findEngine.FindFirst(m_findWhat, m_flags, pdfium::Optional<size_t>(0));
+ bool ret = findEngine.FindFirst(m_findWhat, m_flags, Optional<size_t>(0));
if (!ret) {
m_IsFind = false;
return m_IsFind;
diff --git a/core/fpdftext/cpdf_textpagefind.h b/core/fpdftext/cpdf_textpagefind.h
index 574f05ed0d..dd7a31eba9 100644
--- a/core/fpdftext/cpdf_textpagefind.h
+++ b/core/fpdftext/cpdf_textpagefind.h
@@ -24,7 +24,7 @@ class CPDF_TextPageFind {
bool FindFirst(const WideString& findwhat,
int flags,
- pdfium::Optional<size_t> startPos);
+ Optional<size_t> startPos);
bool FindNext();
bool FindPrev();
int GetCurOrder() const;
@@ -48,8 +48,8 @@ class CPDF_TextPageFind {
WideString m_findWhat;
int m_flags;
std::vector<WideString> m_csFindWhatArray;
- pdfium::Optional<size_t> m_findNextStart;
- pdfium::Optional<size_t> m_findPreStart;
+ Optional<size_t> m_findNextStart;
+ Optional<size_t> m_findPreStart;
bool m_bMatchCase;
bool m_bMatchWholeWord;
int m_resStart;