summaryrefslogtreecommitdiff
path: root/fpdfsdk
diff options
context:
space:
mode:
Diffstat (limited to 'fpdfsdk')
-rw-r--r--fpdfsdk/cpdfsdk_pageview.cpp4
-rw-r--r--fpdfsdk/cpdfsdk_pageview.h6
-rw-r--r--fpdfsdk/fpdf_formfill.cpp11
3 files changed, 6 insertions, 15 deletions
diff --git a/fpdfsdk/cpdfsdk_pageview.cpp b/fpdfsdk/cpdfsdk_pageview.cpp
index c86adf323d..43f8ee0214 100644
--- a/fpdfsdk/cpdfsdk_pageview.cpp
+++ b/fpdfsdk/cpdfsdk_pageview.cpp
@@ -63,12 +63,8 @@ CPDFSDK_PageView::~CPDFSDK_PageView() {
void CPDFSDK_PageView::PageView_OnDraw(CFX_RenderDevice* pDevice,
CFX_Matrix* pUser2Device,
-#ifdef PDF_ENABLE_XFA
CPDF_RenderOptions* pOptions,
const FX_RECT& pClip) {
-#else
- CPDF_RenderOptions* pOptions) {
-#endif // PDF_ENABLE_XFA
m_curMatrix = *pUser2Device;
#ifdef PDF_ENABLE_XFA
diff --git a/fpdfsdk/cpdfsdk_pageview.h b/fpdfsdk/cpdfsdk_pageview.h
index afb200e43b..bfb6450ca8 100644
--- a/fpdfsdk/cpdfsdk_pageview.h
+++ b/fpdfsdk/cpdfsdk_pageview.h
@@ -26,16 +26,10 @@ class CPDFSDK_PageView final : public CPDF_Page::View {
UnderlyingPageType* page);
~CPDFSDK_PageView();
-#ifdef PDF_ENABLE_XFA
void PageView_OnDraw(CFX_RenderDevice* pDevice,
CFX_Matrix* pUser2Device,
CPDF_RenderOptions* pOptions,
const FX_RECT& pClip);
-#else // PDF_ENABLE_XFA
- void PageView_OnDraw(CFX_RenderDevice* pDevice,
- CFX_Matrix* pUser2Device,
- CPDF_RenderOptions* pOptions);
-#endif // PDF_ENABLE_XFA
void LoadFXAnnots();
CPDFSDK_Annot* GetFocusAnnot();
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);