diff options
author | Tom Sepez <tsepez@chromium.org> | 2018-07-03 19:12:34 +0000 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2018-07-03 19:12:34 +0000 |
commit | 95b0293a29b235c746db0f01c8462ca89d7a814e (patch) | |
tree | ed5e19f83b4e5d0e90bac2c0764175a8ed7a5b8f /xfa/fgas/layout/cfx_break.h | |
parent | d96fa3b42797332ab53c05b8e6b6357676838e55 (diff) | |
download | pdfium-95b0293a29b235c746db0f01c8462ca89d7a814e.tar.xz |
Use more UnowendPtr<> in cfgas_formatstring.h and cfx_break.h
Move initializers to .h file (proves none missing).
Change-Id: Iff8fe76e46634aa32a32ecd592476594a9d1bafa
Reviewed-on: https://pdfium-review.googlesource.com/36950
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
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: |