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 #include <deque> | 10 #include <deque> |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
50 CPDF_TextObject* m_pTextObj; | 50 CPDF_TextObject* m_pTextObj; |
51 CFX_Matrix m_formMatrix; | 51 CFX_Matrix m_formMatrix; |
52 }; | 52 }; |
53 | 53 |
54 class CPDF_TextPage : public IPDF_TextPage { | 54 class CPDF_TextPage : public IPDF_TextPage { |
55 public: | 55 public: |
56 CPDF_TextPage(const CPDF_Page* pPage, int flags); | 56 CPDF_TextPage(const CPDF_Page* pPage, int flags); |
57 ~CPDF_TextPage() override {} | 57 ~CPDF_TextPage() override {} |
58 | 58 |
59 // IPDF_TextPage: | 59 // IPDF_TextPage: |
60 FX_BOOL ParseTextPage() override; | 60 void ParseTextPage() override; |
61 bool IsParsed() const override { return m_bIsParsed; } | 61 bool IsParsed() const override { return m_bIsParsed; } |
62 int CharIndexFromTextIndex(int TextIndex) const override; | 62 int CharIndexFromTextIndex(int TextIndex) const override; |
63 int TextIndexFromCharIndex(int CharIndex) const override; | 63 int TextIndexFromCharIndex(int CharIndex) const override; |
64 int CountChars() const override; | 64 int CountChars() const override; |
65 void GetCharInfo(int index, FPDF_CHAR_INFO* info) const override; | 65 void GetCharInfo(int index, FPDF_CHAR_INFO* info) const override; |
66 void GetRectArray(int start, | 66 void GetRectArray(int start, |
67 int nCount, | 67 int nCount, |
68 CFX_RectArray& rectArray) const override; | 68 CFX_RectArray& rectArray) const override; |
69 int GetIndexAtPos(CPDF_Point point, | 69 int GetIndexAtPos(CPDF_Point point, |
70 FX_FLOAT xTolerance, | 70 FX_FLOAT xTolerance, |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
124 void AddCharInfoByLRDirection(FX_WCHAR wChar, PAGECHAR_INFO info); | 124 void AddCharInfoByLRDirection(FX_WCHAR wChar, PAGECHAR_INFO info); |
125 void AddCharInfoByRLDirection(FX_WCHAR wChar, PAGECHAR_INFO info); | 125 void AddCharInfoByRLDirection(FX_WCHAR wChar, PAGECHAR_INFO info); |
126 int32_t GetTextObjectWritingMode(const CPDF_TextObject* pTextObj); | 126 int32_t GetTextObjectWritingMode(const CPDF_TextObject* pTextObj); |
127 int32_t FindTextlineFlowDirection(); | 127 int32_t FindTextlineFlowDirection(); |
128 | 128 |
129 void SwapTempTextBuf(int32_t iCharListStartAppend, int32_t iBufStartAppend); | 129 void SwapTempTextBuf(int32_t iCharListStartAppend, int32_t iBufStartAppend); |
130 FX_BOOL IsRightToLeft(const CPDF_TextObject* pTextObj, | 130 FX_BOOL IsRightToLeft(const CPDF_TextObject* pTextObj, |
131 const CPDF_Font* pFont, | 131 const CPDF_Font* pFont, |
132 int nItems) const; | 132 int nItems) const; |
133 | 133 |
| 134 const CPDF_Page* const m_pPage; |
134 std::vector<FX_WORD> m_CharIndex; | 135 std::vector<FX_WORD> m_CharIndex; |
135 const CPDF_PageObjectList* const m_pPage; | |
136 std::deque<PAGECHAR_INFO> m_CharList; | 136 std::deque<PAGECHAR_INFO> m_CharList; |
137 std::deque<PAGECHAR_INFO> m_TempCharList; | 137 std::deque<PAGECHAR_INFO> m_TempCharList; |
138 CFX_WideTextBuf m_TextBuf; | 138 CFX_WideTextBuf m_TextBuf; |
139 CFX_WideTextBuf m_TempTextBuf; | 139 CFX_WideTextBuf m_TempTextBuf; |
140 const int m_parserflag; | 140 const int m_parserflag; |
141 CPDF_TextObject* m_pPreTextObj; | 141 CPDF_TextObject* m_pPreTextObj; |
142 CFX_Matrix m_perMatrix; | 142 CFX_Matrix m_perMatrix; |
143 bool m_bIsParsed; | 143 bool m_bIsParsed; |
144 CFX_Matrix m_DisplayMatrix; | 144 CFX_Matrix m_DisplayMatrix; |
145 CFX_ArrayTemplate<FPDF_SEGMENT> m_Segments; | 145 CFX_ArrayTemplate<FPDF_SEGMENT> m_Segments; |
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
232 private: | 232 private: |
233 LINK_InfoArray m_LinkList; | 233 LINK_InfoArray m_LinkList; |
234 const CPDF_TextPage* m_pTextPage; | 234 const CPDF_TextPage* m_pTextPage; |
235 CFX_WideString m_strPageText; | 235 CFX_WideString m_strPageText; |
236 bool m_bIsParsed; | 236 bool m_bIsParsed; |
237 }; | 237 }; |
238 | 238 |
239 FX_STRSIZE FX_Unicode_GetNormalization(FX_WCHAR wch, FX_WCHAR* pDst); | 239 FX_STRSIZE FX_Unicode_GetNormalization(FX_WCHAR wch, FX_WCHAR* pDst); |
240 | 240 |
241 #endif // CORE_SRC_FPDFTEXT_TEXT_INT_H_ | 241 #endif // CORE_SRC_FPDFTEXT_TEXT_INT_H_ |
OLD | NEW |