summaryrefslogtreecommitdiff
path: root/xfa/fxfa/cxfa_textparser.h
diff options
context:
space:
mode:
Diffstat (limited to 'xfa/fxfa/cxfa_textparser.h')
-rw-r--r--xfa/fxfa/cxfa_textparser.h18
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;
};