aboutsummaryrefslogtreecommitdiff
path: root/core/fpdfapi/page/cpdf_form.h
diff options
context:
space:
mode:
Diffstat (limited to 'core/fpdfapi/page/cpdf_form.h')
-rw-r--r--core/fpdfapi/page/cpdf_form.h14
1 files changed, 11 insertions, 3 deletions
diff --git a/core/fpdfapi/page/cpdf_form.h b/core/fpdfapi/page/cpdf_form.h
index 9052b9d00..ba0fbd43a 100644
--- a/core/fpdfapi/page/cpdf_form.h
+++ b/core/fpdfapi/page/cpdf_form.h
@@ -24,6 +24,14 @@ class CPDF_Type3Char;
class CPDF_Form final : public CPDF_PageObjectHolder,
public CPDF_Font::FormIface {
public:
+ struct RecursionState {
+ RecursionState();
+ ~RecursionState();
+
+ std::set<const uint8_t*> parsed_set;
+ int form_count = 0;
+ };
+
// Helper method to choose the first non-null resources dictionary.
static CPDF_Dictionary* ChooseResourcesDict(CPDF_Dictionary* pResources,
CPDF_Dictionary* pParentResources,
@@ -48,7 +56,7 @@ class CPDF_Form final : public CPDF_PageObjectHolder,
void ParseContent();
void ParseContent(const CPDF_AllStates* pGraphicStates,
const CFX_Matrix* pParentMatrix,
- std::set<const uint8_t*>* pParsedSet);
+ RecursionState* recursion_state);
RetainPtr<const CPDF_Stream> GetStream() const;
@@ -56,9 +64,9 @@ class CPDF_Form final : public CPDF_PageObjectHolder,
void ParseContentInternal(const CPDF_AllStates* pGraphicStates,
const CFX_Matrix* pParentMatrix,
CPDF_Type3Char* pType3Char,
- std::set<const uint8_t*>* pParsedSet);
+ RecursionState* recursion_state);
- std::set<const uint8_t*> m_ParsedSet;
+ RecursionState m_RecursionState;
RetainPtr<CPDF_Stream> const m_pFormStream;
};