From ad0982add85998db0ef42a5c01ae2031ae7874d2 Mon Sep 17 00:00:00 2001 From: Lei Zhang Date: Fri, 16 Jun 2017 19:30:38 -0700 Subject: Mark more CPDFSDK_FormFillEnvironment methods as const. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: Ie7bd4ec567ce932c8010bae744ba42cf40706b79 Reviewed-on: https://pdfium-review.googlesource.com/6678 Commit-Queue: Nicolás Peña Reviewed-by: Nicolás Peña --- fpdfsdk/cpdfsdk_formfillenvironment.cpp | 2 +- fpdfsdk/cpdfsdk_formfillenvironment.h | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/fpdfsdk/cpdfsdk_formfillenvironment.cpp b/fpdfsdk/cpdfsdk_formfillenvironment.cpp index 8c5025ed88..def57d625f 100644 --- a/fpdfsdk/cpdfsdk_formfillenvironment.cpp +++ b/fpdfsdk/cpdfsdk_formfillenvironment.cpp @@ -749,6 +749,6 @@ bool CPDFSDK_FormFillEnvironment::KillFocusAnnot(uint32_t nFlag) { return false; } -bool CPDFSDK_FormFillEnvironment::GetPermissions(int nFlag) { +bool CPDFSDK_FormFillEnvironment::GetPermissions(int nFlag) const { return !!(GetPDFDocument()->GetUserPermissions() & nFlag); } diff --git a/fpdfsdk/cpdfsdk_formfillenvironment.h b/fpdfsdk/cpdfsdk_formfillenvironment.h index 91141e57c6..73e3bdddf8 100644 --- a/fpdfsdk/cpdfsdk_formfillenvironment.h +++ b/fpdfsdk/cpdfsdk_formfillenvironment.h @@ -67,8 +67,8 @@ class CPDFSDK_FormFillEnvironment const CPDF_Document* pSrcDoc, const std::vector& arrSrcPages); - int GetPageCount() { return m_pUnderlyingDoc->GetPageCount(); } - bool GetPermissions(int nFlag); + int GetPageCount() const { return m_pUnderlyingDoc->GetPageCount(); } + bool GetPermissions(int nFlag) const; bool GetChangeMark() const { return m_bChangeMask; } void SetChangeMark() { m_bChangeMask = true; } -- cgit v1.2.3