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_CXFA_TEXTPARSECONTEXT_H_ 8 #define XFA_FXFA_CXFA_TEXTPARSECONTEXT_H_ 9 10 #include <utility> 11 #include <vector> 12 13 #include "core/fxcrt/css/cfx_css.h" 14 #include "core/fxcrt/css/cfx_cssdeclaration.h" 15 #include "third_party/base/stl_util.h" 16 17 class CFX_CSSComputedStyle; 18 19 class CXFA_TextParseContext { 20 public: 21 CXFA_TextParseContext(); 22 ~CXFA_TextParseContext(); 23 SetDisplay(CFX_CSSDisplay eDisplay)24 void SetDisplay(CFX_CSSDisplay eDisplay) { m_eDisplay = eDisplay; } GetDisplay()25 CFX_CSSDisplay GetDisplay() const { return m_eDisplay; } 26 SetDecls(std::vector<const CFX_CSSDeclaration * > && decl)27 void SetDecls(std::vector<const CFX_CSSDeclaration*>&& decl) { 28 decls_ = std::move(decl); 29 } GetDecls()30 const std::vector<const CFX_CSSDeclaration*>& GetDecls() { return decls_; } 31 32 RetainPtr<CFX_CSSComputedStyle> m_pParentStyle; 33 34 private: 35 std::vector<const CFX_CSSDeclaration*> decls_; 36 CFX_CSSDisplay m_eDisplay; 37 }; 38 39 #endif // XFA_FXFA_CXFA_TEXTPARSECONTEXT_H_ 40