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

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

Issue 1316643004: Fix typos, nits and remove dead code in fpdf_text_int.cpp. (Closed) Base URL: https://pdfium.googlesource.com/pdfium@master
Patch Set: Created 5 years, 3 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 | « no previous file | core/src/fpdftext/fpdf_text_int.cpp » ('j') | core/src/fpdftext/fpdf_text_int.cpp » ('J')
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 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 #define FPDFTEXT_WRITINGMODE_LRTB 1 65 #define FPDFTEXT_WRITINGMODE_LRTB 1
66 #define FPDFTEXT_WRITINGMODE_RLTB 2 66 #define FPDFTEXT_WRITINGMODE_RLTB 2
67 #define FPDFTEXT_WRITINGMODE_TBRL 3 67 #define FPDFTEXT_WRITINGMODE_TBRL 3
68 class CPDFText_ParseOptions { 68 class CPDFText_ParseOptions {
69 public: 69 public:
70 CPDFText_ParseOptions(); 70 CPDFText_ParseOptions();
71 FX_BOOL m_bGetCharCodeOnly; 71 FX_BOOL m_bGetCharCodeOnly;
72 FX_BOOL m_bNormalizeObjs; 72 FX_BOOL m_bNormalizeObjs;
73 FX_BOOL m_bOutputHyphen; 73 FX_BOOL m_bOutputHyphen;
74 }; 74 };
75
75 class IPDF_TextPage { 76 class IPDF_TextPage {
76 public: 77 public:
78 static IPDF_TextPage* CreateTextPage(const CPDF_Page* pPage, int flags = 0);
79 static IPDF_TextPage* CreateReflowTextPage(IPDF_ReflowedPage* pRefPage);
80
77 virtual ~IPDF_TextPage() {} 81 virtual ~IPDF_TextPage() {}
78 static IPDF_TextPage* CreateTextPage(const CPDF_Page* pPage,
79 CPDFText_ParseOptions ParserOptions);
80 static IPDF_TextPage* CreateTextPage(const CPDF_Page* pPage, int flags = 0);
81 static IPDF_TextPage* CreateTextPage(const CPDF_PageObjects* pObjs,
82 int flags = 0);
83 static IPDF_TextPage* CreateReflowTextPage(IPDF_ReflowedPage* pRefPage);
84 82
85 virtual void NormalizeObjects(FX_BOOL bNormalize) = 0; 83 virtual void NormalizeObjects(FX_BOOL bNormalize) = 0;
86 84
87 virtual FX_BOOL ParseTextPage() = 0; 85 virtual FX_BOOL ParseTextPage() = 0;
88 86
89 virtual FX_BOOL IsParsered() const = 0; 87 virtual bool IsParsed() const = 0;
90 88
91 public:
92 virtual int CharIndexFromTextIndex(int TextIndex) const = 0; 89 virtual int CharIndexFromTextIndex(int TextIndex) const = 0;
93 90
94 virtual int TextIndexFromCharIndex(int CharIndex) const = 0; 91 virtual int TextIndexFromCharIndex(int CharIndex) const = 0;
95 92
96 virtual int CountChars() const = 0; 93 virtual int CountChars() const = 0;
97 94
98 virtual void GetCharInfo(int index, FPDF_CHAR_INFO& info) const = 0; 95 virtual void GetCharInfo(int index, FPDF_CHAR_INFO& info) const = 0;
99 96
100 virtual void GetRectArray(int start, 97 virtual void GetRectArray(int start,
101 int nCount, 98 int nCount,
(...skipping 30 matching lines...) Expand all
132 FX_FLOAT right, 129 FX_FLOAT right,
133 FX_FLOAT bottom, 130 FX_FLOAT bottom,
134 FX_BOOL bContains = FALSE) = 0; 131 FX_BOOL bContains = FALSE) = 0;
135 132
136 virtual void GetBoundedSegment(int index, int& start, int& count) const = 0; 133 virtual void GetBoundedSegment(int index, int& start, int& count) const = 0;
137 134
138 virtual int GetWordBreak(int index, int direction) const = 0; 135 virtual int GetWordBreak(int index, int direction) const = 0;
139 136
140 virtual CFX_WideString GetPageText(int start = 0, int nCount = -1) const = 0; 137 virtual CFX_WideString GetPageText(int start = 0, int nCount = -1) const = 0;
141 }; 138 };
139
142 #define FPDFTEXT_MATCHCASE 0x00000001 140 #define FPDFTEXT_MATCHCASE 0x00000001
143 #define FPDFTEXT_MATCHWHOLEWORD 0x00000002 141 #define FPDFTEXT_MATCHWHOLEWORD 0x00000002
144 #define FPDFTEXT_CONSECUTIVE 0x00000004 142 #define FPDFTEXT_CONSECUTIVE 0x00000004
145 class IPDF_TextPageFind { 143 class IPDF_TextPageFind {
146 public: 144 public:
147 virtual ~IPDF_TextPageFind() {} 145 virtual ~IPDF_TextPageFind() {}
148 146
149 static IPDF_TextPageFind* CreatePageFind(const IPDF_TextPage* pTextPage); 147 static IPDF_TextPageFind* CreatePageFind(const IPDF_TextPage* pTextPage);
150 148
151 public: 149 public:
(...skipping 23 matching lines...) Expand all
175 virtual int CountLinks() const = 0; 173 virtual int CountLinks() const = 0;
176 174
177 virtual CFX_WideString GetURL(int index) const = 0; 175 virtual CFX_WideString GetURL(int index) const = 0;
178 176
179 virtual void GetBoundedSegment(int index, int& start, int& count) const = 0; 177 virtual void GetBoundedSegment(int index, int& start, int& count) const = 0;
180 178
181 virtual void GetRects(int index, CFX_RectArray& rects) const = 0; 179 virtual void GetRects(int index, CFX_RectArray& rects) const = 0;
182 }; 180 };
183 181
184 #endif // CORE_INCLUDE_FPDFTEXT_FPDF_TEXT_H_ 182 #endif // CORE_INCLUDE_FPDFTEXT_FPDF_TEXT_H_
OLDNEW
« no previous file with comments | « no previous file | core/src/fpdftext/fpdf_text_int.cpp » ('j') | core/src/fpdftext/fpdf_text_int.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698