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

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

Issue 2060913003: Make code compile with clang_use_chrome_plugin (part II) (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: revert some string changes Created 4 years, 6 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
OLDNEW
1 // Copyright 2016 PDFium Authors. All rights reserved. 1 // Copyright 2016 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_FPDFTEXT_INCLUDE_CPDF_TEXTPAGE_H_ 7 #ifndef CORE_FPDFTEXT_INCLUDE_CPDF_TEXTPAGE_H_
8 #define CORE_FPDFTEXT_INCLUDE_CPDF_TEXTPAGE_H_ 8 #define CORE_FPDFTEXT_INCLUDE_CPDF_TEXTPAGE_H_
9 9
10 #include <deque> 10 #include <deque>
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 int m_Index; 54 int m_Index;
55 }; 55 };
56 56
57 struct PDFTEXT_Obj { 57 struct PDFTEXT_Obj {
58 CPDF_TextObject* m_pTextObj; 58 CPDF_TextObject* m_pTextObj;
59 CFX_Matrix m_formMatrix; 59 CFX_Matrix m_formMatrix;
60 }; 60 };
61 61
62 class CPDF_TextPage { 62 class CPDF_TextPage {
63 public: 63 public:
64 static FX_BOOL IsRectIntersect(const CFX_FloatRect& rect1,
65 const CFX_FloatRect& rect2);
66
67 CPDF_TextPage(const CPDF_Page* pPage, FPDFText_Direction flags); 64 CPDF_TextPage(const CPDF_Page* pPage, FPDFText_Direction flags);
68 ~CPDF_TextPage() {} 65 ~CPDF_TextPage();
69 66
70 // IPDF_TextPage: 67 // IPDF_TextPage:
71 void ParseTextPage(); 68 void ParseTextPage();
72 bool IsParsed() const { return m_bIsParsed; } 69 bool IsParsed() const { return m_bIsParsed; }
73 int CharIndexFromTextIndex(int TextIndex) const; 70 int CharIndexFromTextIndex(int TextIndex) const;
74 int TextIndexFromCharIndex(int CharIndex) const; 71 int TextIndexFromCharIndex(int CharIndex) const;
75 int CountChars() const; 72 int CountChars() const;
76 void GetCharInfo(int index, FPDF_CHAR_INFO* info) const; 73 void GetCharInfo(int index, FPDF_CHAR_INFO* info) const;
77 std::vector<CFX_FloatRect> GetRectArray(int start, int nCount) const; 74 std::vector<CFX_FloatRect> GetRectArray(int start, int nCount) const;
78 int GetIndexAtPos(CFX_FloatPoint point, 75 int GetIndexAtPos(CFX_FloatPoint point,
(...skipping 12 matching lines...) Expand all
91 FX_FLOAT& left, 88 FX_FLOAT& left,
92 FX_FLOAT& top, 89 FX_FLOAT& top,
93 FX_FLOAT& right, 90 FX_FLOAT& right,
94 FX_FLOAT& bottom) const; 91 FX_FLOAT& bottom) const;
95 int CountBoundedSegments(FX_FLOAT left, 92 int CountBoundedSegments(FX_FLOAT left,
96 FX_FLOAT top, 93 FX_FLOAT top,
97 FX_FLOAT right, 94 FX_FLOAT right,
98 FX_FLOAT bottom, 95 FX_FLOAT bottom,
99 FX_BOOL bContains = FALSE); 96 FX_BOOL bContains = FALSE);
100 97
98 static FX_BOOL IsRectIntersect(const CFX_FloatRect& rect1,
99 const CFX_FloatRect& rect2);
100
101 private: 101 private:
102 FX_BOOL IsHyphen(FX_WCHAR curChar); 102 FX_BOOL IsHyphen(FX_WCHAR curChar);
103 bool IsControlChar(const PAGECHAR_INFO& charInfo); 103 bool IsControlChar(const PAGECHAR_INFO& charInfo);
104 void ProcessObject(); 104 void ProcessObject();
105 void ProcessFormObject(CPDF_FormObject* pFormObj, 105 void ProcessFormObject(CPDF_FormObject* pFormObj,
106 const CFX_Matrix& formMatrix); 106 const CFX_Matrix& formMatrix);
107 void ProcessTextObject(PDFTEXT_Obj pObj); 107 void ProcessTextObject(PDFTEXT_Obj pObj);
108 void ProcessTextObject(CPDF_TextObject* pTextObj, 108 void ProcessTextObject(CPDF_TextObject* pTextObj,
109 const CFX_Matrix& formMatrix, 109 const CFX_Matrix& formMatrix,
110 const CPDF_PageObjectList* pObjList, 110 const CPDF_PageObjectList* pObjList,
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
145 bool m_bIsParsed; 145 bool m_bIsParsed;
146 CFX_Matrix m_DisplayMatrix; 146 CFX_Matrix m_DisplayMatrix;
147 CFX_ArrayTemplate<FPDF_SEGMENT> m_Segments; 147 CFX_ArrayTemplate<FPDF_SEGMENT> m_Segments;
148 std::vector<CFX_FloatRect> m_SelRects; 148 std::vector<CFX_FloatRect> m_SelRects;
149 CFX_ArrayTemplate<PDFTEXT_Obj> m_LineObj; 149 CFX_ArrayTemplate<PDFTEXT_Obj> m_LineObj;
150 int32_t m_TextlineDir; 150 int32_t m_TextlineDir;
151 CFX_FloatRect m_CurlineRect; 151 CFX_FloatRect m_CurlineRect;
152 }; 152 };
153 153
154 #endif // CORE_FPDFTEXT_INCLUDE_CPDF_TEXTPAGE_H_ 154 #endif // CORE_FPDFTEXT_INCLUDE_CPDF_TEXTPAGE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698