Index: xfa/fxfa/app/xfa_textlayout.h |
diff --git a/xfa/fxfa/app/xfa_textlayout.h b/xfa/fxfa/app/xfa_textlayout.h |
index c34f181746e59e09b55635d35d583f9bc42dc667..b69d2bc7ddb7bde0debbebd7edef215b6953ee6d 100644 |
--- a/xfa/fxfa/app/xfa_textlayout.h |
+++ b/xfa/fxfa/app/xfa_textlayout.h |
@@ -87,7 +87,7 @@ class CXFA_TextParser { |
IFDE_CSSComputedStyle* CreateRootStyle(CXFA_TextProvider* pTextProvider); |
IFDE_CSSComputedStyle* ComputeStyle(CFDE_XMLNode* pXMLNode, |
IFDE_CSSComputedStyle* pParentStyle); |
- FX_BOOL IsParsed() const { return m_pAllocator != NULL; } |
+ FX_BOOL IsParsed() const { return !!m_pAllocator; } |
int32_t GetVAlign(CXFA_TextProvider* pTextProvider) const; |
FX_FLOAT GetTabInterval(IFDE_CSSComputedStyle* pStyle) const; |
@@ -134,7 +134,7 @@ class CXFA_TextParser { |
void ParseTagInfo(CFDE_XMLNode* pXMLNode, CXFA_CSSTagProvider& tagProvider); |
IFDE_CSSStyleSheet* LoadDefaultSheetStyle(); |
IFDE_CSSComputedStyle* CreateStyle(IFDE_CSSComputedStyle* pParentStyle); |
- IFX_MemoryAllocator* m_pAllocator; |
+ std::unique_ptr<IFX_MemoryAllocator> m_pAllocator; |
std::unique_ptr<CFDE_CSSStyleSelector> m_pSelector; |
IFDE_CSSStyleSheet* m_pUASheet; |
CFX_MapPtrTemplate<CFDE_XMLNode*, CXFA_TextParseContext*> |
@@ -324,6 +324,7 @@ class CXFA_TextLayout { |
public: |
CXFA_TextLayout(CXFA_TextProvider* pTextProvider); |
Lei Zhang
2016/05/20 23:00:52
explicit
|
virtual ~CXFA_TextLayout(); |
Lei Zhang
2016/05/20 23:00:52
No need to be virtual.
Tom Sepez
2016/05/20 23:07:29
Done.
|
+ |
int32_t GetText(CFX_WideString& wsText); |
FX_FLOAT GetLayoutHeight(); |
FX_FLOAT StartLayout(FX_FLOAT fWidth = -1); |
@@ -409,14 +410,14 @@ class CXFA_TextLayout { |
CXFA_TextProvider* m_pTextProvider; |
CXFA_Node* m_pTextDataNode; |
FX_BOOL m_bRichText; |
- IFX_MemoryAllocator* m_pAllocator; |
- CFX_RTFBreak* m_pBreak; |
- CXFA_LoaderContext* m_pLoader; |
+ std::unique_ptr<IFX_MemoryAllocator> m_pAllocator; |
+ std::unique_ptr<CFX_RTFBreak> m_pBreak; |
+ std::unique_ptr<CXFA_LoaderContext> m_pLoader; |
int32_t m_iLines; |
FX_FLOAT m_fMaxWidth; |
CXFA_TextParser m_textParser; |
CXFA_PieceLineArray m_pieceLines; |
- CXFA_TextTabstopsContext* m_pTabstopContext; |
+ std::unique_ptr<CXFA_TextTabstopsContext> m_pTabstopContext; |
FX_BOOL m_bBlockContinue; |
}; |