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

Side by Side Diff: core/src/fpdftext/text_int.h

Issue 1398383002: core/ difference with XFA (for information only). (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: After bidi 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
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_SRC_FPDFTEXT_TEXT_INT_H_ 7 #ifndef CORE_SRC_FPDFTEXT_TEXT_INT_H_
8 #define CORE_SRC_FPDFTEXT_TEXT_INT_H_ 8 #define CORE_SRC_FPDFTEXT_TEXT_INT_H_
9 9
10 #include "../../include/fpdftext/fpdf_text.h" 10 #include "../../include/fpdftext/fpdf_text.h"
11 #ifdef PDF_ENABLE_XFA
12 #include "../../include/fxcrt/fx_arb.h"
13 #endif
11 #include "../../include/fxcrt/fx_basic.h" 14 #include "../../include/fxcrt/fx_basic.h"
12 15
13 class CFX_BidiChar; 16 class CFX_BidiChar;
14 class CPDF_DocProgressiveSearch; 17 class CPDF_DocProgressiveSearch;
15 class CPDF_FormObject; 18 class CPDF_FormObject;
16 class CPDF_LinkExtract; 19 class CPDF_LinkExtract;
17 class CPDF_TextPageFind; 20 class CPDF_TextPageFind;
18 21
19 #define FPDFTEXT_CHAR_ERROR -1 22 #define FPDFTEXT_CHAR_ERROR -1
20 #define FPDFTEXT_CHAR_NORMAL 0 23 #define FPDFTEXT_CHAR_NORMAL 0
(...skipping 23 matching lines...) Expand all
44 } FPDF_SEGMENT; 47 } FPDF_SEGMENT;
45 typedef CFX_ArrayTemplate<FPDF_SEGMENT> SEGMENT_Array; 48 typedef CFX_ArrayTemplate<FPDF_SEGMENT> SEGMENT_Array;
46 typedef struct { 49 typedef struct {
47 CPDF_TextObject* m_pTextObj; 50 CPDF_TextObject* m_pTextObj;
48 CFX_AffineMatrix m_formMatrix; 51 CFX_AffineMatrix m_formMatrix;
49 } PDFTEXT_Obj; 52 } PDFTEXT_Obj;
50 typedef CFX_ArrayTemplate<PDFTEXT_Obj> LINEOBJ; 53 typedef CFX_ArrayTemplate<PDFTEXT_Obj> LINEOBJ;
51 54
52 class CPDF_TextPage : public IPDF_TextPage { 55 class CPDF_TextPage : public IPDF_TextPage {
53 public: 56 public:
57 #ifndef PDF_ENABLE_XFA
54 CPDF_TextPage(const CPDF_Page* pPage, int flags); 58 CPDF_TextPage(const CPDF_Page* pPage, int flags);
59 #else
60 CPDF_TextPage(const CPDF_Page* pPage, int flags = 0);
61 CPDF_TextPage(const CPDF_PageObjects* pPage, int flags = 0);
62 CPDF_TextPage(const CPDF_Page* pPage, CPDFText_ParseOptions ParserOptions);
63 #endif
55 ~CPDF_TextPage() override {} 64 ~CPDF_TextPage() override {}
56 65
57 // IPDF_TextPage 66 // IPDF_TextPage
58 FX_BOOL ParseTextPage() override; 67 FX_BOOL ParseTextPage() override;
59 void NormalizeObjects(FX_BOOL bNormalize) override; 68 void NormalizeObjects(FX_BOOL bNormalize) override;
60 bool IsParsed() const override { return m_bIsParsed; } 69 bool IsParsed() const override { return m_bIsParsed; }
61 int CharIndexFromTextIndex(int TextIndex) const override; 70 int CharIndexFromTextIndex(int TextIndex) const override;
62 int TextIndexFromCharIndex(int CharIndex) const override; 71 int TextIndexFromCharIndex(int CharIndex) const override;
63 int CountChars() const override; 72 int CountChars() const override;
64 void GetCharInfo(int index, FPDF_CHAR_INFO& info) const override; 73 void GetCharInfo(int index, FPDF_CHAR_INFO& info) const override;
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
118 void CloseTempLine(); 127 void CloseTempLine();
119 void OnPiece(CFX_BidiChar* pBidi, CFX_WideString& str); 128 void OnPiece(CFX_BidiChar* pBidi, CFX_WideString& str);
120 int32_t PreMarkedContent(PDFTEXT_Obj pObj); 129 int32_t PreMarkedContent(PDFTEXT_Obj pObj);
121 void ProcessMarkedContent(PDFTEXT_Obj pObj); 130 void ProcessMarkedContent(PDFTEXT_Obj pObj);
122 void CheckMarkedContentObject(int32_t& start, int32_t& nCount) const; 131 void CheckMarkedContentObject(int32_t& start, int32_t& nCount) const;
123 void FindPreviousTextObject(void); 132 void FindPreviousTextObject(void);
124 void AddCharInfoByLRDirection(CFX_WideString& str, int i); 133 void AddCharInfoByLRDirection(CFX_WideString& str, int i);
125 void AddCharInfoByRLDirection(CFX_WideString& str, int i); 134 void AddCharInfoByRLDirection(CFX_WideString& str, int i);
126 int32_t GetTextObjectWritingMode(const CPDF_TextObject* pTextObj); 135 int32_t GetTextObjectWritingMode(const CPDF_TextObject* pTextObj);
127 int32_t FindTextlineFlowDirection(); 136 int32_t FindTextlineFlowDirection();
137 #ifndef PDF_ENABLE_XFA
128 void SwapTempTextBuf(int32_t iCharListStartAppend, int32_t iBufStartAppend); 138 void SwapTempTextBuf(int32_t iCharListStartAppend, int32_t iBufStartAppend);
129 FX_BOOL IsRightToLeft(const CPDF_TextObject* pTextObj, 139 FX_BOOL IsRightToLeft(const CPDF_TextObject* pTextObj,
130 const CPDF_Font* pFont, 140 const CPDF_Font* pFont,
131 int nItems) const; 141 int nItems) const;
142 #endif
132 143
133 CPDFText_ParseOptions m_ParseOptions; 144 CPDFText_ParseOptions m_ParseOptions;
134 CFX_WordArray m_CharIndex; 145 CFX_WordArray m_CharIndex;
135 const CPDF_PageObjects* const m_pPage; 146 const CPDF_PageObjects* const m_pPage;
136 PAGECHAR_InfoArray m_charList; 147 PAGECHAR_InfoArray m_charList;
137 CFX_WideTextBuf m_TextBuf; 148 CFX_WideTextBuf m_TextBuf;
138 PAGECHAR_InfoArray m_TempCharList; 149 PAGECHAR_InfoArray m_TempCharList;
139 CFX_WideTextBuf m_TempTextBuf; 150 CFX_WideTextBuf m_TempTextBuf;
140 const int m_parserflag; 151 const int m_parserflag;
141 CPDF_TextObject* m_pPreTextObj; 152 CPDF_TextObject* m_pPreTextObj;
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
189 CFX_WideStringArray m_csFindWhatArray; 200 CFX_WideStringArray m_csFindWhatArray;
190 int m_findNextStart; 201 int m_findNextStart;
191 int m_findPreStart; 202 int m_findPreStart;
192 FX_BOOL m_bMatchCase; 203 FX_BOOL m_bMatchCase;
193 FX_BOOL m_bMatchWholeWord; 204 FX_BOOL m_bMatchWholeWord;
194 int m_resStart; 205 int m_resStart;
195 int m_resEnd; 206 int m_resEnd;
196 CFX_RectArray m_resArray; 207 CFX_RectArray m_resArray;
197 FX_BOOL m_IsFind; 208 FX_BOOL m_IsFind;
198 }; 209 };
210 #ifndef PDF_ENABLE_XFA
Lei Zhang 2015/10/30 06:15:30 empty
199 211
212 #endif
200 class CPDF_LinkExt { 213 class CPDF_LinkExt {
201 public: 214 public:
202 CPDF_LinkExt() {} 215 CPDF_LinkExt() {}
203 int m_Start; 216 int m_Start;
204 int m_Count; 217 int m_Count;
205 CFX_WideString m_strUrl; 218 CFX_WideString m_strUrl;
206 virtual ~CPDF_LinkExt() {} 219 virtual ~CPDF_LinkExt() {}
207 }; 220 };
208 221
209 typedef CFX_ArrayTemplate<CPDF_LinkExt*> LINK_InfoArray; 222 typedef CFX_ArrayTemplate<CPDF_LinkExt*> LINK_InfoArray;
(...skipping 28 matching lines...) Expand all
238 251
239 FX_STRSIZE FX_Unicode_GetNormalization(FX_WCHAR wch, FX_WCHAR* pDst); 252 FX_STRSIZE FX_Unicode_GetNormalization(FX_WCHAR wch, FX_WCHAR* pDst);
240 void NormalizeString(CFX_WideString& str); 253 void NormalizeString(CFX_WideString& str);
241 void NormalizeCompositeChar(FX_WCHAR wChar, CFX_WideString& sDest); 254 void NormalizeCompositeChar(FX_WCHAR wChar, CFX_WideString& sDest);
242 void GetTextStream_Unicode(CFX_WideTextBuf& buffer, 255 void GetTextStream_Unicode(CFX_WideTextBuf& buffer,
243 CPDF_PageObjects* pPage, 256 CPDF_PageObjects* pPage,
244 FX_BOOL bUseLF, 257 FX_BOOL bUseLF,
245 CFX_PtrArray* pObjArray); 258 CFX_PtrArray* pObjArray);
246 259
247 #endif // CORE_SRC_FPDFTEXT_TEXT_INT_H_ 260 #endif // CORE_SRC_FPDFTEXT_TEXT_INT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698