summaryrefslogtreecommitdiff
path: root/xfa/fxfa/app/xfa_textlayout.h
diff options
context:
space:
mode:
authordsinclair <dsinclair@chromium.org>2016-05-19 14:12:30 -0700
committerCommit bot <commit-bot@chromium.org>2016-05-19 14:12:30 -0700
commitc7600f99490f83e544e37feb77d3b9e8428b0f68 (patch)
treef6686e79a31ddc575ecc3ccd3475122670ff0ca4 /xfa/fxfa/app/xfa_textlayout.h
parentf8d8ac4fca2774550f3fbd3a21bbc1e326028c18 (diff)
downloadpdfium-c7600f99490f83e544e37feb77d3b9e8428b0f68.tar.xz
Remove CFX_DSPATemplate usage in CXFA_TextParser
This CL changes the check to use std::binary_search instead of the custom lookup method. The tag validation has been split out to a separate method with unit tests added. Review-Url: https://codereview.chromium.org/1996623002
Diffstat (limited to 'xfa/fxfa/app/xfa_textlayout.h')
-rw-r--r--xfa/fxfa/app/xfa_textlayout.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/xfa/fxfa/app/xfa_textlayout.h b/xfa/fxfa/app/xfa_textlayout.h
index 4d03aee302..c34f181746 100644
--- a/xfa/fxfa/app/xfa_textlayout.h
+++ b/xfa/fxfa/app/xfa_textlayout.h
@@ -26,7 +26,7 @@ class CXFA_TextTabstopsContext;
class CXFA_CSSTagProvider {
public:
- CXFA_CSSTagProvider() : m_bTagAviliable(FALSE), m_bContent(FALSE) {}
+ CXFA_CSSTagProvider() : m_bTagAvailable(FALSE), m_bContent(FALSE) {}
~CXFA_CSSTagProvider() {}
CFX_WideString GetTagName() { return m_wsTagName; }
@@ -43,7 +43,7 @@ class CXFA_CSSTagProvider {
m_Attributes.insert({wsAttr, wsValue});
}
- FX_BOOL m_bTagAviliable;
+ FX_BOOL m_bTagAvailable;
FX_BOOL m_bContent;
protected:
@@ -124,6 +124,9 @@ class CXFA_TextParser {
CFX_WideString& wsValue);
CXFA_TextParseContext* GetParseContextFromMap(CFDE_XMLNode* pXMLNode);
+ protected:
+ bool TagValidate(const CFX_WideString& str) const;
+
private:
void InitCSSData(CXFA_TextProvider* pTextProvider);
void ParseRichText(CFDE_XMLNode* pXMLNode,