From 7c47e1d3172ce6f625b93be50aac2ebf86a45d0c Mon Sep 17 00:00:00 2001 From: dsinclair Date: Wed, 23 Nov 2016 10:49:33 -0800 Subject: Remove DataProvider from CFWL_WidgetProperties This CL removes the generic DataProvider code from CFWL_WidgetProperties and adds the specific providers to the two classes that require them. Review-Url: https://codereview.chromium.org/2527683002 --- xfa/fwl/core/ifwl_combobox.cpp | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'xfa/fwl/core/ifwl_combobox.cpp') diff --git a/xfa/fwl/core/ifwl_combobox.cpp b/xfa/fwl/core/ifwl_combobox.cpp index 19d1c3f87f..7917b4eabf 100644 --- a/xfa/fwl/core/ifwl_combobox.cpp +++ b/xfa/fwl/core/ifwl_combobox.cpp @@ -50,14 +50,14 @@ IFWL_ComboBox::IFWL_ComboBox(const CFWL_App* app, return; } - auto prop = - pdfium::MakeUnique(m_pProperties->m_pDataProvider); + auto prop = pdfium::MakeUnique(); prop->m_pThemeProvider = m_pProperties->m_pThemeProvider; prop->m_dwStyles |= FWL_WGTSTYLE_Border | FWL_WGTSTYLE_VScroll; if (m_pProperties->m_dwStyleExes & FWL_STYLEEXT_CMB_ListItemIconText) prop->m_dwStyleExes |= FWL_STYLEEXT_LTB_Icon; + m_pListBox = + pdfium::MakeUnique(m_pOwnerApp, std::move(prop), this); - m_pListBox.reset(new IFWL_ComboList(m_pOwnerApp, std::move(prop), this)); if ((m_pProperties->m_dwStyleExes & FWL_STYLEEXT_CMB_DropDown) && !m_pEdit) { m_pEdit.reset(new IFWL_ComboEdit( m_pOwnerApp, pdfium::MakeUnique(), this)); @@ -590,13 +590,11 @@ void IFWL_ComboBox::DisForm_InitComboList() { if (m_pListBox) return; - auto prop = - pdfium::MakeUnique(m_pProperties->m_pDataProvider); + auto prop = pdfium::MakeUnique(); prop->m_pParent = this; prop->m_dwStyles = FWL_WGTSTYLE_Border | FWL_WGTSTYLE_VScroll; prop->m_dwStates = FWL_WGTSTATE_Invisible; prop->m_pThemeProvider = m_pProperties->m_pThemeProvider; - m_pListBox = pdfium::MakeUnique(m_pOwnerApp, std::move(prop), this); } -- cgit v1.2.3