diff options
Diffstat (limited to 'xfa/fgas/layout/cfx_break.h')
-rw-r--r-- | xfa/fgas/layout/cfx_break.h | 41 |
1 files changed, 22 insertions, 19 deletions
diff --git a/xfa/fgas/layout/cfx_break.h b/xfa/fgas/layout/cfx_break.h index cc985b7c59..88cef53df1 100644 --- a/xfa/fgas/layout/cfx_break.h +++ b/xfa/fgas/layout/cfx_break.h @@ -10,6 +10,7 @@ #include <stdint.h> #include "core/fxcrt/retain_ptr.h" +#include "core/fxcrt/unowned_ptr.h" #include "xfa/fgas/layout/cfx_breakline.h" class CFGAS_GEFont; @@ -57,7 +58,9 @@ class CFX_Break { void ClearBreakPieces(); CFX_Char* GetLastChar(int32_t index, bool bOmitChar, bool bRichText) const; - const CFX_BreakLine* GetCurrentLineForTesting() const { return m_pCurLine; } + const CFX_BreakLine* GetCurrentLineForTesting() const { + return m_pCurLine.Get(); + } protected: explicit CFX_Break(uint32_t dwLayoutStyles); @@ -66,25 +69,25 @@ class CFX_Break { bool HasLine() const { return m_iReadyLineIndex >= 0; } FX_CHARTYPE GetUnifiedCharType(FX_CHARTYPE dwType) const; - FX_CHARTYPE m_eCharType; - bool m_bSingleLine; - bool m_bCombText; - uint32_t m_dwIdentity; - uint32_t m_dwLayoutStyles; - int32_t m_iLineStart; - int32_t m_iLineWidth; - wchar_t m_wParagraphBreakChar; - int32_t m_iFontSize; - int32_t m_iTabWidth; - int32_t m_iHorizontalScale; - int32_t m_iVerticalScale; - int32_t m_iTolerance; - int32_t m_iCharSpace; - int32_t m_iDefChar; - wchar_t m_wDefChar; + FX_CHARTYPE m_eCharType = FX_CHARTYPE_Unknown; + bool m_bSingleLine = false; + bool m_bCombText = false; + uint32_t m_dwIdentity = 0; + uint32_t m_dwLayoutStyles = 0; + int32_t m_iLineStart = 0; + int32_t m_iLineWidth = 2000000; + wchar_t m_wParagraphBreakChar = L'\n'; + int32_t m_iFontSize = 240; + int32_t m_iTabWidth = 720000; + int32_t m_iHorizontalScale = 100; + int32_t m_iVerticalScale = 100; + int32_t m_iTolerance = 0; + int32_t m_iCharSpace = 0; + int32_t m_iDefChar = 0; + wchar_t m_wDefChar = 0xFEFF; RetainPtr<CFGAS_GEFont> m_pFont; - CFX_BreakLine* m_pCurLine; - int8_t m_iReadyLineIndex; + UnownedPtr<CFX_BreakLine> m_pCurLine; + int8_t m_iReadyLineIndex = -1; CFX_BreakLine m_Line[2]; private: |