summaryrefslogtreecommitdiff
path: root/fpdfsdk/cpdfsdk_formfillenvironment.cpp
diff options
context:
space:
mode:
authorLei Zhang <thestig@chromium.org>2018-08-01 17:35:47 +0000
committerChromium commit bot <commit-bot@chromium.org>2018-08-01 17:35:47 +0000
commitad39141331e5d3b6471276c6219439e5c587f7c3 (patch)
treeff18746199834277e56dc4c5b7b9b1972c3ef1fb /fpdfsdk/cpdfsdk_formfillenvironment.cpp
parent56094c50c0da84258e6d4348a860e588114e590d (diff)
downloadpdfium-ad39141331e5d3b6471276c6219439e5c587f7c3.tar.xz
Fix sign mismatch in CPDFSDK_FormFillEnvironment::GetPageViewCount().
Also initialize members in the header when possible. Change-Id: I458bc433f79ac2f6c04d645f44db6f460fd0bdc1 Reviewed-on: https://pdfium-review.googlesource.com/39330 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org>
Diffstat (limited to 'fpdfsdk/cpdfsdk_formfillenvironment.cpp')
-rw-r--r--fpdfsdk/cpdfsdk_formfillenvironment.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/fpdfsdk/cpdfsdk_formfillenvironment.cpp b/fpdfsdk/cpdfsdk_formfillenvironment.cpp
index da342865cb..c5f9aeb133 100644
--- a/fpdfsdk/cpdfsdk_formfillenvironment.cpp
+++ b/fpdfsdk/cpdfsdk_formfillenvironment.cpp
@@ -19,6 +19,7 @@
#include "fpdfsdk/formfiller/cffl_interactiveformfiller.h"
#include "fxjs/ijs_runtime.h"
#include "third_party/base/ptr_util.h"
+#include "third_party/base/stl_util.h"
#ifdef PDF_ENABLE_XFA
#include "fpdfsdk/fpdfxfa/cpdfxfa_context.h"
@@ -37,10 +38,7 @@ CPDFSDK_FormFillEnvironment::CPDFSDK_FormFillEnvironment(
FPDF_FORMFILLINFO* pFFinfo)
: m_pInfo(pFFinfo),
m_pCPDFDoc(pDoc),
- m_pSysHandler(pdfium::MakeUnique<CFX_SystemHandler>(this)),
- m_bChangeMask(false),
- m_bBeingDestroyed(false),
- m_SaveCalled(nullptr) {}
+ m_pSysHandler(pdfium::MakeUnique<CFX_SystemHandler>(this)) {}
CPDFSDK_FormFillEnvironment::~CPDFSDK_FormFillEnvironment() {
m_bBeingDestroyed = true;
@@ -714,6 +712,10 @@ CPDFXFA_Context* CPDFSDK_FormFillEnvironment::GetXFAContext() const {
return nullptr;
return static_cast<CPDFXFA_Context*>(m_pCPDFDoc->GetExtension());
}
+
+int CPDFSDK_FormFillEnvironment::GetPageViewCount() const {
+ return pdfium::CollectionSize<int>(m_PageMap);
+}
#endif // PDF_ENABLE_XFA
int CPDFSDK_FormFillEnvironment::GetPageCount() const {