summaryrefslogtreecommitdiff
path: root/fpdfsdk/fpdf_formfill.cpp
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2018-05-25 23:57:13 +0000
committerChromium commit bot <commit-bot@chromium.org>2018-05-25 23:57:13 +0000
commit45a55241d315d25067582d29fcdc1ff8b818965f (patch)
treed47f5d37ac0df6ee7c7671bc5f8e2fa1cd03dc53 /fpdfsdk/fpdf_formfill.cpp
parentca02733961f84abd562d59e4b6a83018ef41b143 (diff)
downloadpdfium-45a55241d315d25067582d29fcdc1ff8b818965f.tar.xz
Replace some ifdef PDF_ENABLE_XFA, part 3.chromium/3443chromium/3442
Always include a rect parameter. It is unused in the non-XFA case, but there is no need for ifdefs. Change-Id: If6229461d6b20ee8ea557a012f2dbf8ef9f6287e Reviewed-on: https://pdfium-review.googlesource.com/32835 Commit-Queue: Tom Sepez <tsepez@chromium.org> Reviewed-by: Lei Zhang <thestig@chromium.org>
Diffstat (limited to 'fpdfsdk/fpdf_formfill.cpp')
-rw-r--r--fpdfsdk/fpdf_formfill.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/fpdfsdk/fpdf_formfill.cpp b/fpdfsdk/fpdf_formfill.cpp
index 0124124ff6..62d2c00d55 100644
--- a/fpdfsdk/fpdf_formfill.cpp
+++ b/fpdfsdk/fpdf_formfill.cpp
@@ -182,13 +182,14 @@ void FFLCommon(FPDF_FORMHANDLE hHandle,
pdfium::MakeRetain<CPDF_OCContext>(pPDFDoc, CPDF_OCContext::View));
#ifdef PDF_ENABLE_XFA
- if (CPDFSDK_PageView* pPageView = pFormFillEnv->GetPageView(pPage, true))
- pPageView->PageView_OnDraw(pDevice.get(), &matrix, &options, rect);
+ CPDFSDK_PageView* pPageView = pFormFillEnv->GetPageView(pPage, true);
#else // PDF_ENABLE_XFA
- if (CPDFSDK_PageView* pPageView =
- FormHandleToPageView(hHandle, FPDFPageFromUnderlying(pPage)))
- pPageView->PageView_OnDraw(pDevice.get(), &matrix, &options);
+ CPDFSDK_PageView* pPageView =
+ FormHandleToPageView(hHandle, FPDFPageFromUnderlying(pPage));
#endif // PDF_ENABLE_XFA
+
+ if (pPageView)
+ pPageView->PageView_OnDraw(pDevice.get(), &matrix, &options, rect);
}
#ifdef _SKIA_SUPPORT_PATHS_
pDevice->Flush(true);