• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // Copyright 2016 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 CORE_FPDFAPI_PAGE_CPDF_FORM_H_
8 #define CORE_FPDFAPI_PAGE_CPDF_FORM_H_
9 
10 #include <memory>
11 #include <set>
12 
13 #include "core/fpdfapi/page/cpdf_pageobjectholder.h"
14 
15 class CPDF_Document;
16 class CPDF_Dictionary;
17 class CPDF_Stream;
18 class CPDF_AllStates;
19 class CFX_Matrix;
20 class CPDF_Type3Char;
21 
22 class CPDF_Form : public CPDF_PageObjectHolder {
23  public:
24   CPDF_Form(CPDF_Document* pDocument,
25             CPDF_Dictionary* pPageResources,
26             CPDF_Stream* pFormStream,
27             CPDF_Dictionary* pParentResources = nullptr);
28   ~CPDF_Form() override;
29 
30   void ParseContent();
31   void ParseContentWithParams(CPDF_AllStates* pGraphicStates,
32                               const CFX_Matrix* pParentMatrix,
33                               CPDF_Type3Char* pType3Char,
34                               std::set<const uint8_t*>* parsedSet);
35 
36  private:
37   void StartParse(CPDF_AllStates* pGraphicStates,
38                   const CFX_Matrix* pParentMatrix,
39                   CPDF_Type3Char* pType3Char,
40                   std::set<const uint8_t*>* parsedSet);
41 
42   std::unique_ptr<std::set<const uint8_t*>> m_ParsedSet;
43 };
44 
45 #endif  // CORE_FPDFAPI_PAGE_CPDF_FORM_H_
46