| 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_LINEBREAK_H_ | 7 #ifndef XFA_FGAS_LAYOUT_FGAS_LINEBREAK_H_ |
| 8 #define XFA_FGAS_LAYOUT_FGAS_LINEBREAK_H_ | 8 #define XFA_FGAS_LAYOUT_FGAS_LINEBREAK_H_ |
| 9 | 9 |
| 10 #include "core/include/fxcrt/fx_system.h" | 10 #include "core/include/fxcrt/fx_system.h" |
| 11 #include "xfa/fgas/crt/fgas_utils.h" | 11 #include "xfa/fgas/crt/fgas_utils.h" |
| 12 | 12 |
| 13 enum FX_LINEBREAKTYPE { | 13 enum FX_LINEBREAKTYPE : uint8_t { |
| 14 FX_LBT_UNKNOWN = 0x00, | 14 FX_LBT_UNKNOWN = 0x00, |
| 15 FX_LBT_DIRECT_BRK = 0x1A, | 15 FX_LBT_DIRECT_BRK = 0x1A, |
| 16 FX_LBT_INDIRECT_BRK = 0x2B, | 16 FX_LBT_INDIRECT_BRK = 0x2B, |
| 17 FX_LBT_COM_INDIRECT_BRK = 0x3C, | 17 FX_LBT_COM_INDIRECT_BRK = 0x3C, |
| 18 FX_LBT_COM_PROHIBITED_BRK = 0x4D, | 18 FX_LBT_COM_PROHIBITED_BRK = 0x4D, |
| 19 FX_LBT_PROHIBITED_BRK = 0x5E, | 19 FX_LBT_PROHIBITED_BRK = 0x5E, |
| 20 FX_LBT_HANGUL_SPACE_BRK = 0x6F, | 20 FX_LBT_HANGUL_SPACE_BRK = 0x6F, |
| 21 }; | 21 }; |
| 22 | 22 |
| 23 #define FX_LBUN FX_LBT_UNKNOWN | 23 #define FX_LBUN FX_LBT_UNKNOWN |
| 24 #define FX_LBDB FX_LBT_DIRECT_BRK | 24 #define FX_LBDB FX_LBT_DIRECT_BRK |
| 25 #define FX_LBIB FX_LBT_INDIRECT_BRK | 25 #define FX_LBIB FX_LBT_INDIRECT_BRK |
| 26 #define FX_LBCB FX_LBT_COM_INDIRECT_BRK | 26 #define FX_LBCB FX_LBT_COM_INDIRECT_BRK |
| 27 #define FX_LBCP FX_LBT_COM_PROHIBITED_BRK | 27 #define FX_LBCP FX_LBT_COM_PROHIBITED_BRK |
| 28 #define FX_LBPB FX_LBT_PROHIBITED_BRK | 28 #define FX_LBPB FX_LBT_PROHIBITED_BRK |
| 29 #define FX_LBHS FX_LBT_HANGUL_SPACE_BRK | 29 #define FX_LBHS FX_LBT_HANGUL_SPACE_BRK |
| 30 | 30 |
| 31 extern const FX_LINEBREAKTYPE gs_FX_LineBreak_PairTable[64][32]; | 31 extern const FX_LINEBREAKTYPE gs_FX_LineBreak_PairTable[64][32]; |
| 32 | 32 |
| 33 void FX_GetLineBreakPositions(const FX_WCHAR* pwsText, | 33 void FX_GetLineBreakPositions(const FX_WCHAR* pwsText, |
| 34 FX_LINEBREAKTYPE* pBrkType, | 34 FX_LINEBREAKTYPE* pBrkType, |
| 35 int32_t iLength); | 35 int32_t iLength); |
| 36 void FX_GetLineBreakPositions(const FX_WCHAR* pwsText, | 36 void FX_GetLineBreakPositions(const FX_WCHAR* pwsText, |
| 37 int32_t iLength, | 37 int32_t iLength, |
| 38 CFX_Int32MassArray& bp); | 38 CFX_Int32MassArray& bp); |
| 39 | 39 |
| 40 #endif // XFA_FGAS_LAYOUT_FGAS_LINEBREAK_H_ | 40 #endif // XFA_FGAS_LAYOUT_FGAS_LINEBREAK_H_ |
| OLD | NEW |