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

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: rebase 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
« no previous file with comments | « core/fpdftext/fpdf_text_int.cpp ('k') | core/fpdftext/include/cpdf_textpagefind.h » ('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 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 enum class TextOrientation { 102 enum class TextOrientation {
103 Unknown, 103 Unknown,
104 Horizontal, 104 Horizontal,
105 Vertical, 105 Vertical,
106 }; 106 };
107 107
108 enum class GenerateCharacter { 108 enum class GenerateCharacter {
109 None, 109 None,
110 Space, 110 Space,
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
160 bool m_bIsParsed; 160 bool m_bIsParsed;
161 CFX_Matrix m_DisplayMatrix; 161 CFX_Matrix m_DisplayMatrix;
162 CFX_ArrayTemplate<FPDF_SEGMENT> m_Segments; 162 CFX_ArrayTemplate<FPDF_SEGMENT> m_Segments;
163 std::vector<CFX_FloatRect> m_SelRects; 163 std::vector<CFX_FloatRect> m_SelRects;
164 CFX_ArrayTemplate<PDFTEXT_Obj> m_LineObj; 164 CFX_ArrayTemplate<PDFTEXT_Obj> m_LineObj;
165 TextOrientation m_TextlineDir; 165 TextOrientation m_TextlineDir;
166 CFX_FloatRect m_CurlineRect; 166 CFX_FloatRect m_CurlineRect;
167 }; 167 };
168 168
169 #endif // CORE_FPDFTEXT_INCLUDE_CPDF_TEXTPAGE_H_ 169 #endif // CORE_FPDFTEXT_INCLUDE_CPDF_TEXTPAGE_H_
OLDNEW
« no previous file with comments | « core/fpdftext/fpdf_text_int.cpp ('k') | core/fpdftext/include/cpdf_textpagefind.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698