summaryrefslogtreecommitdiff
path: root/core/fpdftext/fpdf_text_int.cpp
diff options
context:
space:
mode:
authorDan Sinclair <dsinclair@chromium.org>2016-03-14 15:56:00 -0400
committerDan Sinclair <dsinclair@chromium.org>2016-03-14 15:56:00 -0400
commit13ee55a8267963c9b39486a6a22646fbdd770742 (patch)
treee50fd9cb4dbde547de6a913c54128114db64df4e /core/fpdftext/fpdf_text_int.cpp
parent544bbc6d81ee9d94a09809830b3f622f2dbad28a (diff)
downloadpdfium-13ee55a8267963c9b39486a6a22646fbdd770742.tar.xz
Move fx_crypto.h and fpdf_text.h out of core/include.
This CL moves the two files and breaks fpdf_text.h apart into individual pieces. R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1801973002 .
Diffstat (limited to 'core/fpdftext/fpdf_text_int.cpp')
-rw-r--r--core/fpdftext/fpdf_text_int.cpp19
1 files changed, 15 insertions, 4 deletions
diff --git a/core/fpdftext/fpdf_text_int.cpp b/core/fpdftext/fpdf_text_int.cpp
index d16ccb8dde..1bd544c444 100644
--- a/core/fpdftext/fpdf_text_int.cpp
+++ b/core/fpdftext/fpdf_text_int.cpp
@@ -13,18 +13,28 @@
#include <utility>
#include <vector>
+#include "core/fpdftext/include/ipdf_linkextract.h"
+#include "core/fpdftext/include/ipdf_textpage.h"
+#include "core/fpdftext/include/ipdf_textpagefind.h"
#include "core/include/fpdfapi/cpdf_dictionary.h"
#include "core/include/fpdfapi/cpdf_string.h"
#include "core/include/fpdfapi/fpdf_module.h"
#include "core/include/fpdfapi/fpdf_page.h"
#include "core/include/fpdfapi/fpdf_pageobj.h"
#include "core/include/fpdfapi/fpdf_resource.h"
-#include "core/include/fpdftext/fpdf_text.h"
#include "core/include/fxcrt/fx_bidi.h"
#include "core/include/fxcrt/fx_ext.h"
#include "core/include/fxcrt/fx_ucd.h"
#include "third_party/base/stl_util.h"
+#define FPDFTEXT_RLTB 1
+#define FPDFTEXT_LEFT -1
+#define FPDFTEXT_RIGHT 1
+
+#define FPDFTEXT_MATCHCASE 0x00000001
+#define FPDFTEXT_MATCHWHOLEWORD 0x00000002
+#define FPDFTEXT_CONSECUTIVE 0x00000004
+
namespace {
FX_BOOL _IsIgnoreSpaceCharacter(FX_WCHAR curChar) {
@@ -1899,7 +1909,8 @@ CPDF_TextPageFind::CPDF_TextPageFind(const IPDF_TextPage* pTextPage)
FPDF_CHAR_INFO info;
pTextPage->GetCharInfo(i, &info);
int indexSize = pdfium::CollectionSize<int>(m_CharIndex);
- if (info.m_Flag == CHAR_NORMAL || info.m_Flag == CHAR_GENERATED) {
+ if (info.m_Flag == FPDFTEXT_CHAR_NORMAL ||
+ info.m_Flag == FPDFTEXT_CHAR_GENERATED) {
if (indexSize % 2) {
m_CharIndex.push_back(1);
} else {
@@ -2325,8 +2336,8 @@ void CPDF_LinkExtract::ParseLink() {
while (pos < TotalChar) {
FPDF_CHAR_INFO pageChar;
m_pTextPage->GetCharInfo(pos, &pageChar);
- if (pageChar.m_Flag == CHAR_GENERATED || pageChar.m_Unicode == 0x20 ||
- pos == TotalChar - 1) {
+ if (pageChar.m_Flag == FPDFTEXT_CHAR_GENERATED ||
+ pageChar.m_Unicode == 0x20 || pos == TotalChar - 1) {
int nCount = pos - start;
if (pos == TotalChar - 1) {
nCount++;