summaryrefslogtreecommitdiff
path: root/xfa/fxfa/app/xfa_fwladapter.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'xfa/fxfa/app/xfa_fwladapter.cpp')
-rw-r--r--xfa/fxfa/app/xfa_fwladapter.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/xfa/fxfa/app/xfa_fwladapter.cpp b/xfa/fxfa/app/xfa_fwladapter.cpp
index 4a0828b5ef..ea63d84dfb 100644
--- a/xfa/fxfa/app/xfa_fwladapter.cpp
+++ b/xfa/fxfa/app/xfa_fwladapter.cpp
@@ -18,11 +18,12 @@ FWL_Error CXFA_FWLAdapterWidgetMgr::RepaintWidget(IFWL_Widget* pWidget,
if (!pWidget)
return FWL_Error::Indefinite;
- CXFA_FFField* pField = (CXFA_FFField*)pWidget->GetPrivateData(pWidget);
- if (!pField)
+ CXFA_FFWidget* pFFWidget =
+ static_cast<CXFA_FFWidget*>(pWidget->GetLayoutItem());
+ if (!pFFWidget)
return FWL_Error::Indefinite;
- pField->AddInvalidateRect(nullptr);
+ pFFWidget->AddInvalidateRect(nullptr);
return FWL_Error::Succeeded;
}
@@ -31,7 +32,8 @@ FX_BOOL CXFA_FWLAdapterWidgetMgr::GetPopupPos(IFWL_Widget* pWidget,
FX_FLOAT fMaxHeight,
const CFX_RectF& rtAnchor,
CFX_RectF& rtPopup) {
- CXFA_FFWidget* pFFWidget = (CXFA_FFWidget*)(pWidget->GetPrivateData(pWidget));
+ CXFA_FFWidget* pFFWidget =
+ static_cast<CXFA_FFWidget*>(pWidget->GetLayoutItem());
CFX_Matrix mt;
pFFWidget->GetRotateMatrix(mt);
CFX_RectF rtRotateAnchor(rtAnchor);