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_linkextract.h
Go to the documentation of this file.
1
// Copyright 2014 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_LINKEXTRACT_H_
8
#
define
CORE_FPDFTEXT_CPDF_LINKEXTRACT_H_
9
10
#
include
<
stddef
.
h
>
11
#
include
<
stdint
.
h
>
12
13
#
include
<
vector
>
14
15
#
include
"core/fxcrt/fx_coordinates.h"
16
#
include
"core/fxcrt/unowned_ptr.h"
17
#
include
"core/fxcrt/widestring.h"
18
#
include
"third_party/abseil-cpp/absl/types/optional.h"
19
20
class
CPDF_TextPage
;
21
22
class
CPDF_LinkExtract
{
23
public
:
24
struct
Range
{
25
size_t
m_Start
;
26
size_t
m_Count
;
27
};
28
29
explicit
CPDF_LinkExtract
(
const
CPDF_TextPage
* pTextPage);
30
~
CPDF_LinkExtract
();
31
32
void
ExtractLinks
();
33
size_t
CountLinks
()
const
{
return
m_LinkArray.size(); }
34
WideString
GetURL
(size_t index)
const
;
35
std
::
vector
<
CFX_FloatRect
>
GetRects
(size_t index)
const
;
36
absl
::
optional
<
Range
>
GetTextRange
(size_t index)
const
;
37
38
protected
:
39
struct
Link
:
public
Range
{
40
WideString
m_strUrl
;
41
};
42
43
absl
::
optional
<
Link
>
CheckWebLink
(
const
WideString& str);
44
bool
CheckMailLink
(WideString* str);
45
46
UnownedPtr
<
const
CPDF_TextPage
>
const
m_pTextPage
;
47
std
::
vector
<
Link
>
m_LinkArray
;
48
};
49
50
#
endif
// CORE_FPDFTEXT_CPDF_LINKEXTRACT_H_
CPDF_LinkExtract
Definition
cpdf_linkextract.h:22
CPDF_LinkExtract::GetRects
std::vector< CFX_FloatRect > GetRects(size_t index) const
Definition
cpdf_linkextract.cpp:306
CPDF_LinkExtract::GetURL
WideString GetURL(size_t index) const
Definition
cpdf_linkextract.cpp:301
CPDF_LinkExtract::m_pTextPage
UnownedPtr< const CPDF_TextPage > const m_pTextPage
Definition
cpdf_linkextract.h:46
CPDF_LinkExtract::GetTextRange
absl::optional< Range > GetTextRange(size_t index) const
Definition
cpdf_linkextract.cpp:314
CPDF_LinkExtract::CPDF_LinkExtract
CPDF_LinkExtract(const CPDF_TextPage *pTextPage)
Definition
cpdf_linkextract.cpp:108
CPDF_LinkExtract::CheckWebLink
absl::optional< Link > CheckWebLink(const WideString &str)
Definition
cpdf_linkextract.cpp:179
CPDF_LinkExtract::~CPDF_LinkExtract
~CPDF_LinkExtract()
CPDF_LinkExtract::m_LinkArray
std::vector< Link > m_LinkArray
Definition
cpdf_linkextract.h:47
CPDF_LinkExtract::CheckMailLink
bool CheckMailLink(WideString *str)
Definition
cpdf_linkextract.cpp:233
CPDF_LinkExtract::ExtractLinks
void ExtractLinks()
Definition
cpdf_linkextract.cpp:113
CPDF_LinkExtract::CountLinks
size_t CountLinks() const
Definition
cpdf_linkextract.h:33
CPDF_TextPage::CharInfo
Definition
cpdf_textpage.h:46
CPDF_TextPage::CharInfo::m_CharType
CharType m_CharType
Definition
cpdf_textpage.h:55
CPDF_TextPage::CharInfo::m_Unicode
wchar_t m_Unicode
Definition
cpdf_textpage.h:54
CPDF_TextPage
Definition
cpdf_textpage.h:36
CPDF_TextPage::CharType
CharType
Definition
cpdf_textpage.h:38
CPDF_TextPage::CharType::kNormal
@ kNormal
CPDF_TextPage::CharType::kHyphen
@ kHyphen
CPDF_TextPage::CharType::kGenerated
@ kGenerated
fxcrt::UnownedPtr
Definition
unowned_ptr.h:75
fxcrt::WideString::operator=
WideString & operator=(WideString &&that) noexcept
Definition
widestring.cpp:505
fxcrt::WideString::TrimRight
void TrimRight(wchar_t target)
Definition
widestring.cpp:1183
fxcrt::WideString::MakeLower
void MakeLower()
Definition
widestring.cpp:900
fxcrt::WideString::Back
CharType Back() const
Definition
widestring.h:152
FXSYS_iswalnum
bool FXSYS_iswalnum(wchar_t c)
Definition
fx_extension.h:63
fxcrt::operator+
WideString operator+(const wchar_t *str1, const WideString &str2)
Definition
widestring.h:281
CPDF_LinkExtract::Link
Definition
cpdf_linkextract.h:39
CPDF_LinkExtract::Link::m_strUrl
WideString m_strUrl
Definition
cpdf_linkextract.h:40
CPDF_LinkExtract::Range
Definition
cpdf_linkextract.h:24
CPDF_LinkExtract::Range::m_Start
size_t m_Start
Definition
cpdf_linkextract.h:25
CPDF_LinkExtract::Range::m_Count
size_t m_Count
Definition
cpdf_linkextract.h:26
qtwebengine
src
3rdparty
chromium
third_party
pdfium
core
fpdftext
cpdf_linkextract.h
Generated on Thu Nov 14 2024 00:57:34 for Qt by
1.12.0