| Index: xfa/fxfa/app/xfa_ffimageedit.cpp
|
| diff --git a/xfa/fxfa/app/xfa_ffimageedit.cpp b/xfa/fxfa/app/xfa_ffimageedit.cpp
|
| index 9e29119671039c419caf4ef193fc6cb46f2ad851..c174c6f673300e3396a4e72064218d67ae7a2b45 100644
|
| --- a/xfa/fxfa/app/xfa_ffimageedit.cpp
|
| +++ b/xfa/fxfa/app/xfa_ffimageedit.cpp
|
| @@ -6,10 +6,12 @@
|
|
|
| #include "xfa/fxfa/app/xfa_ffimageedit.h"
|
|
|
| +#include "third_party/base/ptr_util.h"
|
| #include "xfa/fwl/core/cfwl_message.h"
|
| #include "xfa/fwl/core/cfwl_picturebox.h"
|
| #include "xfa/fwl/core/fwl_noteimp.h"
|
| #include "xfa/fwl/core/ifwl_app.h"
|
| +#include "xfa/fxfa/app/cxfa_ffimageeditdelegate.h"
|
| #include "xfa/fxfa/app/xfa_fffield.h"
|
| #include "xfa/fxfa/xfa_ffdoc.h"
|
| #include "xfa/fxfa/xfa_ffdocview.h"
|
| @@ -18,7 +20,8 @@
|
|
|
| CXFA_FFImageEdit::CXFA_FFImageEdit(CXFA_FFPageView* pPageView,
|
| CXFA_WidgetAcc* pDataAcc)
|
| - : CXFA_FFField(pPageView, pDataAcc), m_pOldDelegate(nullptr) {}
|
| + : CXFA_FFField(pPageView, pDataAcc) {}
|
| +
|
| CXFA_FFImageEdit::~CXFA_FFImageEdit() {
|
| CXFA_FFImageEdit::UnloadWidget();
|
| }
|
| @@ -32,8 +35,8 @@ FX_BOOL CXFA_FFImageEdit::LoadWidget() {
|
| CFWL_NoteDriver* pNoteDriver = pWidget->GetOwnerApp()->GetNoteDriver();
|
| pNoteDriver->RegisterEventTarget(pWidget, pWidget);
|
|
|
| - m_pOldDelegate = pPictureBox->GetCurrentDelegate();
|
| - pPictureBox->SetCurrentDelegate(this);
|
| + pPictureBox->SetDelegate(pdfium::MakeUnique<CXFA_FFImageEditDelegate>(
|
| + pPictureBox->ReleaseDelegate(), this));
|
|
|
| CXFA_FFField::LoadWidget();
|
| if (m_pDataAcc->GetImageEditImage()) {
|
| @@ -125,16 +128,3 @@ FX_BOOL CXFA_FFImageEdit::UpdateFWLData() {
|
| return TRUE;
|
| }
|
|
|
| -void CXFA_FFImageEdit::OnProcessMessage(CFWL_Message* pMessage) {
|
| - m_pOldDelegate->OnProcessMessage(pMessage);
|
| -}
|
| -
|
| -void CXFA_FFImageEdit::OnProcessEvent(CFWL_Event* pEvent) {
|
| - CXFA_FFField::OnProcessEvent(pEvent);
|
| - m_pOldDelegate->OnProcessEvent(pEvent);
|
| -}
|
| -
|
| -void CXFA_FFImageEdit::OnDrawWidget(CFX_Graphics* pGraphics,
|
| - const CFX_Matrix* pMatrix) {
|
| - m_pOldDelegate->OnDrawWidget(pGraphics, pMatrix);
|
| -}
|
|
|