• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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_TEXTPARSECONTEXT_H_
8 #define XFA_FXFA_APP_CXFA_TEXTPARSECONTEXT_H_
9 
10 #include <utility>
11 #include <vector>
12 
13 #include "third_party/base/stl_util.h"
14 #include "xfa/fde/css/cfde_cssdeclaration.h"
15 #include "xfa/fde/css/fde_css.h"
16 
17 class CFDE_CSSComputedStyle;
18 
19 class CXFA_TextParseContext {
20  public:
21   CXFA_TextParseContext();
22   ~CXFA_TextParseContext();
23 
SetDisplay(FDE_CSSDisplay eDisplay)24   void SetDisplay(FDE_CSSDisplay eDisplay) { m_eDisplay = eDisplay; }
GetDisplay()25   FDE_CSSDisplay GetDisplay() const { return m_eDisplay; }
26 
SetDecls(std::vector<const CFDE_CSSDeclaration * > && decl)27   void SetDecls(std::vector<const CFDE_CSSDeclaration*>&& decl) {
28     decls_ = std::move(decl);
29   }
GetDecls()30   const std::vector<const CFDE_CSSDeclaration*>& GetDecls() { return decls_; }
31 
32   CFX_RetainPtr<CFDE_CSSComputedStyle> m_pParentStyle;
33 
34  protected:
35   std::vector<const CFDE_CSSDeclaration*> decls_;
36   FDE_CSSDisplay m_eDisplay;
37 };
38 
39 #endif  // XFA_FXFA_APP_CXFA_TEXTPARSECONTEXT_H_
40