| 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 "core/fxcrt/include/fx_basic.h" | 10 #include "core/fxcrt/include/fx_basic.h" |
| 11 #include "core/fxcrt/include/fx_ucd.h" | 11 #include "core/fxcrt/include/fx_ucd.h" |
| 12 #include "xfa/fgas/crt/fgas_memory.h" | 12 #include "xfa/fgas/crt/fgas_memory.h" |
| 13 #include "xfa/fgas/crt/fgas_utils.h" | 13 #include "xfa/fgas/crt/fgas_utils.h" |
| 14 #include "xfa/fgas/layout/fgas_textbreak.h" | 14 #include "xfa/fgas/layout/fgas_textbreak.h" |
| 15 #include "xfa/fgas/layout/fgas_unicode.h" | 15 #include "xfa/fgas/layout/fgas_unicode.h" |
| 16 | 16 |
| 17 class IFX_Font; | 17 class CFX_GEFont; |
| 18 | 18 |
| 19 #define FX_RTFBREAKPOLICY_None 0x00 | 19 #define FX_RTFBREAKPOLICY_None 0x00 |
| 20 #define FX_RTFBREAKPOLICY_SpaceBreak 0x01 | 20 #define FX_RTFBREAKPOLICY_SpaceBreak 0x01 |
| 21 #define FX_RTFBREAKPOLICY_NumberBreak 0x02 | 21 #define FX_RTFBREAKPOLICY_NumberBreak 0x02 |
| 22 #define FX_RTFBREAKPOLICY_InfixBreak 0x04 | 22 #define FX_RTFBREAKPOLICY_InfixBreak 0x04 |
| 23 #define FX_RTFBREAKPOLICY_TabBreak 0x08 | 23 #define FX_RTFBREAKPOLICY_TabBreak 0x08 |
| 24 #define FX_RTFBREAKPOLICY_OrphanPositionedTab 0x10 | 24 #define FX_RTFBREAKPOLICY_OrphanPositionedTab 0x10 |
| 25 #define FX_RTFBREAK_None 0x00 | 25 #define FX_RTFBREAK_None 0x00 |
| 26 #define FX_RTFBREAK_PieceBreak 0x01 | 26 #define FX_RTFBREAK_PieceBreak 0x01 |
| 27 #define FX_RTFBREAK_LineBreak 0x02 | 27 #define FX_RTFBREAK_LineBreak 0x02 |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 75 iBidiLevel = 0; | 75 iBidiLevel = 0; |
| 76 pRect = NULL; | 76 pRect = NULL; |
| 77 wLineBreakChar = L'\n'; | 77 wLineBreakChar = L'\n'; |
| 78 iHorizontalScale = 100; | 78 iHorizontalScale = 100; |
| 79 iVerticalScale = 100; | 79 iVerticalScale = 100; |
| 80 } | 80 } |
| 81 | 81 |
| 82 const FX_WCHAR* pStr; | 82 const FX_WCHAR* pStr; |
| 83 int32_t* pWidths; | 83 int32_t* pWidths; |
| 84 int32_t iLength; | 84 int32_t iLength; |
| 85 IFX_Font* pFont; | 85 CFX_GEFont* pFont; |
| 86 FX_FLOAT fFontSize; | 86 FX_FLOAT fFontSize; |
| 87 uint32_t dwLayoutStyles; | 87 uint32_t dwLayoutStyles; |
| 88 int32_t iCharRotation; | 88 int32_t iCharRotation; |
| 89 int32_t iBidiLevel; | 89 int32_t iBidiLevel; |
| 90 const CFX_RectF* pRect; | 90 const CFX_RectF* pRect; |
| 91 FX_WCHAR wLineBreakChar; | 91 FX_WCHAR wLineBreakChar; |
| 92 int32_t iHorizontalScale; | 92 int32_t iHorizontalScale; |
| 93 int32_t iVerticalScale; | 93 int32_t iVerticalScale; |
| 94 }; | 94 }; |
| 95 | 95 |
| (...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 243 | 243 |
| 244 class CFX_RTFBreak { | 244 class CFX_RTFBreak { |
| 245 public: | 245 public: |
| 246 explicit CFX_RTFBreak(uint32_t dwPolicies); | 246 explicit CFX_RTFBreak(uint32_t dwPolicies); |
| 247 ~CFX_RTFBreak(); | 247 ~CFX_RTFBreak(); |
| 248 | 248 |
| 249 void SetLineBoundary(FX_FLOAT fLineStart, FX_FLOAT fLineEnd); | 249 void SetLineBoundary(FX_FLOAT fLineStart, FX_FLOAT fLineEnd); |
| 250 void SetLineStartPos(FX_FLOAT fLinePos); | 250 void SetLineStartPos(FX_FLOAT fLinePos); |
| 251 uint32_t GetLayoutStyles() const { return m_dwLayoutStyles; } | 251 uint32_t GetLayoutStyles() const { return m_dwLayoutStyles; } |
| 252 void SetLayoutStyles(uint32_t dwLayoutStyles); | 252 void SetLayoutStyles(uint32_t dwLayoutStyles); |
| 253 void SetFont(IFX_Font* pFont); | 253 void SetFont(CFX_GEFont* pFont); |
| 254 void SetFontSize(FX_FLOAT fFontSize); | 254 void SetFontSize(FX_FLOAT fFontSize); |
| 255 void SetTabWidth(FX_FLOAT fTabWidth); | 255 void SetTabWidth(FX_FLOAT fTabWidth); |
| 256 void AddPositionedTab(FX_FLOAT fTabPos); | 256 void AddPositionedTab(FX_FLOAT fTabPos); |
| 257 void SetPositionedTabs(const CFX_FloatArray& tabs); | 257 void SetPositionedTabs(const CFX_FloatArray& tabs); |
| 258 void ClearPositionedTabs(); | 258 void ClearPositionedTabs(); |
| 259 void SetDefaultChar(FX_WCHAR wch); | 259 void SetDefaultChar(FX_WCHAR wch); |
| 260 void SetLineBreakChar(FX_WCHAR wch); | 260 void SetLineBreakChar(FX_WCHAR wch); |
| 261 void SetLineBreakTolerance(FX_FLOAT fTolerance); | 261 void SetLineBreakTolerance(FX_FLOAT fTolerance); |
| 262 void SetHorizontalScale(int32_t iScale); | 262 void SetHorizontalScale(int32_t iScale); |
| 263 void SetVerticalScale(int32_t iScale); | 263 void SetVerticalScale(int32_t iScale); |
| (...skipping 27 matching lines...) Expand all Loading... |
| 291 | 291 |
| 292 protected: | 292 protected: |
| 293 uint32_t m_dwPolicies; | 293 uint32_t m_dwPolicies; |
| 294 int32_t m_iBoundaryStart; | 294 int32_t m_iBoundaryStart; |
| 295 int32_t m_iBoundaryEnd; | 295 int32_t m_iBoundaryEnd; |
| 296 uint32_t m_dwLayoutStyles; | 296 uint32_t m_dwLayoutStyles; |
| 297 FX_BOOL m_bPagination; | 297 FX_BOOL m_bPagination; |
| 298 FX_BOOL m_bVertical; | 298 FX_BOOL m_bVertical; |
| 299 FX_BOOL m_bSingleLine; | 299 FX_BOOL m_bSingleLine; |
| 300 FX_BOOL m_bCharCode; | 300 FX_BOOL m_bCharCode; |
| 301 IFX_Font* m_pFont; | 301 CFX_GEFont* m_pFont; |
| 302 int32_t m_iFontHeight; | 302 int32_t m_iFontHeight; |
| 303 int32_t m_iFontSize; | 303 int32_t m_iFontSize; |
| 304 int32_t m_iTabWidth; | 304 int32_t m_iTabWidth; |
| 305 CFX_Int32Array m_PositionedTabs; | 305 CFX_Int32Array m_PositionedTabs; |
| 306 FX_BOOL m_bOrphanLine; | 306 FX_BOOL m_bOrphanLine; |
| 307 FX_WCHAR m_wDefChar; | 307 FX_WCHAR m_wDefChar; |
| 308 int32_t m_iDefChar; | 308 int32_t m_iDefChar; |
| 309 FX_WCHAR m_wLineBreakChar; | 309 FX_WCHAR m_wLineBreakChar; |
| 310 int32_t m_iHorizontalScale; | 310 int32_t m_iHorizontalScale; |
| 311 int32_t m_iVerticalScale; | 311 int32_t m_iVerticalScale; |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 343 FX_BOOL EndBreak_SplitLine(CFX_RTFLine* pNextLine, | 343 FX_BOOL EndBreak_SplitLine(CFX_RTFLine* pNextLine, |
| 344 FX_BOOL bAllChars, | 344 FX_BOOL bAllChars, |
| 345 uint32_t dwStatus); | 345 uint32_t dwStatus); |
| 346 void EndBreak_BidiLine(CFX_TPOArray& tpos, uint32_t dwStatus); | 346 void EndBreak_BidiLine(CFX_TPOArray& tpos, uint32_t dwStatus); |
| 347 void EndBreak_Alignment(CFX_TPOArray& tpos, | 347 void EndBreak_Alignment(CFX_TPOArray& tpos, |
| 348 FX_BOOL bAllChars, | 348 FX_BOOL bAllChars, |
| 349 uint32_t dwStatus); | 349 uint32_t dwStatus); |
| 350 }; | 350 }; |
| 351 | 351 |
| 352 #endif // XFA_FGAS_LAYOUT_FGAS_RTFBREAK_H_ | 352 #endif // XFA_FGAS_LAYOUT_FGAS_RTFBREAK_H_ |
| OLD | NEW |