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 XFA_FGAS_LAYOUT_FGAS_TEXTBREAK_H_ | 7 #ifndef XFA_FGAS_LAYOUT_FGAS_TEXTBREAK_H_ |
8 #define XFA_FGAS_LAYOUT_FGAS_TEXTBREAK_H_ | 8 #define XFA_FGAS_LAYOUT_FGAS_TEXTBREAK_H_ |
9 | 9 |
| 10 #include <memory> |
| 11 |
10 #include "core/fxcrt/include/fx_ucd.h" | 12 #include "core/fxcrt/include/fx_ucd.h" |
11 #include "core/fxge/include/fx_ge.h" | 13 #include "core/fxge/include/fx_ge.h" |
12 #include "xfa/fgas/crt/fgas_utils.h" | 14 #include "xfa/fgas/crt/fgas_utils.h" |
13 #include "xfa/fgas/layout/fgas_unicode.h" | 15 #include "xfa/fgas/layout/fgas_unicode.h" |
14 | 16 |
15 class CFX_Char; | 17 class CFX_Char; |
16 class CFGAS_GEFont; | 18 class CFGAS_GEFont; |
17 class CFX_TxtChar; | 19 class CFX_TxtChar; |
18 class CFX_TxtPiece; | 20 class CFX_TxtPiece; |
19 class IFX_TxtAccess; | 21 class IFX_TxtAccess; |
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
181 } | 183 } |
182 wsStr.ReleaseBuffer(iCount); | 184 wsStr.ReleaseBuffer(iCount); |
183 } | 185 } |
184 void RemoveAll(FX_BOOL bLeaveMemory = FALSE) { | 186 void RemoveAll(FX_BOOL bLeaveMemory = FALSE) { |
185 m_pLineChars->RemoveAll(); | 187 m_pLineChars->RemoveAll(); |
186 m_pLinePieces->RemoveAll(bLeaveMemory); | 188 m_pLinePieces->RemoveAll(bLeaveMemory); |
187 m_iWidth = 0; | 189 m_iWidth = 0; |
188 m_iArabicChars = 0; | 190 m_iArabicChars = 0; |
189 } | 191 } |
190 | 192 |
191 CFX_TxtCharArray* m_pLineChars; | 193 std::unique_ptr<CFX_TxtCharArray> m_pLineChars; |
192 CFX_TxtPieceArray* m_pLinePieces; | 194 std::unique_ptr<CFX_TxtPieceArray> m_pLinePieces; |
193 int32_t m_iStart; | 195 int32_t m_iStart; |
194 int32_t m_iWidth; | 196 int32_t m_iWidth; |
195 int32_t m_iArabicChars; | 197 int32_t m_iArabicChars; |
196 }; | 198 }; |
197 | 199 |
198 class CFX_TxtBreak { | 200 class CFX_TxtBreak { |
199 public: | 201 public: |
200 CFX_TxtBreak(uint32_t dwPolicies); | 202 CFX_TxtBreak(uint32_t dwPolicies); |
201 ~CFX_TxtBreak(); | 203 ~CFX_TxtBreak(); |
202 | 204 |
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
290 int32_t m_iRotation; | 292 int32_t m_iRotation; |
291 int32_t m_iAlignment; | 293 int32_t m_iAlignment; |
292 uint32_t m_dwContextCharStyles; | 294 uint32_t m_dwContextCharStyles; |
293 int32_t m_iCombWidth; | 295 int32_t m_iCombWidth; |
294 void* m_pUserData; | 296 void* m_pUserData; |
295 FX_CHARTYPE m_eCharType; | 297 FX_CHARTYPE m_eCharType; |
296 FX_BOOL m_bCurRTL; | 298 FX_BOOL m_bCurRTL; |
297 int32_t m_iCurAlignment; | 299 int32_t m_iCurAlignment; |
298 FX_BOOL m_bArabicNumber; | 300 FX_BOOL m_bArabicNumber; |
299 FX_BOOL m_bArabicComma; | 301 FX_BOOL m_bArabicComma; |
300 CFX_TxtLine* m_pTxtLine1; | 302 std::unique_ptr<CFX_TxtLine> m_pTxtLine1; |
301 CFX_TxtLine* m_pTxtLine2; | 303 std::unique_ptr<CFX_TxtLine> m_pTxtLine2; |
302 CFX_TxtLine* m_pCurLine; | 304 CFX_TxtLine* m_pCurLine; |
303 int32_t m_iReady; | 305 int32_t m_iReady; |
304 int32_t m_iTolerance; | 306 int32_t m_iTolerance; |
305 int32_t m_iHorScale; | 307 int32_t m_iHorScale; |
306 int32_t m_iVerScale; | 308 int32_t m_iVerScale; |
307 int32_t m_iCharSpace; | 309 int32_t m_iCharSpace; |
308 }; | 310 }; |
309 | 311 |
310 #endif // XFA_FGAS_LAYOUT_FGAS_TEXTBREAK_H_ | 312 #endif // XFA_FGAS_LAYOUT_FGAS_TEXTBREAK_H_ |
OLD | NEW |