From eea31b75a11215aa72a9845d47c38d2ce1edd4f7 Mon Sep 17 00:00:00 2001 From: dsinclair Date: Tue, 19 Jul 2016 10:27:12 -0700 Subject: Cleanup CXFA_Document Removing unused XFA_LAYOUTRESULT, cleanup unused parameters, convert XFA_DocFlag to an enum from defines and make the constructor explicit. Review-Url: https://codereview.chromium.org/2166433002 --- xfa/fxfa/app/xfa_ffnotify.cpp | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'xfa/fxfa/app/xfa_ffnotify.cpp') diff --git a/xfa/fxfa/app/xfa_ffnotify.cpp b/xfa/fxfa/app/xfa_ffnotify.cpp index be8268a9d4..09003f023c 100644 --- a/xfa/fxfa/app/xfa_ffnotify.cpp +++ b/xfa/fxfa/app/xfa_ffnotify.cpp @@ -174,20 +174,19 @@ void CXFA_FFNotify::StartFieldDrawLayout(CXFA_Node* pItem, FX_FLOAT& fCalcWidth, FX_FLOAT& fCalcHeight) { CXFA_WidgetAcc* pAcc = static_cast(pItem->GetWidgetData()); - if (!pAcc) { + if (!pAcc) return; - } + pAcc->StartWidgetLayout(fCalcWidth, fCalcHeight); } + FX_BOOL CXFA_FFNotify::FindSplitPos(CXFA_Node* pItem, int32_t iBlockIndex, FX_FLOAT& fCalcHeightPos) { CXFA_WidgetAcc* pAcc = static_cast(pItem->GetWidgetData()); - if (!pAcc) { - return FALSE; - } - return (XFA_LAYOUTRESULT)pAcc->FindSplitPos(iBlockIndex, fCalcHeightPos); + return pAcc && pAcc->FindSplitPos(iBlockIndex, fCalcHeightPos); } + FX_BOOL CXFA_FFNotify::RunScript(CXFA_Node* pScript, CXFA_Node* pFormItem) { FX_BOOL bRet = FALSE; CXFA_FFDocView* pDocView = m_pDoc->GetDocView(); -- cgit v1.2.3