From 3b3ce1a242f8445848d3f23d6c35ba01d7c645f4 Mon Sep 17 00:00:00 2001 From: dsinclair Date: Wed, 2 Nov 2016 14:51:25 -0700 Subject: Merge delegates into IFWL_* classes. This Cl removes ownership of the delgates from IFWL_Widget and puts it in the hand of the creating classes. In doing so, merge the delegates back into the IFWL_* classes to simplify logic. Review-Url: https://codereview.chromium.org/2467993003 --- xfa/fxfa/app/xfa_ffbarcode.cpp | 4 ++-- xfa/fxfa/app/xfa_ffcheckbutton.cpp | 4 ++-- xfa/fxfa/app/xfa_ffchoicelist.cpp | 8 ++++---- xfa/fxfa/app/xfa_ffimageedit.cpp | 4 ++-- xfa/fxfa/app/xfa_ffpushbutton.cpp | 4 ++-- xfa/fxfa/app/xfa_fftextedit.cpp | 16 ++++++++-------- 6 files changed, 20 insertions(+), 20 deletions(-) (limited to 'xfa/fxfa') diff --git a/xfa/fxfa/app/xfa_ffbarcode.cpp b/xfa/fxfa/app/xfa_ffbarcode.cpp index cd172c5a4d..181b3be80c 100644 --- a/xfa/fxfa/app/xfa_ffbarcode.cpp +++ b/xfa/fxfa/app/xfa_ffbarcode.cpp @@ -132,8 +132,8 @@ FX_BOOL CXFA_FFBarcode::LoadWidget() { CFWL_NoteDriver* pNoteDriver = pWidget->GetOwnerApp()->GetNoteDriver(); pNoteDriver->RegisterEventTarget(pWidget, pWidget); - m_pOldDelegate = m_pNormalWidget->GetCurrentDelegate(); - m_pNormalWidget->SetCurrentDelegate(this); + m_pOldDelegate = m_pNormalWidget->GetDelegate(); + m_pNormalWidget->SetDelegate(this); m_pNormalWidget->LockUpdate(); CFX_WideString wsText; diff --git a/xfa/fxfa/app/xfa_ffcheckbutton.cpp b/xfa/fxfa/app/xfa_ffcheckbutton.cpp index 9dfb12fa78..9365ccf0a4 100644 --- a/xfa/fxfa/app/xfa_ffcheckbutton.cpp +++ b/xfa/fxfa/app/xfa_ffcheckbutton.cpp @@ -36,8 +36,8 @@ FX_BOOL CXFA_FFCheckButton::LoadWidget() { CFWL_NoteDriver* pNoteDriver = pWidget->GetOwnerApp()->GetNoteDriver(); pNoteDriver->RegisterEventTarget(pWidget, pWidget); - m_pOldDelegate = m_pNormalWidget->GetCurrentDelegate(); - m_pNormalWidget->SetCurrentDelegate(this); + m_pOldDelegate = m_pNormalWidget->GetDelegate(); + m_pNormalWidget->SetDelegate(this); if (m_pDataAcc->IsRadioButton()) pCheckBox->ModifyStylesEx(FWL_STYLEEXT_CKB_RadioButton, 0xFFFFFFFF); diff --git a/xfa/fxfa/app/xfa_ffchoicelist.cpp b/xfa/fxfa/app/xfa_ffchoicelist.cpp index 06bbc38eb9..1575889815 100644 --- a/xfa/fxfa/app/xfa_ffchoicelist.cpp +++ b/xfa/fxfa/app/xfa_ffchoicelist.cpp @@ -43,8 +43,8 @@ FX_BOOL CXFA_FFListBox::LoadWidget() { CFWL_NoteDriver* pNoteDriver = pWidget->GetOwnerApp()->GetNoteDriver(); pNoteDriver->RegisterEventTarget(pWidget, pWidget); - m_pOldDelegate = m_pNormalWidget->GetCurrentDelegate(); - m_pNormalWidget->SetCurrentDelegate(this); + m_pOldDelegate = m_pNormalWidget->GetDelegate(); + m_pNormalWidget->SetDelegate(this); m_pNormalWidget->LockUpdate(); CFX_WideStringArray wsLabelArray; @@ -242,8 +242,8 @@ FX_BOOL CXFA_FFComboBox::LoadWidget() { CFWL_NoteDriver* pNoteDriver = pWidget->GetOwnerApp()->GetNoteDriver(); pNoteDriver->RegisterEventTarget(pWidget, pWidget); - m_pOldDelegate = m_pNormalWidget->GetCurrentDelegate(); - m_pNormalWidget->SetCurrentDelegate(this); + m_pOldDelegate = m_pNormalWidget->GetDelegate(); + m_pNormalWidget->SetDelegate(this); m_pNormalWidget->LockUpdate(); CFX_WideStringArray wsLabelArray; diff --git a/xfa/fxfa/app/xfa_ffimageedit.cpp b/xfa/fxfa/app/xfa_ffimageedit.cpp index 9e29119671..4b77ccf73d 100644 --- a/xfa/fxfa/app/xfa_ffimageedit.cpp +++ b/xfa/fxfa/app/xfa_ffimageedit.cpp @@ -32,8 +32,8 @@ FX_BOOL CXFA_FFImageEdit::LoadWidget() { CFWL_NoteDriver* pNoteDriver = pWidget->GetOwnerApp()->GetNoteDriver(); pNoteDriver->RegisterEventTarget(pWidget, pWidget); - m_pOldDelegate = pPictureBox->GetCurrentDelegate(); - pPictureBox->SetCurrentDelegate(this); + m_pOldDelegate = pPictureBox->GetDelegate(); + pPictureBox->SetDelegate(this); CXFA_FFField::LoadWidget(); if (m_pDataAcc->GetImageEditImage()) { diff --git a/xfa/fxfa/app/xfa_ffpushbutton.cpp b/xfa/fxfa/app/xfa_ffpushbutton.cpp index e648581011..2439eae78f 100644 --- a/xfa/fxfa/app/xfa_ffpushbutton.cpp +++ b/xfa/fxfa/app/xfa_ffpushbutton.cpp @@ -55,8 +55,8 @@ FX_BOOL CXFA_FFPushButton::LoadWidget() { CFWL_PushButton* pPushButton = new CFWL_PushButton(GetFWLApp()); pPushButton->Initialize(); - m_pOldDelegate = pPushButton->GetCurrentDelegate(); - pPushButton->SetCurrentDelegate(this); + m_pOldDelegate = pPushButton->GetDelegate(); + pPushButton->SetDelegate(this); m_pNormalWidget = pPushButton; m_pNormalWidget->SetLayoutItem(this); diff --git a/xfa/fxfa/app/xfa_fftextedit.cpp b/xfa/fxfa/app/xfa_fftextedit.cpp index e268f1c4ec..ffbcac1e17 100644 --- a/xfa/fxfa/app/xfa_fftextedit.cpp +++ b/xfa/fxfa/app/xfa_fftextedit.cpp @@ -46,8 +46,8 @@ FX_BOOL CXFA_FFTextEdit::LoadWidget() { CFWL_NoteDriver* pNoteDriver = pWidget->GetOwnerApp()->GetNoteDriver(); pNoteDriver->RegisterEventTarget(pWidget, pWidget); - m_pOldDelegate = m_pNormalWidget->GetCurrentDelegate(); - m_pNormalWidget->SetCurrentDelegate(this); + m_pOldDelegate = m_pNormalWidget->GetDelegate(); + m_pNormalWidget->SetDelegate(this); m_pNormalWidget->LockUpdate(); UpdateWidgetProperty(); @@ -451,8 +451,8 @@ FX_BOOL CXFA_FFNumericEdit::LoadWidget() { CFWL_NoteDriver* pNoteDriver = pIWidget->GetOwnerApp()->GetNoteDriver(); pNoteDriver->RegisterEventTarget(pIWidget, pIWidget); - m_pOldDelegate = m_pNormalWidget->GetCurrentDelegate(); - m_pNormalWidget->SetCurrentDelegate(this); + m_pOldDelegate = m_pNormalWidget->GetDelegate(); + m_pNormalWidget->SetDelegate(this); m_pNormalWidget->LockUpdate(); CFX_WideString wsText; @@ -531,8 +531,8 @@ FX_BOOL CXFA_FFPasswordEdit::LoadWidget() { CFWL_NoteDriver* pNoteDriver = pIWidget->GetOwnerApp()->GetNoteDriver(); pNoteDriver->RegisterEventTarget(pIWidget, pIWidget); - m_pOldDelegate = m_pNormalWidget->GetCurrentDelegate(); - m_pNormalWidget->SetCurrentDelegate(this); + m_pOldDelegate = m_pNormalWidget->GetDelegate(); + m_pNormalWidget->SetDelegate(this); m_pNormalWidget->LockUpdate(); CFX_WideString wsText; @@ -600,8 +600,8 @@ FX_BOOL CXFA_FFDateTimeEdit::LoadWidget() { CFWL_NoteDriver* pNoteDriver = pIWidget->GetOwnerApp()->GetNoteDriver(); pNoteDriver->RegisterEventTarget(pIWidget, pIWidget); - m_pOldDelegate = m_pNormalWidget->GetCurrentDelegate(); - m_pNormalWidget->SetCurrentDelegate(this); + m_pOldDelegate = m_pNormalWidget->GetDelegate(); + m_pNormalWidget->SetDelegate(this); m_pNormalWidget->LockUpdate(); CFX_WideString wsText; -- cgit v1.2.3