Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(81)

Unified Diff: core/fpdftext/fpdf_text_int.cpp

Issue 1801973002: Move fx_crypto.h and fpdf_text.h out of core/include. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: core/fpdftext/fpdf_text_int.cpp
diff --git a/core/fpdftext/fpdf_text_int.cpp b/core/fpdftext/fpdf_text_int.cpp
index d16ccb8dde4785d14133917239cee997a382c4a1..1bd544c444e555aacc22793da2909d0550a2477a 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++;
« no previous file with comments | « core/fpdfapi/fpdf_parser/cpdf_standard_security_handler.cpp ('k') | core/fpdftext/include/ipdf_linkextract.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698