summaryrefslogtreecommitdiff
path: root/xfa/fwl/lightwidget
diff options
context:
space:
mode:
authordsinclair <dsinclair@chromium.org>2016-10-20 07:07:48 -0700
committerCommit bot <commit-bot@chromium.org>2016-10-20 07:07:48 -0700
commit2a38a02b0492de0576c2e5b5e7d550f969367f9d (patch)
treecc056c8a004d14323d5438477d1fa8cfe0e2fcc5 /xfa/fwl/lightwidget
parentfb5055947efd78e0e7f8a2bfd5b754c63dbb6076 (diff)
downloadpdfium-2a38a02b0492de0576c2e5b5e7d550f969367f9d.tar.xz
Remove IFWL_*::Create methods, use new
The create methods just proxied to the constructor. Remove Creates and call new directly where needed. Review-Url: https://chromiumcodereview.appspot.com/2433133002
Diffstat (limited to 'xfa/fwl/lightwidget')
-rw-r--r--xfa/fwl/lightwidget/cfwl_barcode.cpp4
-rw-r--r--xfa/fwl/lightwidget/cfwl_checkbox.cpp4
-rw-r--r--xfa/fwl/lightwidget/cfwl_combobox.cpp2
-rw-r--r--xfa/fwl/lightwidget/cfwl_datetimepicker.cpp6
-rw-r--r--xfa/fwl/lightwidget/cfwl_edit.cpp4
-rw-r--r--xfa/fwl/lightwidget/cfwl_listbox.cpp2
-rw-r--r--xfa/fwl/lightwidget/cfwl_picturebox.cpp4
-rw-r--r--xfa/fwl/lightwidget/cfwl_pushbutton.cpp4
8 files changed, 14 insertions, 16 deletions
diff --git a/xfa/fwl/lightwidget/cfwl_barcode.cpp b/xfa/fwl/lightwidget/cfwl_barcode.cpp
index dd8d9f073a..c26d719b3f 100644
--- a/xfa/fwl/lightwidget/cfwl_barcode.cpp
+++ b/xfa/fwl/lightwidget/cfwl_barcode.cpp
@@ -22,8 +22,8 @@ FWL_Error CFWL_Barcode::Initialize(const CFWL_WidgetProperties* pProperties) {
if (pProperties) {
*m_pProperties = *pProperties;
}
- std::unique_ptr<IFWL_Barcode> pBarcode(IFWL_Barcode::Create(
- m_pProperties->MakeWidgetImpProperties(&m_barcodeData)));
+ std::unique_ptr<IFWL_Barcode> pBarcode(
+ new IFWL_Barcode(m_pProperties->MakeWidgetImpProperties(&m_barcodeData)));
FWL_Error ret = pBarcode->Initialize();
if (ret != FWL_Error::Succeeded) {
return ret;
diff --git a/xfa/fwl/lightwidget/cfwl_checkbox.cpp b/xfa/fwl/lightwidget/cfwl_checkbox.cpp
index d14ed51b3b..aeaf3f519f 100644
--- a/xfa/fwl/lightwidget/cfwl_checkbox.cpp
+++ b/xfa/fwl/lightwidget/cfwl_checkbox.cpp
@@ -24,8 +24,8 @@ FWL_Error CFWL_CheckBox::Initialize(const CFWL_WidgetProperties* pProperties) {
if (pProperties) {
*m_pProperties = *pProperties;
}
- std::unique_ptr<IFWL_CheckBox> pCheckBox(IFWL_CheckBox::Create(
- m_pProperties->MakeWidgetImpProperties(&m_checkboxData), nullptr));
+ std::unique_ptr<IFWL_CheckBox> pCheckBox(new IFWL_CheckBox(
+ m_pProperties->MakeWidgetImpProperties(&m_checkboxData)));
FWL_Error ret = pCheckBox->Initialize();
if (ret != FWL_Error::Succeeded) {
return ret;
diff --git a/xfa/fwl/lightwidget/cfwl_combobox.cpp b/xfa/fwl/lightwidget/cfwl_combobox.cpp
index 9c4cd05e57..a56b875907 100644
--- a/xfa/fwl/lightwidget/cfwl_combobox.cpp
+++ b/xfa/fwl/lightwidget/cfwl_combobox.cpp
@@ -25,7 +25,7 @@ FWL_Error CFWL_ComboBox::Initialize(const CFWL_WidgetProperties* pProperties) {
if (pProperties) {
*m_pProperties = *pProperties;
}
- std::unique_ptr<IFWL_ComboBox> pComboBox(IFWL_ComboBox::Create(
+ std::unique_ptr<IFWL_ComboBox> pComboBox(new IFWL_ComboBox(
m_pProperties->MakeWidgetImpProperties(&m_comboBoxData)));
FWL_Error ret = pComboBox->Initialize();
if (ret != FWL_Error::Succeeded) {
diff --git a/xfa/fwl/lightwidget/cfwl_datetimepicker.cpp b/xfa/fwl/lightwidget/cfwl_datetimepicker.cpp
index fccf8eac63..be59564750 100644
--- a/xfa/fwl/lightwidget/cfwl_datetimepicker.cpp
+++ b/xfa/fwl/lightwidget/cfwl_datetimepicker.cpp
@@ -27,10 +27,8 @@ FWL_Error CFWL_DateTimePicker::Initialize(
if (pProperties) {
*m_pProperties = *pProperties;
}
- std::unique_ptr<IFWL_DateTimePicker> pDateTimePicker(
- IFWL_DateTimePicker::Create(
- m_pProperties->MakeWidgetImpProperties(&m_DateTimePickerDP),
- nullptr));
+ std::unique_ptr<IFWL_DateTimePicker> pDateTimePicker(new IFWL_DateTimePicker(
+ m_pProperties->MakeWidgetImpProperties(&m_DateTimePickerDP)));
FWL_Error ret = pDateTimePicker->Initialize();
if (ret != FWL_Error::Succeeded) {
return ret;
diff --git a/xfa/fwl/lightwidget/cfwl_edit.cpp b/xfa/fwl/lightwidget/cfwl_edit.cpp
index 191bbd68eb..f5f0eb9c89 100644
--- a/xfa/fwl/lightwidget/cfwl_edit.cpp
+++ b/xfa/fwl/lightwidget/cfwl_edit.cpp
@@ -23,8 +23,8 @@ FWL_Error CFWL_Edit::Initialize(const CFWL_WidgetProperties* pProperties) {
if (pProperties) {
*m_pProperties = *pProperties;
}
- std::unique_ptr<IFWL_Edit> pEdit(IFWL_Edit::Create(
- m_pProperties->MakeWidgetImpProperties(nullptr), nullptr));
+ std::unique_ptr<IFWL_Edit> pEdit(
+ new IFWL_Edit(m_pProperties->MakeWidgetImpProperties(nullptr), nullptr));
FWL_Error ret = pEdit->Initialize();
if (ret != FWL_Error::Succeeded) {
return ret;
diff --git a/xfa/fwl/lightwidget/cfwl_listbox.cpp b/xfa/fwl/lightwidget/cfwl_listbox.cpp
index a0fff486cd..f55bcc671a 100644
--- a/xfa/fwl/lightwidget/cfwl_listbox.cpp
+++ b/xfa/fwl/lightwidget/cfwl_listbox.cpp
@@ -24,7 +24,7 @@ FWL_Error CFWL_ListBox::Initialize(const CFWL_WidgetProperties* pProperties) {
if (pProperties) {
*m_pProperties = *pProperties;
}
- std::unique_ptr<IFWL_ListBox> pListBox(IFWL_ListBox::Create(
+ std::unique_ptr<IFWL_ListBox> pListBox(new IFWL_ListBox(
m_pProperties->MakeWidgetImpProperties(&m_ListBoxDP), nullptr));
FWL_Error ret = pListBox->Initialize();
if (ret != FWL_Error::Succeeded) {
diff --git a/xfa/fwl/lightwidget/cfwl_picturebox.cpp b/xfa/fwl/lightwidget/cfwl_picturebox.cpp
index e6328e72ff..d4b9f30d6e 100644
--- a/xfa/fwl/lightwidget/cfwl_picturebox.cpp
+++ b/xfa/fwl/lightwidget/cfwl_picturebox.cpp
@@ -23,8 +23,8 @@ FWL_Error CFWL_PictureBox::Initialize(
if (pProperties) {
*m_pProperties = *pProperties;
}
- std::unique_ptr<IFWL_PictureBox> pPictureBox(IFWL_PictureBox::Create(
- m_pProperties->MakeWidgetImpProperties(&m_PictureBoxDP), nullptr));
+ std::unique_ptr<IFWL_PictureBox> pPictureBox(new IFWL_PictureBox(
+ m_pProperties->MakeWidgetImpProperties(&m_PictureBoxDP)));
FWL_Error ret = pPictureBox->Initialize();
if (ret != FWL_Error::Succeeded) {
return ret;
diff --git a/xfa/fwl/lightwidget/cfwl_pushbutton.cpp b/xfa/fwl/lightwidget/cfwl_pushbutton.cpp
index 79afe805cd..d864ea9ca2 100644
--- a/xfa/fwl/lightwidget/cfwl_pushbutton.cpp
+++ b/xfa/fwl/lightwidget/cfwl_pushbutton.cpp
@@ -23,8 +23,8 @@ FWL_Error CFWL_PushButton::Initialize(
if (pProperties) {
*m_pProperties = *pProperties;
}
- std::unique_ptr<IFWL_PushButton> pPushButton(IFWL_PushButton::Create(
- m_pProperties->MakeWidgetImpProperties(&m_buttonData), nullptr));
+ std::unique_ptr<IFWL_PushButton> pPushButton(new IFWL_PushButton(
+ m_pProperties->MakeWidgetImpProperties(&m_buttonData)));
FWL_Error ret = pPushButton->Initialize();
if (ret != FWL_Error::Succeeded) {
return ret;