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

Side by Side Diff: core/include/fpdftext/fpdf_text.h

Issue 1252613002: FX_BOOL considered harmful. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Manual edits. Created 5 years, 5 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 unified diff | Download patch
« no previous file with comments | « core/include/fpdfdoc/fpdf_vt.h ('k') | core/include/fxcodec/fx_codec.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 PDFium Authors. All rights reserved. 1 // Copyright 2014 PDFium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
6 6
7 #ifndef CORE_INCLUDE_FPDFTEXT_FPDF_TEXT_H_ 7 #ifndef CORE_INCLUDE_FPDFTEXT_FPDF_TEXT_H_
8 #define CORE_INCLUDE_FPDFTEXT_FPDF_TEXT_H_ 8 #define CORE_INCLUDE_FPDFTEXT_FPDF_TEXT_H_
9 9
10 #include "../fpdfapi/fpdf_parser.h" 10 #include "../fpdfapi/fpdf_parser.h"
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 #define FPDFTEXT_DOWN 2 54 #define FPDFTEXT_DOWN 2
55 #define FPDFTEXT_WRITINGMODE_UNKNOW 0 55 #define FPDFTEXT_WRITINGMODE_UNKNOW 0
56 #define FPDFTEXT_WRITINGMODE_LRTB 1 56 #define FPDFTEXT_WRITINGMODE_LRTB 1
57 #define FPDFTEXT_WRITINGMODE_RLTB 2 57 #define FPDFTEXT_WRITINGMODE_RLTB 2
58 #define FPDFTEXT_WRITINGMODE_TBRL 3 58 #define FPDFTEXT_WRITINGMODE_TBRL 3
59 class CPDFText_ParseOptions 59 class CPDFText_ParseOptions
60 { 60 {
61 public: 61 public:
62 62
63 CPDFText_ParseOptions(); 63 CPDFText_ParseOptions();
64 FX_BOOL» » » m_bGetCharCodeOnly; 64 bool» » » m_bGetCharCodeOnly;
65 FX_BOOL» » » m_bNormalizeObjs; 65 bool» » » m_bNormalizeObjs;
66 FX_BOOL» » » m_bOutputHyphen; 66 bool» » » m_bOutputHyphen;
67 }; 67 };
68 class IPDF_TextPage 68 class IPDF_TextPage
69 { 69 {
70 public: 70 public:
71 71
72 virtual ~IPDF_TextPage() {} 72 virtual ~IPDF_TextPage() {}
73 static IPDF_TextPage* CreateTextPage(const CPDF_Page* pPage, CPDFText_ ParseOptions ParserOptions); 73 static IPDF_TextPage* CreateTextPage(const CPDF_Page* pPage, CPDFText_ ParseOptions ParserOptions);
74 static IPDF_TextPage* CreateTextPage(const CPDF_Page* pPage, int flags = 0); 74 static IPDF_TextPage* CreateTextPage(const CPDF_Page* pPage, int flags = 0);
75 static IPDF_TextPage* CreateTextPage(const CPDF_PageObjects* pObjs, in t flags = 0); 75 static IPDF_TextPage* CreateTextPage(const CPDF_PageObjects* pObjs, in t flags = 0);
76 static IPDF_TextPage* CreateReflowTextPage(IPDF_ReflowedPage* pRefPage ); 76 static IPDF_TextPage* CreateReflowTextPage(IPDF_ReflowedPage* pRefPage );
77 77
78 virtual void» » » NormalizeObjects(FX_BOOL bNormalize) = 0 ; 78 virtual void» » » NormalizeObjects(bool bNormalize) = 0;
79 79
80 virtual FX_BOOL» » » ParseTextPage() = 0; 80 virtual bool» » » ParseTextPage() = 0;
81 81
82 82
83 virtual FX_BOOL» » » IsParsered() const = 0; 83 virtual bool» » » IsParsered() const = 0;
84 public: 84 public:
85 85
86 virtual int CharIndexFromTextIndex(int TextIndex) const = 0; 86 virtual int CharIndexFromTextIndex(int TextIndex) const = 0;
87 87
88 virtual int TextIndexFromCharIndex(int CharIndex) const = 0; 88 virtual int TextIndexFromCharIndex(int CharIndex) const = 0;
89 89
90 90
91 virtual int CountChars() const = 0; 91 virtual int CountChars() const = 0;
92 92
93 virtual void GetCharInfo(int index, FPDF_CHAR_INFO & info) const = 0; 93 virtual void GetCharInfo(int index, FPDF_CHAR_INFO & info) const = 0;
(...skipping 10 matching lines...) Expand all
104 104
105 virtual CFX_WideString GetTextByRect(const CFX_FloatRect& rect) const = 0; 105 virtual CFX_WideString GetTextByRect(const CFX_FloatRect& rect) const = 0;
106 106
107 virtual void GetRectsArrayByRect(const CFX_FloatRect& rect, CFX_RectArray& resRectArray) const = 0; 107 virtual void GetRectsArrayByRect(const CFX_FloatRect& rect, CFX_RectArray& resRectArray) const = 0;
108 108
109 109
110 virtual int CountRects(int start, int nCount) = 0; 110 virtual int CountRects(int start, int nCount) = 0;
111 111
112 virtual void GetRect(int rectIndex, FX_FLOAT& left, F X_FLOAT& top, FX_FLOAT& right, FX_FLOAT &bottom) const = 0; 112 virtual void GetRect(int rectIndex, FX_FLOAT& left, F X_FLOAT& top, FX_FLOAT& right, FX_FLOAT &bottom) const = 0;
113 113
114 virtual FX_BOOL» » » GetBaselineRotate(int rectIndex, int& Ro tate) = 0; 114 virtual bool» » » GetBaselineRotate(int rectIndex, int& Ro tate) = 0;
115 115
116 virtual FX_BOOL» » » GetBaselineRotate(const CFX_FloatRect& r ect, int& Rotate) = 0; 116 virtual bool» » » GetBaselineRotate(const CFX_FloatRect& r ect, int& Rotate) = 0;
117 117
118 virtual» int» » » » CountBoundedSegments(FX_FLOAT le ft, FX_FLOAT top, FX_FLOAT right, FX_FLOAT bottom, FX_BOOL bContains = FALSE) = 0; 118 virtual» int» » » » CountBoundedSegments(FX_FLOAT le ft, FX_FLOAT top, FX_FLOAT right, FX_FLOAT bottom, bool bContains = false) = 0;
119 119
120 virtual void GetBoundedSegment(int index, int& start, int& count) const = 0; 120 virtual void GetBoundedSegment(int index, int& start, int& count) const = 0;
121 121
122 122
123 virtual int GetWordBreak(int index, int direction) c onst = 0; 123 virtual int GetWordBreak(int index, int direction) c onst = 0;
124 124
125 virtual CFX_WideString GetPageText(int start = 0, int nCount = -1 ) con st = 0; 125 virtual CFX_WideString GetPageText(int start = 0, int nCount = -1 ) con st = 0;
126 }; 126 };
127 #define FPDFTEXT_MATCHCASE 0x00000001 127 #define FPDFTEXT_MATCHCASE 0x00000001
128 #define FPDFTEXT_MATCHWHOLEWORD 0x00000002 128 #define FPDFTEXT_MATCHWHOLEWORD 0x00000002
129 #define FPDFTEXT_CONSECUTIVE 0x00000004 129 #define FPDFTEXT_CONSECUTIVE 0x00000004
130 class IPDF_TextPageFind 130 class IPDF_TextPageFind
131 { 131 {
132 public: 132 public:
133 133
134 virtual ~IPDF_TextPageFind() {} 134 virtual ~IPDF_TextPageFind() {}
135 135
136 static IPDF_TextPageFind* CreatePageFind(const IPDF_TextPage* pTex tPage); 136 static IPDF_TextPageFind* CreatePageFind(const IPDF_TextPage* pTex tPage);
137 public: 137 public:
138 138
139 virtual» FX_BOOL»» » » FindFirst(const CFX_WideString& findwhat, int flags, int startPos = 0) = 0; 139 virtual» bool» » » » FindFirst(const CFX_WideString& findwhat, int flags, int startPos = 0) = 0;
140 140
141 virtual» FX_BOOL»» » » FindNext() = 0; 141 virtual» bool» » » » FindNext() = 0;
142 142
143 virtual» FX_BOOL»» » » FindPrev() = 0; 143 virtual» bool» » » » FindPrev() = 0;
144 144
145 virtual void GetRectArray(CFX_RectArray& rect s) const = 0; 145 virtual void GetRectArray(CFX_RectArray& rect s) const = 0;
146 146
147 virtual int GetCurOrder() const = 0; 147 virtual int GetCurOrder() const = 0;
148 148
149 virtual int GetMatchedCount() const = 0; 149 virtual int GetMatchedCount() const = 0;
150 }; 150 };
151 class IPDF_LinkExtract 151 class IPDF_LinkExtract
152 { 152 {
153 public: 153 public:
154 154
155 virtual ~IPDF_LinkExtract() {} 155 virtual ~IPDF_LinkExtract() {}
156 156
157 static IPDF_LinkExtract* CreateLinkExtract(); 157 static IPDF_LinkExtract* CreateLinkExtract();
158 158
159 virtual FX_BOOL» » » » ExtractLinks(const IPDF_TextPage * pTextPage) = 0; 159 virtual bool» » » » ExtractLinks(const IPDF_TextPage * pTextPage) = 0;
160 public: 160 public:
161 161
162 virtual int CountLinks() const = 0; 162 virtual int CountLinks() const = 0;
163 163
164 virtual CFX_WideString GetURL(int index) const = 0; 164 virtual CFX_WideString GetURL(int index) const = 0;
165 165
166 virtual void GetBoundedSegment(int index, int & start, int& count) const = 0; 166 virtual void GetBoundedSegment(int index, int & start, int& count) const = 0;
167 167
168 virtual void GetRects(int index, CFX_RectArra y& rects) const = 0; 168 virtual void GetRects(int index, CFX_RectArra y& rects) const = 0;
169 }; 169 };
170 170
171 #endif // CORE_INCLUDE_FPDFTEXT_FPDF_TEXT_H_ 171 #endif // CORE_INCLUDE_FPDFTEXT_FPDF_TEXT_H_
OLDNEW
« no previous file with comments | « core/include/fpdfdoc/fpdf_vt.h ('k') | core/include/fxcodec/fx_codec.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698