From 4ef943b992782d930a7550b98e3d0389886a0ba3 Mon Sep 17 00:00:00 2001 From: Tom Sepez Date: Thu, 26 Jul 2018 19:06:06 +0000 Subject: Be more careful casting to widget subclasses. Part of the effort to reduce unchecked static casts. Change-Id: I1bff1c53aa7c5804660de4b65cf01523d70fcbb7 Reviewed-on: https://pdfium-review.googlesource.com/38896 Commit-Queue: Tom Sepez Reviewed-by: Lei Zhang --- fpdfsdk/formfiller/cffl_interactiveformfiller.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'fpdfsdk/formfiller/cffl_interactiveformfiller.cpp') diff --git a/fpdfsdk/formfiller/cffl_interactiveformfiller.cpp b/fpdfsdk/formfiller/cffl_interactiveformfiller.cpp index d73aaf93b3..c1cc355156 100644 --- a/fpdfsdk/formfiller/cffl_interactiveformfiller.cpp +++ b/fpdfsdk/formfiller/cffl_interactiveformfiller.cpp @@ -58,7 +58,7 @@ void CFFL_InteractiveFormFiller::OnDraw(CPDFSDK_PageView* pPageView, CFX_RenderDevice* pDevice, CFX_Matrix* pUser2Device) { ASSERT(pPageView); - CPDFSDK_Widget* pWidget = static_cast(pAnnot); + CPDFSDK_Widget* pWidget = ToCPDFSDKWidget(pAnnot); if (!IsVisible(pWidget)) return; @@ -66,7 +66,6 @@ void CFFL_InteractiveFormFiller::OnDraw(CPDFSDK_PageView* pPageView, if (pFormFiller && pFormFiller->IsValid()) { pFormFiller->OnDraw(pPageView, pAnnot, pDevice, *pUser2Device); pAnnot->GetPDFPage(); - if (m_pFormFillEnv->GetFocusAnnot() != pAnnot) return; -- cgit v1.2.3