summaryrefslogtreecommitdiff
path: root/core/fpdfapi
diff options
context:
space:
mode:
authorLei Zhang <thestig@chromium.org>2018-08-10 22:16:35 +0000
committerChromium commit bot <commit-bot@chromium.org>2018-08-10 22:16:35 +0000
commitc51e0a0f9b2fbaa9f2eb911ab71f0d76d0215a94 (patch)
tree8baf141b9a967bc0352b32c9c84277b493197138 /core/fpdfapi
parent6ce3b34281786c2332fa6de81fe67f7f4b883602 (diff)
downloadpdfium-c51e0a0f9b2fbaa9f2eb911ab71f0d76d0215a94.tar.xz
Make the 4th parameter in CPDF_Form non-optional.
Instead, add a 3-parameter constructor that delegates to the 4-parameter constructor. Change-Id: Ied6c55360084ea26b07dbaa449bf155b5db182f0 Reviewed-on: https://pdfium-review.googlesource.com/39872 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org>
Diffstat (limited to 'core/fpdfapi')
-rw-r--r--core/fpdfapi/page/cpdf_form.cpp5
-rw-r--r--core/fpdfapi/page/cpdf_form.h5
2 files changed, 9 insertions, 1 deletions
diff --git a/core/fpdfapi/page/cpdf_form.cpp b/core/fpdfapi/page/cpdf_form.cpp
index ca24f85b11..8db0dfff7f 100644
--- a/core/fpdfapi/page/cpdf_form.cpp
+++ b/core/fpdfapi/page/cpdf_form.cpp
@@ -15,6 +15,11 @@
CPDF_Form::CPDF_Form(CPDF_Document* pDoc,
CPDF_Dictionary* pPageResources,
+ CPDF_Stream* pFormStream)
+ : CPDF_Form(pDoc, pPageResources, pFormStream, nullptr) {}
+
+CPDF_Form::CPDF_Form(CPDF_Document* pDoc,
+ CPDF_Dictionary* pPageResources,
CPDF_Stream* pFormStream,
CPDF_Dictionary* pParentResources)
: CPDF_PageObjectHolder(pDoc, pFormStream->GetDict()) {
diff --git a/core/fpdfapi/page/cpdf_form.h b/core/fpdfapi/page/cpdf_form.h
index 155a6ae50f..63cc4a96c1 100644
--- a/core/fpdfapi/page/cpdf_form.h
+++ b/core/fpdfapi/page/cpdf_form.h
@@ -23,8 +23,11 @@ class CPDF_Form : public CPDF_PageObjectHolder {
public:
CPDF_Form(CPDF_Document* pDocument,
CPDF_Dictionary* pPageResources,
+ CPDF_Stream* pFormStream);
+ CPDF_Form(CPDF_Document* pDocument,
+ CPDF_Dictionary* pPageResources,
CPDF_Stream* pFormStream,
- CPDF_Dictionary* pParentResources = nullptr);
+ CPDF_Dictionary* pParentResources);
~CPDF_Form() override;
void ParseContent(CPDF_AllStates* pGraphicStates,