diff options
author | Lei Zhang <thestig@chromium.org> | 2018-01-29 19:01:26 +0000 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2018-01-29 19:01:26 +0000 |
commit | d6e92bd6e874a4709144effc79163ef3c13d4b2e (patch) | |
tree | c0d08778d3427dd1e0283166d2d87107fe8f8da4 /fpdfsdk/fpdfview.cpp | |
parent | 2f7a01849e698b3d63e79d7e8bf04a6346fa248e (diff) | |
download | pdfium-d6e92bd6e874a4709144effc79163ef3c13d4b2e.tar.xz |
Clean up FPDF_GetFormType().
- Update public API documentation.
- Fix nits in the implementation.
Change-Id: I4c7af07b0ec178a5986f45652663f48491b7d078
Reviewed-on: https://pdfium-review.googlesource.com/24330
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
Diffstat (limited to 'fpdfsdk/fpdfview.cpp')
-rw-r--r-- | fpdfsdk/fpdfview.cpp | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/fpdfsdk/fpdfview.cpp b/fpdfsdk/fpdfview.cpp index 97fc02a234..e890aa0090 100644 --- a/fpdfsdk/fpdfview.cpp +++ b/fpdfsdk/fpdfview.cpp @@ -574,9 +574,6 @@ FPDF_LoadDocument(FPDF_STRING file_path, FPDF_BYTESTRING password) { } FPDF_EXPORT int FPDF_CALLCONV FPDF_GetFormType(FPDF_DOCUMENT document) { - if (!document) - return false; - const CPDF_Document* pDoc = CPDFDocumentFromFPDFDocument(document); if (!pDoc) return FORMTYPE_NONE; @@ -593,8 +590,8 @@ FPDF_EXPORT int FPDF_CALLCONV FPDF_GetFormType(FPDF_DOCUMENT document) { if (!pXFA) return FORMTYPE_ACRO_FORM; - bool needsRendering = pRoot->GetBooleanFor("NeedsRendering", false); - return needsRendering ? FORMTYPE_XFA_FULL : FORMTYPE_XFA_FOREGROUND; + bool bNeedsRendering = pRoot->GetBooleanFor("NeedsRendering", false); + return bNeedsRendering ? FORMTYPE_XFA_FULL : FORMTYPE_XFA_FOREGROUND; } #ifdef PDF_ENABLE_XFA |