From c7600f99490f83e544e37feb77d3b9e8428b0f68 Mon Sep 17 00:00:00 2001 From: dsinclair Date: Thu, 19 May 2016 14:12:30 -0700 Subject: 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 --- xfa/fxfa/app/xfa_textlayout.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'xfa/fxfa/app/xfa_textlayout.h') 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, -- cgit v1.2.3