From 1529756d0d62638ea0fc7965416bef717ff47413 Mon Sep 17 00:00:00 2001 From: tsepez Date: Tue, 24 May 2016 09:46:02 -0700 Subject: Remove IWFL_WidgetMgr in favor of CFWL_WidgetMgr. The pure virtual class isn't buying us anything, and is costing us an otherwise unneeded vtable. Fix pre-existing presubmit warning in fwl_noteimp.cpp:88: If statement had no body and no else clause ... Remove switch on enum() and make separate GetWidget() methods. Review-Url: https://codereview.chromium.org/2004213002 --- xfa/fwl/basewidget/fwl_checkboximp.cpp | 3 +-- xfa/fwl/basewidget/fwl_editimp.cpp | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) (limited to 'xfa/fwl/basewidget') diff --git a/xfa/fwl/basewidget/fwl_checkboximp.cpp b/xfa/fwl/basewidget/fwl_checkboximp.cpp index 574da160ee..ade6ebf155 100644 --- a/xfa/fwl/basewidget/fwl_checkboximp.cpp +++ b/xfa/fwl/basewidget/fwl_checkboximp.cpp @@ -368,8 +368,7 @@ void CFWL_CheckBoxImp::NextStates() { if (m_pProperties->m_dwStyleExes & FWL_STYLEEXT_CKB_RadioButton) { if ((m_pProperties->m_dwStates & FWL_STATE_CKB_CheckMask) == FWL_STATE_CKB_Unchecked) { - CFWL_WidgetMgr* pWidgetMgr = - static_cast(FWL_GetWidgetMgr()); + CFWL_WidgetMgr* pWidgetMgr = CFWL_WidgetMgr::GetInstance(); if (!pWidgetMgr->IsFormDisabled()) { CFX_ArrayTemplate radioarr; pWidgetMgr->GetSameGroupRadioButton(m_pInterface, radioarr); diff --git a/xfa/fwl/basewidget/fwl_editimp.cpp b/xfa/fwl/basewidget/fwl_editimp.cpp index 423d0b5c28..5975062902 100644 --- a/xfa/fwl/basewidget/fwl_editimp.cpp +++ b/xfa/fwl/basewidget/fwl_editimp.cpp @@ -1013,8 +1013,7 @@ void CFWL_EditImp::DrawContent(CFX_Graphics* pGraphics, (m_pProperties->m_dwStyleExes & FWL_STYLEEXT_EDT_NoHideSel) || (m_pProperties->m_dwStates & FWL_WGTSTATE_Focused); if (bShowSel) { - IFWL_Widget* pForm = - m_pWidgetMgr->GetWidget(m_pInterface, FWL_WGTRELATION_SystemForm); + IFWL_Widget* pForm = m_pWidgetMgr->GetSystemFormWidget(m_pInterface); if (pForm) { bShowSel = (pForm->GetStates() & FWL_WGTSTATE_Deactivated) != FWL_WGTSTATE_Deactivated; -- cgit v1.2.3