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

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

Issue 1239313005: Merge to XFA - else after returns. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@xfa
Patch Set: Fix issues. 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/src/fpdftext/fpdf_text_int.cpp ('k') | core/src/fxcodec/codec/fx_codec_icc.cpp » ('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_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_TextPage; 10 class CPDF_TextPage;
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 virtual int CharIndexFromTextIndex(int TextIndex)const ; 59 virtual int CharIndexFromTextIndex(int TextIndex)const ;
60 virtual int TextIndexFromCharIndex(int CharIndex)const; 60 virtual int TextIndexFromCharIndex(int CharIndex)const;
61 virtual int CountChars() const; 61 virtual int CountChars() const;
62 virtual void GetCharInfo(int index, F PDF_CHAR_INFO & info) const; 62 virtual void GetCharInfo(int index, F PDF_CHAR_INFO & info) const;
63 virtual void GetRectArray(int start, int nCount, CFX_RectArray& rectArray) const; 63 virtual void GetRectArray(int start, int nCount, CFX_RectArray& rectArray) const;
64 virtual int GetIndexAtPos(CPDF_Point point, FX_FLOAT xTorelance, FX_FLOAT yTorelance) const; 64 virtual int GetIndexAtPos(CPDF_Point point, FX_FLOAT xTorelance, FX_FLOAT yTorelance) const;
65 virtual int GetIndexAtPos(FX_FLOAT x , FX_FLOAT y, FX_FLOAT xTorelance, 65 virtual int GetIndexAtPos(FX_FLOAT x , FX_FLOAT y, FX_FLOAT xTorelance,
66 FX_FLOAT yTorelance) const; 66 FX_FLOAT yTorelance) const;
67 virtual CFX_WideString GetTextByRect(const CFX_FloatRec t& rect) const; 67 virtual CFX_WideString GetTextByRect(const CFX_FloatRec t& rect) const;
68 virtual void GetRectsArrayByRect(cons t CFX_FloatRect& rect, CFX_RectArray& resRectArray) const; 68 virtual void GetRectsArrayByRect(cons t CFX_FloatRect& rect, CFX_RectArray& resRectArray) const;
69 virtual int GetOrderByDirect ion(int order, int direction) const;
70 virtual CFX_WideString GetPageText(int start = 0, int n Count = -1) const; 69 virtual CFX_WideString GetPageText(int start = 0, int n Count = -1) const;
71 70
72 virtual int CountRects(int start, in t nCount); 71 virtual int CountRects(int start, in t nCount);
73 virtual void GetRect(int rectIndex, F X_FLOAT& left, FX_FLOAT& top 72 virtual void GetRect(int rectIndex, F X_FLOAT& left, FX_FLOAT& top
74 , FX_FLOAT& right, FX_FLOAT &bottom) const; 73 , FX_FLOAT& right, FX_FLOAT &bottom) const;
75 virtual FX_BOOL GetBaselineRotate(int re ctIndex, int& Rotate); 74 virtual FX_BOOL GetBaselineRotate(int re ctIndex, int& Rotate);
76 virtual FX_BOOL GetBaselineRotate(const CFX_FloatRect& rect, int& Rotate); 75 virtual FX_BOOL GetBaselineRotate(const CFX_FloatRect& rect, int& Rotate);
77 virtual int CountBoundedSegm ents(FX_FLOAT left, FX_FLOAT top, 76 virtual int CountBoundedSegm ents(FX_FLOAT left, FX_FLOAT top,
78 FX_FLOAT right, FX_FLOAT bottom, FX_BOOL bContains = FALSE); 77 FX_FLOAT right, FX_FLOAT bottom, FX_BOOL bContains = FALSE);
79 virtual void GetBoundedSegment(int in dex, int& start, int& count) const; 78 virtual void GetBoundedSegment(int in dex, int& start, int& count) const;
80 virtual int GetWordBreak(int index, int direction) const; 79 virtual int GetWordBreak(int index, int direction) const;
81 public: 80 public:
82 const PAGECHAR_InfoArray* GetCharList() const 81 const PAGECHAR_InfoArray* GetCharList() const
83 { 82 {
84 return &m_charList; 83 return &m_charList;
85 } 84 }
86 static FX_BOOL IsRectIntersect(const CF X_FloatRect& rect1, const CFX_FloatRect& rect2); 85 static FX_BOOL IsRectIntersect(const CF X_FloatRect& rect1, const CFX_FloatRect& rect2);
87 static FX_BOOL IsLetter(FX_WCHAR unicod e); 86 static FX_BOOL IsLetter(FX_WCHAR unicod e);
88 private: 87 private:
89 FX_BOOL IsHyphen(FX_WCHA R curChar); 88 FX_BOOL IsHyphen(FX_WCHA R curChar);
90 FX_BOOL» » » » » » » IsControlChar(PA GECHAR_INFO* pCharInfo); 89 bool» » » » » » » IsControlChar(co nst PAGECHAR_INFO& charInfo);
91 FX_BOOL GetBaselineRotat e(int start, int end, int& Rotate); 90 FX_BOOL GetBaselineRotat e(int start, int end, int& Rotate);
92 void ProcessObject(); 91 void ProcessObject();
93 void ProcessFormObjec t(CPDF_FormObject* pFormObj, const CFX_AffineMatrix& formMatrix); 92 void ProcessFormObjec t(CPDF_FormObject* pFormObj, const CFX_AffineMatrix& formMatrix);
94 void ProcessTextObjec t(PDFTEXT_Obj pObj); 93 void ProcessTextObjec t(PDFTEXT_Obj pObj);
95 void ProcessTextObjec t(CPDF_TextObject* pTextObj, const CFX_AffineMatrix& formMatrix, FX_POSITIO N ObjPos); 94 void ProcessTextObjec t(CPDF_TextObject* pTextObj, const CFX_AffineMatrix& formMatrix, FX_POSITIO N ObjPos);
96 int ProcessInsertObj ect(const CPDF_TextObject* pObj, const CFX_AffineMatrix& formMatrix); 95 int ProcessInsertObj ect(const CPDF_TextObject* pObj, const CFX_AffineMatrix& formMatrix);
97 FX_BOOL GenerateCharInfo (FX_WCHAR unicode, PAGECHAR_INFO& info); 96 FX_BOOL GenerateCharInfo (FX_WCHAR unicode, PAGECHAR_INFO& info);
98 FX_BOOL IsSameAsPreTextO bject(CPDF_TextObject* pTextObj, FX_POSITION ObjPos); 97 FX_BOOL IsSameAsPreTextO bject(CPDF_TextObject* pTextObj, FX_POSITION ObjPos);
99 FX_BOOL IsSameTextObject (CPDF_TextObject* pTextObj1, CPDF_TextObject* pTextObj2); 98 FX_BOOL IsSameTextObject (CPDF_TextObject* pTextObj1, CPDF_TextObject* pTextObj2);
100 int GetCharWidth(FX_ DWORD charCode, CPDF_Font* pFont) const; 99 int GetCharWidth(FX_ DWORD charCode, CPDF_Font* pFont) const;
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
200 LINK_InfoArray m_LinkList; 199 LINK_InfoArray m_LinkList;
201 const CPDF_TextPage* m_pTextPage; 200 const CPDF_TextPage* m_pTextPage;
202 CFX_WideString m_strPageText; 201 CFX_WideString m_strPageText;
203 FX_BOOL m_IsParserd; 202 FX_BOOL m_IsParserd;
204 }; 203 };
205 FX_STRSIZE FX_Unicode_GetNormalization(FX_WCHAR wch, FX_WCHAR* pDst); 204 FX_STRSIZE FX_Unicode_GetNormalization(FX_WCHAR wch, FX_WCHAR* pDst);
206 void NormalizeString(CFX_WideString& str); 205 void NormalizeString(CFX_WideString& str);
207 void NormalizeCompositeChar(FX_WCHAR wChar, CFX_WideString& sDest); 206 void NormalizeCompositeChar(FX_WCHAR wChar, CFX_WideString& sDest);
208 207
209 #endif // CORE_SRC_FPDFTEXT_TEXT_INT_H_ 208 #endif // CORE_SRC_FPDFTEXT_TEXT_INT_H_
OLDNEW
« no previous file with comments | « core/src/fpdftext/fpdf_text_int.cpp ('k') | core/src/fxcodec/codec/fx_codec_icc.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698