Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
cpdf_textpagefind.h
Go to the documentation of this file.
1
// Copyright 2016 The PDFium Authors
2
// Use of this source code is governed by a BSD-style license that can be
3
// found in the LICENSE file.
4
5
// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
6
7
#
ifndef
CORE_FPDFTEXT_CPDF_TEXTPAGEFIND_H_
8
#
define
CORE_FPDFTEXT_CPDF_TEXTPAGEFIND_H_
9
10
#
include
<
stddef
.
h
>
11
12
#
include
<
memory
>
13
#
include
<
optional
>
14
#
include
<
vector
>
15
16
#
include
"core/fxcrt/fx_coordinates.h"
17
#
include
"core/fxcrt/unowned_ptr.h"
18
#
include
"core/fxcrt/widestring.h"
19
20
class
CPDF_TextPage
;
21
22
class
CPDF_TextPageFind
{
23
public
:
24
struct
Options
{
25
bool
bMatchCase
=
false
;
26
bool
bMatchWholeWord
=
false
;
27
bool
bConsecutive
=
false
;
28
};
29
30
static
std
::
unique_ptr
<
CPDF_TextPageFind
>
Create
(
31
const
CPDF_TextPage
* pTextPage,
32
const
WideString
& findwhat,
33
const
Options
& options,
34
std::optional<size_t> startPos);
35
36
~
CPDF_TextPageFind
();
37
38
bool
FindNext
();
39
bool
FindPrev
();
40
int
GetCurOrder
()
const
;
41
int
GetMatchedCount
()
const
;
42
43
private
:
44
CPDF_TextPageFind(
const
CPDF_TextPage
* pTextPage,
45
const
std::vector<WideString>& findwhat_array,
46
const
Options
& options,
47
std::optional<size_t> startPos);
48
49
// Should be called immediately after construction.
50
bool
FindFirst();
51
52
int
GetCharIndex(
int
index)
const
;
53
54
UnownedPtr
<
const
CPDF_TextPage
>
const
m_pTextPage;
55
const
WideString
m_strText;
56
const
std::vector<WideString> m_csFindWhatArray;
57
std::optional<size_t> m_findNextStart;
58
std::optional<size_t> m_findPreStart;
59
int
m_resStart = 0;
60
int
m_resEnd = -1;
61
const
Options
m_options;
62
};
63
64
#
endif
// CORE_FPDFTEXT_CPDF_TEXTPAGEFIND_H_
DCHECK
#define DCHECK
Definition
check.h:33
CPDF_TextPageFind
Definition
cpdf_textpagefind.h:22
CPDF_TextPageFind::FindNext
bool FindNext()
Definition
cpdf_textpagefind.cpp:218
CPDF_TextPageFind::GetMatchedCount
int GetMatchedCount() const
Definition
cpdf_textpagefind.cpp:349
CPDF_TextPageFind::~CPDF_TextPageFind
~CPDF_TextPageFind()
CPDF_TextPageFind::Create
static std::unique_ptr< CPDF_TextPageFind > Create(const CPDF_TextPage *pTextPage, const WideString &findwhat, const Options &options, std::optional< size_t > startPos)
Definition
cpdf_textpagefind.cpp:180
CPDF_TextPageFind::GetCurOrder
int GetCurOrder() const
Definition
cpdf_textpagefind.cpp:345
CPDF_TextPageFind::FindPrev
bool FindPrev()
Definition
cpdf_textpagefind.cpp:310
CPDF_TextPage
Definition
cpdf_textpage.h:36
fxcrt::UnownedPtr
Definition
unowned_ptr.h:76
fxcrt::WideString::MakeLower
void MakeLower()
Definition
widestring.cpp:687
pdfium::CFDETextOutLargeBitmapTest
Definition
cfde_textout_unittest.cpp:117
UNSAFE_TODO
#define UNSAFE_TODO(...)
Definition
compiler_specific.h:102
FXSYS_IsDecimalDigit
bool FXSYS_IsDecimalDigit(wchar_t c)
Definition
fx_extension.h:105
pdfium::unicode
Definition
fx_unicode.h:97
pdfium::unicode::kRightSingleQuotationMark
constexpr wchar_t kRightSingleQuotationMark
Definition
fx_unicode.h:99
std
[33]
Definition
src_corelib_tools_qhash.cpp:421
CPDF_TextPageFind::Options
Definition
cpdf_textpagefind.h:24
CPDF_TextPageFind::Options::bMatchWholeWord
bool bMatchWholeWord
Definition
cpdf_textpagefind.h:26
CPDF_TextPageFind::Options::bConsecutive
bool bConsecutive
Definition
cpdf_textpagefind.h:27
CPDF_TextPageFind::Options::bMatchCase
bool bMatchCase
Definition
cpdf_textpagefind.h:25
WideString
fxcrt::WideString WideString
Definition
widestring.h:207
qtwebengine
src
3rdparty
chromium
third_party
pdfium
core
fpdftext
cpdf_textpagefind.h
Generated on
for Qt by
1.14.0