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 "core/fxge/include/fx_ge.h" | |
13 #include "xfa/fgas/crt/fgas_memory.h" | 12 #include "xfa/fgas/crt/fgas_memory.h" |
14 #include "xfa/fgas/crt/fgas_utils.h" | 13 #include "xfa/fgas/crt/fgas_utils.h" |
15 #include "xfa/fgas/layout/fgas_textbreak.h" | 14 #include "xfa/fgas/layout/fgas_textbreak.h" |
16 #include "xfa/fgas/layout/fgas_unicode.h" | 15 #include "xfa/fgas/layout/fgas_unicode.h" |
17 | 16 |
18 class IFX_Font; | 17 class IFX_Font; |
19 | 18 |
20 #define FX_RTFBREAKPOLICY_None 0x00 | 19 #define FX_RTFBREAKPOLICY_None 0x00 |
21 #define FX_RTFBREAKPOLICY_SpaceBreak 0x01 | 20 #define FX_RTFBREAKPOLICY_SpaceBreak 0x01 |
22 #define FX_RTFBREAKPOLICY_NumberBreak 0x02 | 21 #define FX_RTFBREAKPOLICY_NumberBreak 0x02 |
(...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
237 CFX_RTFCharArray m_LineChars; | 236 CFX_RTFCharArray m_LineChars; |
238 CFX_RTFPieceArray m_LinePieces; | 237 CFX_RTFPieceArray m_LinePieces; |
239 int32_t m_iStart; | 238 int32_t m_iStart; |
240 int32_t m_iWidth; | 239 int32_t m_iWidth; |
241 int32_t m_iArabicChars; | 240 int32_t m_iArabicChars; |
242 int32_t m_iMBCSChars; | 241 int32_t m_iMBCSChars; |
243 }; | 242 }; |
244 | 243 |
245 class CFX_RTFBreak { | 244 class CFX_RTFBreak { |
246 public: | 245 public: |
247 CFX_RTFBreak(uint32_t dwPolicies); | 246 explicit CFX_RTFBreak(uint32_t dwPolicies); |
248 ~CFX_RTFBreak(); | 247 ~CFX_RTFBreak(); |
249 | 248 |
250 void SetLineBoundary(FX_FLOAT fLineStart, FX_FLOAT fLineEnd); | 249 void SetLineBoundary(FX_FLOAT fLineStart, FX_FLOAT fLineEnd); |
251 void SetLineStartPos(FX_FLOAT fLinePos); | 250 void SetLineStartPos(FX_FLOAT fLinePos); |
252 uint32_t GetLayoutStyles() const { return m_dwLayoutStyles; } | 251 uint32_t GetLayoutStyles() const { return m_dwLayoutStyles; } |
253 void SetLayoutStyles(uint32_t dwLayoutStyles); | 252 void SetLayoutStyles(uint32_t dwLayoutStyles); |
254 void SetFont(IFX_Font* pFont); | 253 void SetFont(IFX_Font* pFont); |
255 void SetFontSize(FX_FLOAT fFontSize); | 254 void SetFontSize(FX_FLOAT fFontSize); |
256 void SetTabWidth(FX_FLOAT fTabWidth); | 255 void SetTabWidth(FX_FLOAT fTabWidth); |
257 void AddPositionedTab(FX_FLOAT fTabPos); | 256 void AddPositionedTab(FX_FLOAT fTabPos); |
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
344 FX_BOOL EndBreak_SplitLine(CFX_RTFLine* pNextLine, | 343 FX_BOOL EndBreak_SplitLine(CFX_RTFLine* pNextLine, |
345 FX_BOOL bAllChars, | 344 FX_BOOL bAllChars, |
346 uint32_t dwStatus); | 345 uint32_t dwStatus); |
347 void EndBreak_BidiLine(CFX_TPOArray& tpos, uint32_t dwStatus); | 346 void EndBreak_BidiLine(CFX_TPOArray& tpos, uint32_t dwStatus); |
348 void EndBreak_Alignment(CFX_TPOArray& tpos, | 347 void EndBreak_Alignment(CFX_TPOArray& tpos, |
349 FX_BOOL bAllChars, | 348 FX_BOOL bAllChars, |
350 uint32_t dwStatus); | 349 uint32_t dwStatus); |
351 }; | 350 }; |
352 | 351 |
353 #endif // XFA_FGAS_LAYOUT_FGAS_RTFBREAK_H_ | 352 #endif // XFA_FGAS_LAYOUT_FGAS_RTFBREAK_H_ |
OLD | NEW |