| 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_TEXTBREAK_H_ | 7 #ifndef XFA_FGAS_LAYOUT_FGAS_TEXTBREAK_H_ |
| 8 #define XFA_FGAS_LAYOUT_FGAS_TEXTBREAK_H_ | 8 #define XFA_FGAS_LAYOUT_FGAS_TEXTBREAK_H_ |
| 9 | 9 |
| 10 #include "core/fxcrt/include/fx_ucd.h" | 10 #include "core/fxcrt/include/fx_ucd.h" |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 72 #define FX_TXTBREAK_MinimumTabWidth 160000 | 72 #define FX_TXTBREAK_MinimumTabWidth 160000 |
| 73 | 73 |
| 74 class IFX_TxtAccess { | 74 class IFX_TxtAccess { |
| 75 public: | 75 public: |
| 76 virtual ~IFX_TxtAccess() {} | 76 virtual ~IFX_TxtAccess() {} |
| 77 virtual FX_WCHAR GetChar(void* pIdentity, int32_t index) const = 0; | 77 virtual FX_WCHAR GetChar(void* pIdentity, int32_t index) const = 0; |
| 78 virtual int32_t GetWidth(void* pIdentity, int32_t index) const = 0; | 78 virtual int32_t GetWidth(void* pIdentity, int32_t index) const = 0; |
| 79 }; | 79 }; |
| 80 | 80 |
| 81 struct FX_TXTRUN { | 81 struct FX_TXTRUN { |
| 82 FX_TXTRUN() { | 82 FX_TXTRUN() |
| 83 pAccess = NULL; | 83 : pAccess(nullptr), |
| 84 pIdentity = NULL; | 84 pIdentity(nullptr), |
| 85 pStr = NULL; | 85 pWidths(nullptr), |
| 86 pWidths = NULL; | 86 iLength(0), |
| 87 iLength = 0; | 87 pFont(nullptr), |
| 88 pFont = NULL; | 88 fFontSize(12), |
| 89 fFontSize = 12; | 89 dwStyles(0), |
| 90 dwStyles = 0; | 90 iHorizontalScale(100), |
| 91 iHorizontalScale = 100; | 91 iVerticalScale(100), |
| 92 iVerticalScale = 100; | 92 iCharRotation(0), |
| 93 iCharRotation = 0; | 93 dwCharStyles(0), |
| 94 dwCharStyles = 0; | 94 pRect(nullptr), |
| 95 pRect = NULL; | 95 wLineBreakChar(L'\n'), |
| 96 wLineBreakChar = L'\n'; | 96 bSkipSpace(TRUE) {} |
| 97 bSkipSpace = TRUE; | |
| 98 } | |
| 99 | 97 |
| 100 IFX_TxtAccess* pAccess; | 98 IFX_TxtAccess* pAccess; |
| 101 void* pIdentity; | 99 void* pIdentity; |
| 102 const FX_WCHAR* pStr; | 100 CFX_WideString wsStr; |
| 103 int32_t* pWidths; | 101 int32_t* pWidths; |
| 104 int32_t iLength; | 102 int32_t iLength; |
| 105 IFX_Font* pFont; | 103 IFX_Font* pFont; |
| 106 FX_FLOAT fFontSize; | 104 FX_FLOAT fFontSize; |
| 107 uint32_t dwStyles; | 105 uint32_t dwStyles; |
| 108 int32_t iHorizontalScale; | 106 int32_t iHorizontalScale; |
| 109 int32_t iVerticalScale; | 107 int32_t iVerticalScale; |
| 110 int32_t iCharRotation; | 108 int32_t iCharRotation; |
| 111 uint32_t dwCharStyles; | 109 uint32_t dwCharStyles; |
| 112 const CFX_RectF* pRect; | 110 const CFX_RectF* pRect; |
| (...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 329 int32_t GetBreakPos(CFX_TxtCharArray& ca, | 327 int32_t GetBreakPos(CFX_TxtCharArray& ca, |
| 330 int32_t& iEndPos, | 328 int32_t& iEndPos, |
| 331 FX_BOOL bAllChars = FALSE, | 329 FX_BOOL bAllChars = FALSE, |
| 332 FX_BOOL bOnlyBrk = FALSE); | 330 FX_BOOL bOnlyBrk = FALSE); |
| 333 void SplitTextLine(CFX_TxtLine* pCurLine, | 331 void SplitTextLine(CFX_TxtLine* pCurLine, |
| 334 CFX_TxtLine* pNextLine, | 332 CFX_TxtLine* pNextLine, |
| 335 FX_BOOL bAllChars = FALSE); | 333 FX_BOOL bAllChars = FALSE); |
| 336 }; | 334 }; |
| 337 | 335 |
| 338 #endif // XFA_FGAS_LAYOUT_FGAS_TEXTBREAK_H_ | 336 #endif // XFA_FGAS_LAYOUT_FGAS_TEXTBREAK_H_ |
| OLD | NEW |