summaryrefslogtreecommitdiff
path: root/fpdfsdk/fpdfview.cpp
diff options
context:
space:
mode:
authorRyan Harrison <rharrison@chromium.org>2017-10-16 10:57:48 -0400
committerChromium commit bot <commit-bot@chromium.org>2017-10-16 16:12:40 +0000
commita74a6277a0913a674719da3134efd877a5e8d091 (patch)
treecc002c804c2a540759fe0e549a95b211f142af61 /fpdfsdk/fpdfview.cpp
parent5d98f3044ed5fd3e41d1e764351a8829e1a47e4b (diff)
downloadpdfium-a74a6277a0913a674719da3134efd877a5e8d091.tar.xz
Move HasXFAField out from XFA feature flag
Moves the PDFium API method FPDF_HasXFAField out from behind the XFA feature flag so that XFA metrics can be generated without enabling the entire feature. Changes some of the constant names to be more accurate. BUG=pdfium:917 Change-Id: I6d8fe9fd88d392d028de2504d39d978de4a1d5b7 Reviewed-on: https://pdfium-review.googlesource.com/15990 Reviewed-by: Henrique Nakashima <hnakashima@chromium.org> Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Diffstat (limited to 'fpdfsdk/fpdfview.cpp')
-rw-r--r--fpdfsdk/fpdfview.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/fpdfsdk/fpdfview.cpp b/fpdfsdk/fpdfview.cpp
index af1d0db1af..47a92f1bca 100644
--- a/fpdfsdk/fpdfview.cpp
+++ b/fpdfsdk/fpdfview.cpp
@@ -39,6 +39,7 @@
#include "fpdfsdk/javascript/ijs_runtime.h"
#include "public/fpdf_edit.h"
#include "public/fpdf_ext.h"
+#include "public/fpdf_formfill.h"
#include "public/fpdf_progressive.h"
#include "third_party/base/allocator/partition_allocator/partition_alloc.h"
#include "third_party/base/numerics/safe_conversions_impl.h"
@@ -49,7 +50,6 @@
#include "fpdfsdk/fpdfxfa/cpdfxfa_page.h"
#include "fpdfsdk/fpdfxfa/cxfa_fwladaptertimermgr.h"
#include "fxbarcode/BC_Library.h"
-#include "public/fpdf_formfill.h"
#endif // PDF_ENABLE_XFA
#if _FX_PLATFORM_ == _FX_PLATFORM_WINDOWS_
@@ -565,14 +565,12 @@ FPDF_LoadDocument(FPDF_STRING file_path, FPDF_BYTESTRING password) {
password);
}
-#ifdef PDF_ENABLE_XFA
FPDF_EXPORT FPDF_BOOL FPDF_CALLCONV FPDF_HasXFAField(FPDF_DOCUMENT document,
int* docType) {
if (!document)
return false;
- const CPDF_Document* pDoc =
- static_cast<CPDFXFA_Context*>(document)->GetPDFDoc();
+ const CPDF_Document* pDoc = CPDFDocumentFromFPDFDocument(document);
if (!pDoc)
return false;
@@ -593,6 +591,7 @@ FPDF_EXPORT FPDF_BOOL FPDF_CALLCONV FPDF_HasXFAField(FPDF_DOCUMENT document,
return true;
}
+#ifdef PDF_ENABLE_XFA
FPDF_EXPORT FPDF_BOOL FPDF_CALLCONV FPDF_LoadXFA(FPDF_DOCUMENT document) {
return document && static_cast<CPDFXFA_Context*>(document)->LoadXFADoc();
}