From a1d344230925e94bbf43a62ddc814321056c68d5 Mon Sep 17 00:00:00 2001 From: Tom Sepez Date: Tue, 24 Apr 2018 20:54:41 +0000 Subject: Fix include order for cpdfxfa_context.h It should include cpdfsdk_helpers, not the other way around. Change-Id: Id2cc3018e8c38f82ce8a35b03bb90e936aa1d446 Reviewed-on: https://pdfium-review.googlesource.com/31294 Reviewed-by: dsinclair Commit-Queue: Tom Sepez --- fpdfsdk/cpdfsdk_formfillenvironment.cpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'fpdfsdk/cpdfsdk_formfillenvironment.cpp') diff --git a/fpdfsdk/cpdfsdk_formfillenvironment.cpp b/fpdfsdk/cpdfsdk_formfillenvironment.cpp index 272e27032b..a115355d9c 100644 --- a/fpdfsdk/cpdfsdk_formfillenvironment.cpp +++ b/fpdfsdk/cpdfsdk_formfillenvironment.cpp @@ -20,6 +20,10 @@ #include "fxjs/ijs_runtime.h" #include "third_party/base/ptr_util.h" +#ifdef PDF_ENABLE_XFA +#include "fpdfsdk/fpdfxfa/cpdfxfa_context.h" +#endif + FPDF_WIDESTRING AsFPDFWideString(ByteString* bsUTF16LE) { // Force a private version of the string, since we're about to hand it off // to the embedder. Should the embedder modify it by accident, it won't @@ -704,6 +708,16 @@ bool CPDFSDK_FormFillEnvironment::KillFocusAnnot(uint32_t nFlag) { return !m_pFocusAnnot; } +#ifdef PDF_ENABLE_XFA +CPDF_Document* CPDFSDK_FormFillEnvironment::GetPDFDocument() const { + return m_pUnderlyingDoc ? m_pUnderlyingDoc->GetPDFDoc() : nullptr; +} +#endif // PDF_ENABLE_XFA + +int CPDFSDK_FormFillEnvironment::GetPageCount() const { + return m_pUnderlyingDoc->GetPageCount(); +} + bool CPDFSDK_FormFillEnvironment::GetPermissions(int nFlag) const { return !!(GetPDFDocument()->GetUserPermissions() & nFlag); } -- cgit v1.2.3