diff options
author | Lei Zhang <thestig@chromium.org> | 2018-08-22 16:14:49 +0000 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2018-08-22 16:14:49 +0000 |
commit | 03fdf3a2b5ee0974be13a9594a897003df412306 (patch) | |
tree | 3ba4cb34ef92e4245c6e81835760a76dc34418c7 /xfa/fxfa/cxfa_textparser.h | |
parent | b9509d740966e16a94dc456c634b3f1005e8be95 (diff) | |
download | pdfium-03fdf3a2b5ee0974be13a9594a897003df412306.tar.xz |
Mark CFX_XMLNode pointers as const in various places.
Change-Id: I86c6f7526e2ef4c3e8de30ebaff223095ee70fc4
Reviewed-on: https://pdfium-review.googlesource.com/40811
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Diffstat (limited to 'xfa/fxfa/cxfa_textparser.h')
-rw-r--r-- | xfa/fxfa/cxfa_textparser.h | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/xfa/fxfa/cxfa_textparser.h b/xfa/fxfa/cxfa_textparser.h index 70c153bfab..842eba74fa 100644 --- a/xfa/fxfa/cxfa_textparser.h +++ b/xfa/fxfa/cxfa_textparser.h @@ -33,12 +33,13 @@ class CXFA_TextParser { virtual ~CXFA_TextParser(); void Reset(); - void DoParse(CFX_XMLNode* pXMLContainer, CXFA_TextProvider* pTextProvider); + void DoParse(const CFX_XMLNode* pXMLContainer, + CXFA_TextProvider* pTextProvider); RetainPtr<CFX_CSSComputedStyle> CreateRootStyle( CXFA_TextProvider* pTextProvider); RetainPtr<CFX_CSSComputedStyle> ComputeStyle( - CFX_XMLNode* pXMLNode, + const CFX_XMLNode* pXMLNode, CFX_CSSComputedStyle* pParentStyle); bool IsParsed() const { return m_bParsed; } @@ -60,7 +61,7 @@ class CXFA_TextParser { int32_t GetHorScale(CXFA_TextProvider* pTextProvider, CFX_CSSComputedStyle* pStyle, - CFX_XMLNode* pXMLNode) const; + const CFX_XMLNode* pXMLNode) const; int32_t GetVerScale(CXFA_TextProvider* pTextProvider, CFX_CSSComputedStyle* pStyle) const; @@ -82,7 +83,7 @@ class CXFA_TextParser { Optional<WideString> GetEmbeddedObj(const CXFA_TextProvider* pTextProvider, const CFX_XMLNode* pXMLNode); - CXFA_TextParseContext* GetParseContextFromMap(CFX_XMLNode* pXMLNode); + CXFA_TextParseContext* GetParseContextFromMap(const CFX_XMLNode* pXMLNode); protected: bool TagValidate(const WideString& str) const; @@ -112,9 +113,12 @@ class CXFA_TextParser { std::map<WideString, WideString> m_Attributes; }; + // static + std::unique_ptr<TagProvider> ParseTagInfo(const CFX_XMLNode* pXMLNode); + void InitCSSData(CXFA_TextProvider* pTextProvider); - void ParseRichText(CFX_XMLNode* pXMLNode, CFX_CSSComputedStyle* pParentStyle); - std::unique_ptr<TagProvider> ParseTagInfo(CFX_XMLNode* pXMLNode); + void ParseRichText(const CFX_XMLNode* pXMLNode, + CFX_CSSComputedStyle* pParentStyle); std::unique_ptr<CFX_CSSStyleSheet> LoadDefaultSheetStyle(); RetainPtr<CFX_CSSComputedStyle> CreateStyle( CFX_CSSComputedStyle* pParentStyle); @@ -122,7 +126,7 @@ class CXFA_TextParser { bool m_bParsed; bool m_cssInitialized; std::unique_ptr<CFX_CSSStyleSelector> m_pSelector; - std::map<CFX_XMLNode*, std::unique_ptr<CXFA_TextParseContext>> + std::map<const CFX_XMLNode*, std::unique_ptr<CXFA_TextParseContext>> m_mapXMLNodeToParseContext; }; |