Index: xfa/fxfa/app/xfa_ffbarcode.cpp |
diff --git a/xfa/fxfa/app/xfa_ffbarcode.cpp b/xfa/fxfa/app/xfa_ffbarcode.cpp |
index cd172c5a4da164788c453f2932923f91c38ecc07..8c6dcbfad9514fdc1e81542bf100c650aee3b975 100644 |
--- a/xfa/fxfa/app/xfa_ffbarcode.cpp |
+++ b/xfa/fxfa/app/xfa_ffbarcode.cpp |
@@ -7,9 +7,11 @@ |
#include "xfa/fxfa/app/xfa_ffbarcode.h" |
#include "core/fxcrt/fx_ext.h" |
+#include "third_party/base/ptr_util.h" |
#include "xfa/fwl/core/cfwl_barcode.h" |
#include "xfa/fwl/core/fwl_noteimp.h" |
#include "xfa/fwl/core/ifwl_app.h" |
+#include "xfa/fxfa/app/cxfa_fffielddelegate.h" |
#include "xfa/fxfa/app/xfa_fffield.h" |
#include "xfa/fxfa/app/xfa_fftextedit.h" |
#include "xfa/fxfa/app/xfa_fwladapter.h" |
@@ -132,8 +134,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_pNormalWidget->SetDelegate(pdfium::MakeUnique<CXFA_FFFieldDelegate>( |
+ m_pNormalWidget->ReleaseDelegate(), this)); |
m_pNormalWidget->LockUpdate(); |
CFX_WideString wsText; |