| 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 #include "../../../foxitlib.h" | 7 #include "xfa/src/foxitlib.h" |
| 8 #include "fx_wordbreak_impl.h" | 8 #include "fx_wordbreak_impl.h" |
| 9 #define FX_IsOdd(a) ((a)&1) | 9 #define FX_IsOdd(a) ((a)&1) |
| 10 FX_WordBreakProp FX_GetWordBreakProperty(FX_WCHAR wcCodePoint) { | 10 FX_WordBreakProp FX_GetWordBreakProperty(FX_WCHAR wcCodePoint) { |
| 11 FX_DWORD dwProperty = | 11 FX_DWORD dwProperty = |
| 12 (FX_DWORD)gs_FX_WordBreak_CodePointProperties[wcCodePoint >> 1]; | 12 (FX_DWORD)gs_FX_WordBreak_CodePointProperties[wcCodePoint >> 1]; |
| 13 return (FX_WordBreakProp)(FX_IsOdd(wcCodePoint) ? (dwProperty & 0x0F) | 13 return (FX_WordBreakProp)(FX_IsOdd(wcCodePoint) ? (dwProperty & 0x0F) |
| 14 : (dwProperty >> 4)); | 14 : (dwProperty >> 4)); |
| 15 } | 15 } |
| 16 CFX_CharIter::CFX_CharIter(const CFX_WideString& wsText) | 16 CFX_CharIter::CFX_CharIter(const CFX_WideString& wsText) |
| 17 : m_wsText(wsText), m_nIndex(0) { | 17 : m_wsText(wsText), m_nIndex(0) { |
| (...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 230 } | 230 } |
| 231 ePreType = eCurType; | 231 ePreType = eCurType; |
| 232 eCurType = eNextType; | 232 eCurType = eNextType; |
| 233 bFirst = FALSE; | 233 bFirst = FALSE; |
| 234 } while (!pIter->IsEOF(!bPrev)); | 234 } while (!pIter->IsEOF(!bPrev)); |
| 235 return TRUE; | 235 return TRUE; |
| 236 } | 236 } |
| 237 IFX_WordBreak* FX_WordBreak_Create() { | 237 IFX_WordBreak* FX_WordBreak_Create() { |
| 238 return new CFX_WordBreak; | 238 return new CFX_WordBreak; |
| 239 } | 239 } |
| OLD | NEW |