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_RTFBREAK_H_ | 7 #ifndef XFA_FGAS_LAYOUT_FGAS_RTFBREAK_H_ |
8 #define XFA_FGAS_LAYOUT_FGAS_RTFBREAK_H_ | 8 #define XFA_FGAS_LAYOUT_FGAS_RTFBREAK_H_ |
9 | 9 |
10 #include <vector> | 10 #include <vector> |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
60 (FX_RTFLINEALIGNMENT_Left | FX_RTFLINEALIGNMENT_Distributed) | 60 (FX_RTFLINEALIGNMENT_Left | FX_RTFLINEALIGNMENT_Distributed) |
61 #define FX_RTFLINEALIGNMENT_DistributedCenter \ | 61 #define FX_RTFLINEALIGNMENT_DistributedCenter \ |
62 (FX_RTFLINEALIGNMENT_Center | FX_RTFLINEALIGNMENT_Distributed) | 62 (FX_RTFLINEALIGNMENT_Center | FX_RTFLINEALIGNMENT_Distributed) |
63 #define FX_RTFLINEALIGNMENT_DistributedRight \ | 63 #define FX_RTFLINEALIGNMENT_DistributedRight \ |
64 (FX_RTFLINEALIGNMENT_Right | FX_RTFLINEALIGNMENT_Distributed) | 64 (FX_RTFLINEALIGNMENT_Right | FX_RTFLINEALIGNMENT_Distributed) |
65 #define FX_RTFLINEALIGNMENT_LowerMask 0x03 | 65 #define FX_RTFLINEALIGNMENT_LowerMask 0x03 |
66 #define FX_RTFLINEALIGNMENT_HigherMask 0x0C | 66 #define FX_RTFLINEALIGNMENT_HigherMask 0x0C |
67 | 67 |
68 struct FX_RTFTEXTOBJ { | 68 struct FX_RTFTEXTOBJ { |
69 FX_RTFTEXTOBJ(); | 69 FX_RTFTEXTOBJ(); |
| 70 ~FX_RTFTEXTOBJ(); |
70 | 71 |
71 const FX_WCHAR* pStr; | 72 const FX_WCHAR* pStr; |
72 int32_t* pWidths; | 73 int32_t* pWidths; |
73 int32_t iLength; | 74 int32_t iLength; |
74 CFGAS_GEFont* pFont; | 75 CFX_RetainPtr<CFGAS_GEFont> pFont; |
75 FX_FLOAT fFontSize; | 76 FX_FLOAT fFontSize; |
76 uint32_t dwLayoutStyles; | 77 uint32_t dwLayoutStyles; |
77 int32_t iCharRotation; | 78 int32_t iCharRotation; |
78 int32_t iBidiLevel; | 79 int32_t iBidiLevel; |
79 const CFX_RectF* pRect; | 80 const CFX_RectF* pRect; |
80 FX_WCHAR wLineBreakChar; | 81 FX_WCHAR wLineBreakChar; |
81 int32_t iHorizontalScale; | 82 int32_t iHorizontalScale; |
82 int32_t iVerticalScale; | 83 int32_t iVerticalScale; |
83 }; | 84 }; |
84 | 85 |
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
215 | 216 |
216 class CFX_RTFBreak { | 217 class CFX_RTFBreak { |
217 public: | 218 public: |
218 explicit CFX_RTFBreak(uint32_t dwPolicies); | 219 explicit CFX_RTFBreak(uint32_t dwPolicies); |
219 ~CFX_RTFBreak(); | 220 ~CFX_RTFBreak(); |
220 | 221 |
221 void SetLineBoundary(FX_FLOAT fLineStart, FX_FLOAT fLineEnd); | 222 void SetLineBoundary(FX_FLOAT fLineStart, FX_FLOAT fLineEnd); |
222 void SetLineStartPos(FX_FLOAT fLinePos); | 223 void SetLineStartPos(FX_FLOAT fLinePos); |
223 uint32_t GetLayoutStyles() const { return m_dwLayoutStyles; } | 224 uint32_t GetLayoutStyles() const { return m_dwLayoutStyles; } |
224 void SetLayoutStyles(uint32_t dwLayoutStyles); | 225 void SetLayoutStyles(uint32_t dwLayoutStyles); |
225 void SetFont(CFGAS_GEFont* pFont); | 226 void SetFont(const CFX_RetainPtr<CFGAS_GEFont>& pFont); |
226 void SetFontSize(FX_FLOAT fFontSize); | 227 void SetFontSize(FX_FLOAT fFontSize); |
227 void SetTabWidth(FX_FLOAT fTabWidth); | 228 void SetTabWidth(FX_FLOAT fTabWidth); |
228 void AddPositionedTab(FX_FLOAT fTabPos); | 229 void AddPositionedTab(FX_FLOAT fTabPos); |
229 void SetPositionedTabs(const std::vector<FX_FLOAT>& tabs); | 230 void SetPositionedTabs(const std::vector<FX_FLOAT>& tabs); |
230 void ClearPositionedTabs(); | 231 void ClearPositionedTabs(); |
231 void SetDefaultChar(FX_WCHAR wch); | 232 void SetDefaultChar(FX_WCHAR wch); |
232 void SetLineBreakChar(FX_WCHAR wch); | 233 void SetLineBreakChar(FX_WCHAR wch); |
233 void SetLineBreakTolerance(FX_FLOAT fTolerance); | 234 void SetLineBreakTolerance(FX_FLOAT fTolerance); |
234 void SetHorizontalScale(int32_t iScale); | 235 void SetHorizontalScale(int32_t iScale); |
235 void SetVerticalScale(int32_t iScale); | 236 void SetVerticalScale(int32_t iScale); |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
287 uint32_t dwStatus); | 288 uint32_t dwStatus); |
288 | 289 |
289 uint32_t m_dwPolicies; | 290 uint32_t m_dwPolicies; |
290 int32_t m_iBoundaryStart; | 291 int32_t m_iBoundaryStart; |
291 int32_t m_iBoundaryEnd; | 292 int32_t m_iBoundaryEnd; |
292 uint32_t m_dwLayoutStyles; | 293 uint32_t m_dwLayoutStyles; |
293 bool m_bPagination; | 294 bool m_bPagination; |
294 bool m_bVertical; | 295 bool m_bVertical; |
295 bool m_bSingleLine; | 296 bool m_bSingleLine; |
296 bool m_bCharCode; | 297 bool m_bCharCode; |
297 CFGAS_GEFont* m_pFont; | 298 CFX_RetainPtr<CFGAS_GEFont> m_pFont; |
298 int32_t m_iFontHeight; | 299 int32_t m_iFontHeight; |
299 int32_t m_iFontSize; | 300 int32_t m_iFontSize; |
300 int32_t m_iTabWidth; | 301 int32_t m_iTabWidth; |
301 CFX_Int32Array m_PositionedTabs; | 302 CFX_Int32Array m_PositionedTabs; |
302 bool m_bOrphanLine; | 303 bool m_bOrphanLine; |
303 FX_WCHAR m_wDefChar; | 304 FX_WCHAR m_wDefChar; |
304 int32_t m_iDefChar; | 305 int32_t m_iDefChar; |
305 FX_WCHAR m_wLineBreakChar; | 306 FX_WCHAR m_wLineBreakChar; |
306 int32_t m_iHorizontalScale; | 307 int32_t m_iHorizontalScale; |
307 int32_t m_iVerticalScale; | 308 int32_t m_iVerticalScale; |
308 int32_t m_iLineRotation; | 309 int32_t m_iLineRotation; |
309 int32_t m_iCharRotation; | 310 int32_t m_iCharRotation; |
310 int32_t m_iRotation; | 311 int32_t m_iRotation; |
311 int32_t m_iCharSpace; | 312 int32_t m_iCharSpace; |
312 bool m_bWordSpace; | 313 bool m_bWordSpace; |
313 int32_t m_iWordSpace; | 314 int32_t m_iWordSpace; |
314 bool m_bRTL; | 315 bool m_bRTL; |
315 int32_t m_iAlignment; | 316 int32_t m_iAlignment; |
316 IFX_Retainable* m_pUserData; | 317 IFX_Retainable* m_pUserData; |
317 FX_CHARTYPE m_eCharType; | 318 FX_CHARTYPE m_eCharType; |
318 uint32_t m_dwIdentity; | 319 uint32_t m_dwIdentity; |
319 CFX_RTFLine m_RTFLine1; | 320 CFX_RTFLine m_RTFLine1; |
320 CFX_RTFLine m_RTFLine2; | 321 CFX_RTFLine m_RTFLine2; |
321 CFX_RTFLine* m_pCurLine; | 322 CFX_RTFLine* m_pCurLine; |
322 int32_t m_iReady; | 323 int32_t m_iReady; |
323 int32_t m_iTolerance; | 324 int32_t m_iTolerance; |
324 }; | 325 }; |
325 | 326 |
326 #endif // XFA_FGAS_LAYOUT_FGAS_RTFBREAK_H_ | 327 #endif // XFA_FGAS_LAYOUT_FGAS_RTFBREAK_H_ |
OLD | NEW |