OLD | NEW |
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 class CPDF_TextParseOptions | 10 class CPDF_TextParseOptions |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
67 virtual int CharIndexFromTextIndex(int TextIndex)const ; | 67 virtual int CharIndexFromTextIndex(int TextIndex)const ; |
68 virtual int TextIndexFromCharIndex(int CharIndex)const; | 68 virtual int TextIndexFromCharIndex(int CharIndex)const; |
69 virtual int CountChars() const; | 69 virtual int CountChars() const; |
70 virtual void GetCharInfo(int index, F
PDF_CHAR_INFO & info) const; | 70 virtual void GetCharInfo(int index, F
PDF_CHAR_INFO & info) const; |
71 virtual void GetRectArray(int start,
int nCount, CFX_RectArray& rectArray) const; | 71 virtual void GetRectArray(int start,
int nCount, CFX_RectArray& rectArray) const; |
72 virtual int GetIndexAtPos(CPDF_Point
point, FX_FLOAT xTorelance, FX_FLOAT yTorelance) const; | 72 virtual int GetIndexAtPos(CPDF_Point
point, FX_FLOAT xTorelance, FX_FLOAT yTorelance) const; |
73 virtual int GetIndexAtPos(FX_FLOAT x
, FX_FLOAT y, FX_FLOAT xTorelance, | 73 virtual int GetIndexAtPos(FX_FLOAT x
, FX_FLOAT y, FX_FLOAT xTorelance, |
74 FX_FLOAT yTorelance) const; | 74 FX_FLOAT yTorelance) const; |
75 virtual CFX_WideString GetTextByRect(const CFX_FloatRec
t& rect) const; | 75 virtual CFX_WideString GetTextByRect(const CFX_FloatRec
t& rect) const; |
76 virtual void GetRectsArrayByRect(cons
t CFX_FloatRect& rect, CFX_RectArray& resRectArray) const; | 76 virtual void GetRectsArrayByRect(cons
t CFX_FloatRect& rect, CFX_RectArray& resRectArray) const; |
77 virtual int GetOrderByDirect
ion(int order, int direction) const; | |
78 virtual CFX_WideString GetPageText(int start = 0, int n
Count = -1) const; | 77 virtual CFX_WideString GetPageText(int start = 0, int n
Count = -1) const; |
79 | 78 |
80 virtual int CountRects(int start, in
t nCount); | 79 virtual int CountRects(int start, in
t nCount); |
81 virtual void GetRect(int rectIndex, F
X_FLOAT& left, FX_FLOAT& top | 80 virtual void GetRect(int rectIndex, F
X_FLOAT& left, FX_FLOAT& top |
82 , FX_FLOAT& right, FX_FLOAT &bottom)
const; | 81 , FX_FLOAT& right, FX_FLOAT &bottom)
const; |
83 virtual FX_BOOL GetBaselineRotate(int re
ctIndex, int& Rotate); | 82 virtual FX_BOOL GetBaselineRotate(int re
ctIndex, int& Rotate); |
84 virtual FX_BOOL GetBaselineRotate(const
CFX_FloatRect& rect, int& Rotate); | 83 virtual FX_BOOL GetBaselineRotate(const
CFX_FloatRect& rect, int& Rotate); |
85 virtual int CountBoundedSegm
ents(FX_FLOAT left, FX_FLOAT top, | 84 virtual int CountBoundedSegm
ents(FX_FLOAT left, FX_FLOAT top, |
86 FX_FLOAT right, FX_FLOAT bottom, FX_BOOL bContains = FALSE); | 85 FX_FLOAT right, FX_FLOAT bottom, FX_BOOL bContains = FALSE); |
87 virtual void GetBoundedSegment(int in
dex, int& start, int& count) const; | 86 virtual void GetBoundedSegment(int in
dex, int& start, int& count) const; |
88 virtual int GetWordBreak(int index,
int direction) const; | 87 virtual int GetWordBreak(int index,
int direction) const; |
89 public: | 88 public: |
90 const PAGECHAR_InfoArray* GetCharList() const | 89 const PAGECHAR_InfoArray* GetCharList() const |
91 { | 90 { |
92 return &m_charList; | 91 return &m_charList; |
93 } | 92 } |
94 static FX_BOOL IsRectIntersect(const CF
X_FloatRect& rect1, const CFX_FloatRect& rect2); | 93 static FX_BOOL IsRectIntersect(const CF
X_FloatRect& rect1, const CFX_FloatRect& rect2); |
95 static FX_BOOL IsLetter(FX_WCHAR unicod
e); | 94 static FX_BOOL IsLetter(FX_WCHAR unicod
e); |
96 private: | 95 private: |
97 FX_BOOL IsHyphen(FX_WCHA
R curChar); | 96 FX_BOOL IsHyphen(FX_WCHA
R curChar); |
98 FX_BOOL» » » » » » » IsControlChar(PA
GECHAR_INFO* pCharInfo); | 97 bool» » » » » » » IsControlChar(co
nst PAGECHAR_INFO& charInfo); |
99 FX_BOOL GetBaselineRotat
e(int start, int end, int& Rotate); | 98 FX_BOOL GetBaselineRotat
e(int start, int end, int& Rotate); |
100 void ProcessObject(); | 99 void ProcessObject(); |
101 void ProcessFormObjec
t(CPDF_FormObject* pFormObj, const CFX_AffineMatrix& formMatrix); | 100 void ProcessFormObjec
t(CPDF_FormObject* pFormObj, const CFX_AffineMatrix& formMatrix); |
102 void ProcessTextObjec
t(PDFTEXT_Obj pObj); | 101 void ProcessTextObjec
t(PDFTEXT_Obj pObj); |
103 void ProcessTextObjec
t(CPDF_TextObject* pTextObj, const CFX_AffineMatrix& formMatrix, FX_POSITIO
N ObjPos); | 102 void ProcessTextObjec
t(CPDF_TextObject* pTextObj, const CFX_AffineMatrix& formMatrix, FX_POSITIO
N ObjPos); |
104 int ProcessInsertObj
ect(const CPDF_TextObject* pObj, const CFX_AffineMatrix& formMatrix); | 103 int ProcessInsertObj
ect(const CPDF_TextObject* pObj, const CFX_AffineMatrix& formMatrix); |
105 FX_BOOL GenerateCharInfo
(FX_WCHAR unicode, PAGECHAR_INFO& info); | 104 FX_BOOL GenerateCharInfo
(FX_WCHAR unicode, PAGECHAR_INFO& info); |
106 FX_BOOL IsSameAsPreTextO
bject(CPDF_TextObject* pTextObj, FX_POSITION ObjPos); | 105 FX_BOOL IsSameAsPreTextO
bject(CPDF_TextObject* pTextObj, FX_POSITION ObjPos); |
107 FX_BOOL IsSameTextObject
(CPDF_TextObject* pTextObj1, CPDF_TextObject* pTextObj2); | 106 FX_BOOL IsSameTextObject
(CPDF_TextObject* pTextObj1, CPDF_TextObject* pTextObj2); |
108 int GetCharWidth(FX_
DWORD charCode, CPDF_Font* pFont) const; | 107 int GetCharWidth(FX_
DWORD charCode, CPDF_Font* pFont) const; |
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
213 LINK_InfoArray m_LinkList; | 212 LINK_InfoArray m_LinkList; |
214 const CPDF_TextPage* m_pTextPage; | 213 const CPDF_TextPage* m_pTextPage; |
215 CFX_WideString m_strPageText; | 214 CFX_WideString m_strPageText; |
216 FX_BOOL m_IsParserd; | 215 FX_BOOL m_IsParserd; |
217 }; | 216 }; |
218 FX_STRSIZE FX_Unicode_GetNormalization(FX_WCHAR wch, FX_WCHAR* pDst); | 217 FX_STRSIZE FX_Unicode_GetNormalization(FX_WCHAR wch, FX_WCHAR* pDst); |
219 void NormalizeString(CFX_WideString& str); | 218 void NormalizeString(CFX_WideString& str); |
220 void NormalizeCompositeChar(FX_WCHAR wChar, CFX_WideString& sDest); | 219 void NormalizeCompositeChar(FX_WCHAR wChar, CFX_WideString& sDest); |
221 | 220 |
222 #endif // CORE_SRC_FPDFTEXT_TEXT_INT_H_ | 221 #endif // CORE_SRC_FPDFTEXT_TEXT_INT_H_ |
OLD | NEW |