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

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

Issue 1411833003: XFA: Manually apply changes to fpdf_text.h and fx_font.h from master (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@xfa
Patch Set: Created 5 years, 1 month 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/include/fxge/fx_font.h » ('j') | xfa/src/fgas/src/font/fx_gefont.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:
77 virtual ~IPDF_TextPage() {} 78 static IPDF_TextPage* CreateTextPage(const CPDF_Page* pPage, int flags = 0);
78 static IPDF_TextPage* CreateTextPage(const CPDF_Page* pPage, 79 static IPDF_TextPage* CreateTextPage(const CPDF_Page* pPage,
79 CPDFText_ParseOptions ParserOptions); 80 CPDFText_ParseOptions ParserOptions);
80 static IPDF_TextPage* CreateTextPage(const CPDF_Page* pPage, int flags = 0);
81 static IPDF_TextPage* CreateTextPage(const CPDF_PageObjects* pObjs, 81 static IPDF_TextPage* CreateTextPage(const CPDF_PageObjects* pObjs,
82 int flags = 0); 82 int flags = 0);
83 static IPDF_TextPage* CreateReflowTextPage(IPDF_ReflowedPage* pRefPage); 83 static IPDF_TextPage* CreateReflowTextPage(IPDF_ReflowedPage* pRefPage);
84 84
85 virtual ~IPDF_TextPage() {}
86
85 virtual void NormalizeObjects(FX_BOOL bNormalize) = 0; 87 virtual void NormalizeObjects(FX_BOOL bNormalize) = 0;
86 88
87 virtual FX_BOOL ParseTextPage() = 0; 89 virtual FX_BOOL ParseTextPage() = 0;
88 90
89 virtual FX_BOOL IsParsered() const = 0; 91 virtual bool IsParsed() const = 0;
90 92
91 public:
92 virtual int CharIndexFromTextIndex(int TextIndex) const = 0; 93 virtual int CharIndexFromTextIndex(int TextIndex) const = 0;
93 94
94 virtual int TextIndexFromCharIndex(int CharIndex) const = 0; 95 virtual int TextIndexFromCharIndex(int CharIndex) const = 0;
95 96
96 virtual int CountChars() const = 0; 97 virtual int CountChars() const = 0;
97 98
98 virtual void GetCharInfo(int index, FPDF_CHAR_INFO& info) const = 0; 99 virtual void GetCharInfo(int index, FPDF_CHAR_INFO& info) const = 0;
99 100
100 virtual void GetRectArray(int start, 101 virtual void GetRectArray(int start,
101 int nCount, 102 int nCount,
(...skipping 30 matching lines...) Expand all
132 FX_FLOAT right, 133 FX_FLOAT right,
133 FX_FLOAT bottom, 134 FX_FLOAT bottom,
134 FX_BOOL bContains = FALSE) = 0; 135 FX_BOOL bContains = FALSE) = 0;
135 136
136 virtual void GetBoundedSegment(int index, int& start, int& count) const = 0; 137 virtual void GetBoundedSegment(int index, int& start, int& count) const = 0;
137 138
138 virtual int GetWordBreak(int index, int direction) const = 0; 139 virtual int GetWordBreak(int index, int direction) const = 0;
139 140
140 virtual CFX_WideString GetPageText(int start = 0, int nCount = -1) const = 0; 141 virtual CFX_WideString GetPageText(int start = 0, int nCount = -1) const = 0;
141 }; 142 };
143
142 #define FPDFTEXT_MATCHCASE 0x00000001 144 #define FPDFTEXT_MATCHCASE 0x00000001
143 #define FPDFTEXT_MATCHWHOLEWORD 0x00000002 145 #define FPDFTEXT_MATCHWHOLEWORD 0x00000002
144 #define FPDFTEXT_CONSECUTIVE 0x00000004 146 #define FPDFTEXT_CONSECUTIVE 0x00000004
145 class IPDF_TextPageFind { 147 class IPDF_TextPageFind {
146 public: 148 public:
147 virtual ~IPDF_TextPageFind() {} 149 virtual ~IPDF_TextPageFind() {}
148 150
149 static IPDF_TextPageFind* CreatePageFind(const IPDF_TextPage* pTextPage); 151 static IPDF_TextPageFind* CreatePageFind(const IPDF_TextPage* pTextPage);
150 152
151 public: 153 public:
(...skipping 23 matching lines...) Expand all
175 virtual int CountLinks() const = 0; 177 virtual int CountLinks() const = 0;
176 178
177 virtual CFX_WideString GetURL(int index) const = 0; 179 virtual CFX_WideString GetURL(int index) const = 0;
178 180
179 virtual void GetBoundedSegment(int index, int& start, int& count) const = 0; 181 virtual void GetBoundedSegment(int index, int& start, int& count) const = 0;
180 182
181 virtual void GetRects(int index, CFX_RectArray& rects) const = 0; 183 virtual void GetRects(int index, CFX_RectArray& rects) const = 0;
182 }; 184 };
183 185
184 #endif // CORE_INCLUDE_FPDFTEXT_FPDF_TEXT_H_ 186 #endif // CORE_INCLUDE_FPDFTEXT_FPDF_TEXT_H_
OLDNEW
« no previous file with comments | « no previous file | core/include/fxge/fx_font.h » ('j') | xfa/src/fgas/src/font/fx_gefont.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698