1 // Copyright 2017 PDFium Authors. All rights reserved. 2 // Use of this source code is governed by a BSD-style license that can be 3 // found in the LICENSE file. 4 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com 6 7 #ifndef XFA_FXFA_APP_CXFA_CSSTAGPROVIDER_H_ 8 #define XFA_FXFA_APP_CXFA_CSSTAGPROVIDER_H_ 9 10 #include <map> 11 12 #include "core/fxcrt/fx_string.h" 13 14 class CXFA_CSSTagProvider { 15 public: 16 CXFA_CSSTagProvider(); 17 ~CXFA_CSSTagProvider(); 18 GetTagName()19 CFX_WideString GetTagName() { return m_wsTagName; } 20 SetTagName(const CFX_WideString & wsName)21 void SetTagName(const CFX_WideString& wsName) { m_wsTagName = wsName; } SetAttribute(const CFX_WideString & wsAttr,const CFX_WideString & wsValue)22 void SetAttribute(const CFX_WideString& wsAttr, 23 const CFX_WideString& wsValue) { 24 m_Attributes.insert({wsAttr, wsValue}); 25 } 26 GetAttribute(const CFX_WideString & wsAttr)27 CFX_WideString GetAttribute(const CFX_WideString& wsAttr) { 28 return m_Attributes[wsAttr]; 29 } 30 31 bool m_bTagAvailable; 32 bool m_bContent; 33 34 private: 35 CFX_WideString m_wsTagName; 36 std::map<CFX_WideString, CFX_WideString> m_Attributes; 37 }; 38 39 #endif // XFA_FXFA_APP_CXFA_CSSTAGPROVIDER_H_ 40