From 96c7b33510c5d48ef5707326de88b35dcd2e4b45 Mon Sep 17 00:00:00 2001 From: dsinclair Date: Mon, 31 Oct 2016 09:44:45 -0700 Subject: Remove unused parameter to CFWL_* Initialize methods. This parameter is always nullptr, removed. Review-Url: https://codereview.chromium.org/2463073002 --- xfa/fwl/core/cfwl_barcode.cpp | 8 ++------ xfa/fwl/core/cfwl_barcode.h | 2 +- xfa/fwl/core/cfwl_checkbox.cpp | 7 ++----- xfa/fwl/core/cfwl_checkbox.h | 2 +- xfa/fwl/core/cfwl_combobox.cpp | 7 ++----- xfa/fwl/core/cfwl_combobox.h | 2 +- xfa/fwl/core/cfwl_datetimepicker.cpp | 7 ++----- xfa/fwl/core/cfwl_datetimepicker.h | 2 +- xfa/fwl/core/cfwl_edit.cpp | 7 ++----- xfa/fwl/core/cfwl_edit.h | 2 +- xfa/fwl/core/cfwl_listbox.cpp | 7 ++----- xfa/fwl/core/cfwl_listbox.h | 2 +- xfa/fwl/core/cfwl_picturebox.cpp | 7 ++----- xfa/fwl/core/cfwl_picturebox.h | 2 +- xfa/fwl/core/cfwl_pushbutton.cpp | 7 ++----- xfa/fwl/core/cfwl_pushbutton.h | 2 +- xfa/fwl/core/cfwl_widget.cpp | 2 +- xfa/fwl/core/cfwl_widget.h | 2 +- 18 files changed, 26 insertions(+), 51 deletions(-) (limited to 'xfa/fwl') diff --git a/xfa/fwl/core/cfwl_barcode.cpp b/xfa/fwl/core/cfwl_barcode.cpp index c17185990e..996667d874 100644 --- a/xfa/fwl/core/cfwl_barcode.cpp +++ b/xfa/fwl/core/cfwl_barcode.cpp @@ -12,18 +12,14 @@ CFWL_Barcode::CFWL_Barcode(const IFWL_App* app) : CFWL_Edit(app) {} CFWL_Barcode::~CFWL_Barcode() {} -void CFWL_Barcode::Initialize(const CFWL_WidgetProperties* pProperties) { +void CFWL_Barcode::Initialize() { ASSERT(!m_pIface); - - if (pProperties) - *m_pProperties = *pProperties; - std::unique_ptr pBarcode(new IFWL_Barcode( m_pApp, m_pProperties->MakeWidgetImpProperties(&m_barcodeData))); pBarcode->Initialize(); m_pIface = std::move(pBarcode); - CFWL_Widget::Initialize(pProperties); + CFWL_Widget::Initialize(); } IFWL_Barcode* CFWL_Barcode::GetWidget() { diff --git a/xfa/fwl/core/cfwl_barcode.h b/xfa/fwl/core/cfwl_barcode.h index c2bf38ad40..b610a27f51 100644 --- a/xfa/fwl/core/cfwl_barcode.h +++ b/xfa/fwl/core/cfwl_barcode.h @@ -22,7 +22,7 @@ class CFWL_Barcode : public CFWL_Edit { IFWL_Barcode* GetWidget() override; const IFWL_Barcode* GetWidget() const override; - void Initialize(const CFWL_WidgetProperties* pProperties); + void Initialize(); void SetType(BC_TYPE type); FX_BOOL IsProtectedType(); diff --git a/xfa/fwl/core/cfwl_checkbox.cpp b/xfa/fwl/core/cfwl_checkbox.cpp index 8ae3e970e3..e1ff84f2d6 100644 --- a/xfa/fwl/core/cfwl_checkbox.cpp +++ b/xfa/fwl/core/cfwl_checkbox.cpp @@ -14,18 +14,15 @@ CFWL_CheckBox::CFWL_CheckBox(const IFWL_App* app) : CFWL_Widget(app) {} CFWL_CheckBox::~CFWL_CheckBox() {} -void CFWL_CheckBox::Initialize(const CFWL_WidgetProperties* pProperties) { +void CFWL_CheckBox::Initialize() { ASSERT(!m_pIface); - if (pProperties) - *m_pProperties = *pProperties; - std::unique_ptr pCheckBox(new IFWL_CheckBox( m_pApp, m_pProperties->MakeWidgetImpProperties(&m_checkboxData))); pCheckBox->Initialize(); m_pIface = std::move(pCheckBox); - CFWL_Widget::Initialize(pProperties); + CFWL_Widget::Initialize(); } IFWL_CheckBox* CFWL_CheckBox::GetWidget() { diff --git a/xfa/fwl/core/cfwl_checkbox.h b/xfa/fwl/core/cfwl_checkbox.h index e17e6b5ef7..058c76be04 100644 --- a/xfa/fwl/core/cfwl_checkbox.h +++ b/xfa/fwl/core/cfwl_checkbox.h @@ -18,7 +18,7 @@ class CFWL_CheckBox : public CFWL_Widget { IFWL_CheckBox* GetWidget() override; const IFWL_CheckBox* GetWidget() const override; - void Initialize(const CFWL_WidgetProperties* pProperties); + void Initialize(); FWL_Error SetCaption(const CFX_WideStringC& wsCaption); FWL_Error SetBoxSize(FX_FLOAT fHeight); diff --git a/xfa/fwl/core/cfwl_combobox.cpp b/xfa/fwl/core/cfwl_combobox.cpp index 825df9c538..d873d6b06e 100644 --- a/xfa/fwl/core/cfwl_combobox.cpp +++ b/xfa/fwl/core/cfwl_combobox.cpp @@ -15,18 +15,15 @@ CFWL_ComboBox::CFWL_ComboBox(const IFWL_App* app) : CFWL_Widget(app) {} CFWL_ComboBox::~CFWL_ComboBox() {} -void CFWL_ComboBox::Initialize(const CFWL_WidgetProperties* pProperties) { +void CFWL_ComboBox::Initialize() { ASSERT(!m_pIface); - if (pProperties) - *m_pProperties = *pProperties; - std::unique_ptr pComboBox(new IFWL_ComboBox( m_pApp, m_pProperties->MakeWidgetImpProperties(&m_comboBoxData))); pComboBox->Initialize(); m_pIface = std::move(pComboBox); - CFWL_Widget::Initialize(pProperties); + CFWL_Widget::Initialize(); } IFWL_ComboBox* CFWL_ComboBox::GetWidget() { diff --git a/xfa/fwl/core/cfwl_combobox.h b/xfa/fwl/core/cfwl_combobox.h index bb19e55653..3a4d854442 100644 --- a/xfa/fwl/core/cfwl_combobox.h +++ b/xfa/fwl/core/cfwl_combobox.h @@ -26,7 +26,7 @@ class CFWL_ComboBox : public CFWL_Widget { IFWL_ComboBox* GetWidget() override; const IFWL_ComboBox* GetWidget() const override; - void Initialize(const CFWL_WidgetProperties* pProperties); + void Initialize(); int32_t AddString(const CFX_WideStringC& wsText); int32_t AddString(const CFX_WideStringC& wsText, CFX_DIBitmap* pIcon); diff --git a/xfa/fwl/core/cfwl_datetimepicker.cpp b/xfa/fwl/core/cfwl_datetimepicker.cpp index ebfcee62ba..8a0e8eba35 100644 --- a/xfa/fwl/core/cfwl_datetimepicker.cpp +++ b/xfa/fwl/core/cfwl_datetimepicker.cpp @@ -17,18 +17,15 @@ CFWL_DateTimePicker::CFWL_DateTimePicker(const IFWL_App* app) CFWL_DateTimePicker::~CFWL_DateTimePicker() {} -void CFWL_DateTimePicker::Initialize(const CFWL_WidgetProperties* pProperties) { +void CFWL_DateTimePicker::Initialize() { ASSERT(!m_pIface); - if (pProperties) - *m_pProperties = *pProperties; - std::unique_ptr pDateTimePicker(new IFWL_DateTimePicker( m_pApp, m_pProperties->MakeWidgetImpProperties(&m_DateTimePickerDP))); pDateTimePicker->Initialize(); m_pIface = std::move(pDateTimePicker); - CFWL_Widget::Initialize(pProperties); + CFWL_Widget::Initialize(); } IFWL_DateTimePicker* CFWL_DateTimePicker::GetWidget() { diff --git a/xfa/fwl/core/cfwl_datetimepicker.h b/xfa/fwl/core/cfwl_datetimepicker.h index 2de57add80..5091713dc2 100644 --- a/xfa/fwl/core/cfwl_datetimepicker.h +++ b/xfa/fwl/core/cfwl_datetimepicker.h @@ -18,7 +18,7 @@ class CFWL_DateTimePicker : public CFWL_Widget { IFWL_DateTimePicker* GetWidget() override; const IFWL_DateTimePicker* GetWidget() const override; - void Initialize(const CFWL_WidgetProperties* pProperties); + void Initialize(); FWL_Error SetToday(int32_t iYear, int32_t iMonth, int32_t iDay); FWL_Error GetEditText(CFX_WideString& wsText); diff --git a/xfa/fwl/core/cfwl_edit.cpp b/xfa/fwl/core/cfwl_edit.cpp index d0936a65b7..50f99fe090 100644 --- a/xfa/fwl/core/cfwl_edit.cpp +++ b/xfa/fwl/core/cfwl_edit.cpp @@ -13,18 +13,15 @@ CFWL_Edit::CFWL_Edit(const IFWL_App* app) : CFWL_Widget(app) {} CFWL_Edit::~CFWL_Edit() {} -void CFWL_Edit::Initialize(const CFWL_WidgetProperties* pProperties) { +void CFWL_Edit::Initialize() { ASSERT(!m_pIface); - if (pProperties) - *m_pProperties = *pProperties; - std::unique_ptr pEdit(new IFWL_Edit( m_pApp, m_pProperties->MakeWidgetImpProperties(nullptr), nullptr)); pEdit->Initialize(); m_pIface = std::move(pEdit); - CFWL_Widget::Initialize(pProperties); + CFWL_Widget::Initialize(); } IFWL_Edit* CFWL_Edit::GetWidget() { diff --git a/xfa/fwl/core/cfwl_edit.h b/xfa/fwl/core/cfwl_edit.h index ceeb95f325..016ac8f9da 100644 --- a/xfa/fwl/core/cfwl_edit.h +++ b/xfa/fwl/core/cfwl_edit.h @@ -23,7 +23,7 @@ class CFWL_Edit : public CFWL_Widget { IFWL_Edit* GetWidget() override; const IFWL_Edit* GetWidget() const override; - void Initialize(const CFWL_WidgetProperties* pProperties); + void Initialize(); FWL_Error SetText(const CFX_WideString& wsText); int32_t GetTextLength() const; diff --git a/xfa/fwl/core/cfwl_listbox.cpp b/xfa/fwl/core/cfwl_listbox.cpp index f8a5e199c2..5820a27926 100644 --- a/xfa/fwl/core/cfwl_listbox.cpp +++ b/xfa/fwl/core/cfwl_listbox.cpp @@ -14,18 +14,15 @@ CFWL_ListBox::CFWL_ListBox(const IFWL_App* app) : CFWL_Widget(app) {} CFWL_ListBox::~CFWL_ListBox() {} -void CFWL_ListBox::Initialize(const CFWL_WidgetProperties* pProperties) { +void CFWL_ListBox::Initialize() { ASSERT(!m_pIface); - if (pProperties) - *m_pProperties = *pProperties; - std::unique_ptr pListBox(new IFWL_ListBox( m_pApp, m_pProperties->MakeWidgetImpProperties(&m_ListBoxDP), nullptr)); pListBox->Initialize(); m_pIface = std::move(pListBox); - CFWL_Widget::Initialize(pProperties); + CFWL_Widget::Initialize(); } IFWL_ListBox* CFWL_ListBox::GetWidget() { diff --git a/xfa/fwl/core/cfwl_listbox.h b/xfa/fwl/core/cfwl_listbox.h index 872ac722db..436e8372bc 100644 --- a/xfa/fwl/core/cfwl_listbox.h +++ b/xfa/fwl/core/cfwl_listbox.h @@ -25,7 +25,7 @@ class CFWL_ListBox : public CFWL_Widget { IFWL_ListBox* GetWidget() override; const IFWL_ListBox* GetWidget() const override; - void Initialize(const CFWL_WidgetProperties* pProperties); + void Initialize(); FWL_Error AddDIBitmap(CFX_DIBitmap* pDIB, IFWL_ListItem* pItem); IFWL_ListItem* AddString(const CFX_WideStringC& wsAdd, diff --git a/xfa/fwl/core/cfwl_picturebox.cpp b/xfa/fwl/core/cfwl_picturebox.cpp index 8210db2562..de6bf737b6 100644 --- a/xfa/fwl/core/cfwl_picturebox.cpp +++ b/xfa/fwl/core/cfwl_picturebox.cpp @@ -12,18 +12,15 @@ CFWL_PictureBox::CFWL_PictureBox(const IFWL_App* app) : CFWL_Widget(app) {} CFWL_PictureBox::~CFWL_PictureBox() {} -void CFWL_PictureBox::Initialize(const CFWL_WidgetProperties* pProperties) { +void CFWL_PictureBox::Initialize() { ASSERT(!m_pIface); - if (pProperties) - *m_pProperties = *pProperties; - std::unique_ptr pPictureBox(new IFWL_PictureBox( m_pApp, m_pProperties->MakeWidgetImpProperties(&m_PictureBoxDP))); pPictureBox->Initialize(); m_pIface = std::move(pPictureBox); - CFWL_Widget::Initialize(pProperties); + CFWL_Widget::Initialize(); } IFWL_PictureBox* CFWL_PictureBox::GetWidget() { diff --git a/xfa/fwl/core/cfwl_picturebox.h b/xfa/fwl/core/cfwl_picturebox.h index 2338009cc1..d64be21e06 100644 --- a/xfa/fwl/core/cfwl_picturebox.h +++ b/xfa/fwl/core/cfwl_picturebox.h @@ -19,7 +19,7 @@ class CFWL_PictureBox : public CFWL_Widget { IFWL_PictureBox* GetWidget() override; const IFWL_PictureBox* GetWidget() const override; - void Initialize(const CFWL_WidgetProperties* pProperties); + void Initialize(); CFX_DIBitmap* GetPicture(); FWL_Error SetPicture(CFX_DIBitmap* pBitmap); diff --git a/xfa/fwl/core/cfwl_pushbutton.cpp b/xfa/fwl/core/cfwl_pushbutton.cpp index 0930f93aa0..2d03e86412 100644 --- a/xfa/fwl/core/cfwl_pushbutton.cpp +++ b/xfa/fwl/core/cfwl_pushbutton.cpp @@ -12,18 +12,15 @@ CFWL_PushButton::CFWL_PushButton(const IFWL_App* app) : CFWL_Widget(app) {} CFWL_PushButton::~CFWL_PushButton() {} -void CFWL_PushButton::Initialize(const CFWL_WidgetProperties* pProperties) { +void CFWL_PushButton::Initialize() { ASSERT(!m_pIface); - if (pProperties) - *m_pProperties = *pProperties; - std::unique_ptr pPushButton(new IFWL_PushButton( m_pApp, m_pProperties->MakeWidgetImpProperties(&m_buttonData))); pPushButton->Initialize(); m_pIface = std::move(pPushButton); - CFWL_Widget::Initialize(pProperties); + CFWL_Widget::Initialize(); } IFWL_PushButton* CFWL_PushButton::GetWidget() { diff --git a/xfa/fwl/core/cfwl_pushbutton.h b/xfa/fwl/core/cfwl_pushbutton.h index 44106d3c2c..c20e5539af 100644 --- a/xfa/fwl/core/cfwl_pushbutton.h +++ b/xfa/fwl/core/cfwl_pushbutton.h @@ -18,7 +18,7 @@ class CFWL_PushButton : public CFWL_Widget { IFWL_PushButton* GetWidget() override; const IFWL_PushButton* GetWidget() const override; - void Initialize(const CFWL_WidgetProperties* pProperties); + void Initialize(); FWL_Error GetCaption(CFX_WideString& wsCaption); FWL_Error SetCaption(const CFX_WideStringC& wsCaption); diff --git a/xfa/fwl/core/cfwl_widget.cpp b/xfa/fwl/core/cfwl_widget.cpp index d7903ea8a8..9aeb127e9e 100644 --- a/xfa/fwl/core/cfwl_widget.cpp +++ b/xfa/fwl/core/cfwl_widget.cpp @@ -31,7 +31,7 @@ CFWL_Widget::~CFWL_Widget() { m_pIface->Finalize(); } -void CFWL_Widget::Initialize(const CFWL_WidgetProperties* pProperties) { +void CFWL_Widget::Initialize() { ASSERT(m_pIface); m_pIface->SetAssociateWidget(this); } diff --git a/xfa/fwl/core/cfwl_widget.h b/xfa/fwl/core/cfwl_widget.h index b96c1ffaec..bf8f98e6e7 100644 --- a/xfa/fwl/core/cfwl_widget.h +++ b/xfa/fwl/core/cfwl_widget.h @@ -54,7 +54,7 @@ class CFWL_Widget { IFWL_WidgetDelegate* SetDelegate(IFWL_WidgetDelegate* pDelegate); protected: - void Initialize(const CFWL_WidgetProperties* pProperties); + void Initialize(); const IFWL_App* m_pApp; std::unique_ptr m_pIface; -- cgit v1.2.3