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 <dsinclair@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
diff --git a/fpdfsdk/cpdfsdk_formfillenvironment.cpp b/fpdfsdk/cpdfsdk_formfillenvironment.cpp
index 272e270..a115355 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 @@
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);
}