summaryrefslogtreecommitdiff
path: root/fpdfsdk/formfiller
diff options
context:
space:
mode:
Diffstat (limited to 'fpdfsdk/formfiller')
-rw-r--r--fpdfsdk/formfiller/cffl_formfiller.h3
-rw-r--r--fpdfsdk/formfiller/cffl_interactiveformfiller.cpp12
-rw-r--r--fpdfsdk/formfiller/cffl_interactiveformfiller.h3
3 files changed, 10 insertions, 8 deletions
diff --git a/fpdfsdk/formfiller/cffl_formfiller.h b/fpdfsdk/formfiller/cffl_formfiller.h
index c6b1e59786..f9a155be86 100644
--- a/fpdfsdk/formfiller/cffl_formfiller.h
+++ b/fpdfsdk/formfiller/cffl_formfiller.h
@@ -9,6 +9,7 @@
#include <map>
+#include "core/fxcrt/cfx_unowned_ptr.h"
#include "fpdfsdk/formfiller/cba_fontmap.h"
#include "fpdfsdk/formfiller/cffl_interactiveformfiller.h"
#include "fpdfsdk/pdfsdk_fieldaction.h"
@@ -152,7 +153,7 @@ class CFFL_FormFiller : public IPWL_Provider, public CPWL_TimerHandler {
// until the PWL_Edit is done with it. pdfium:566
void DestroyWindows();
- CPDFSDK_FormFillEnvironment* m_pFormFillEnv;
+ CFX_UnownedPtr<CPDFSDK_FormFillEnvironment> const m_pFormFillEnv;
CPDFSDK_Widget* m_pWidget;
CPDFSDK_Annot* m_pAnnot;
bool m_bValid;
diff --git a/fpdfsdk/formfiller/cffl_interactiveformfiller.cpp b/fpdfsdk/formfiller/cffl_interactiveformfiller.cpp
index 8a9bd35781..bd08c67b2c 100644
--- a/fpdfsdk/formfiller/cffl_interactiveformfiller.cpp
+++ b/fpdfsdk/formfiller/cffl_interactiveformfiller.cpp
@@ -483,22 +483,22 @@ CFFL_FormFiller* CFFL_InteractiveFormFiller::GetFormFiller(
CFFL_FormFiller* pFormFiller;
switch (nFieldType) {
case FIELDTYPE_PUSHBUTTON:
- pFormFiller = new CFFL_PushButton(m_pFormFillEnv, pWidget);
+ pFormFiller = new CFFL_PushButton(m_pFormFillEnv.Get(), pWidget);
break;
case FIELDTYPE_CHECKBOX:
- pFormFiller = new CFFL_CheckBox(m_pFormFillEnv, pWidget);
+ pFormFiller = new CFFL_CheckBox(m_pFormFillEnv.Get(), pWidget);
break;
case FIELDTYPE_RADIOBUTTON:
- pFormFiller = new CFFL_RadioButton(m_pFormFillEnv, pWidget);
+ pFormFiller = new CFFL_RadioButton(m_pFormFillEnv.Get(), pWidget);
break;
case FIELDTYPE_TEXTFIELD:
- pFormFiller = new CFFL_TextField(m_pFormFillEnv, pWidget);
+ pFormFiller = new CFFL_TextField(m_pFormFillEnv.Get(), pWidget);
break;
case FIELDTYPE_LISTBOX:
- pFormFiller = new CFFL_ListBox(m_pFormFillEnv, pWidget);
+ pFormFiller = new CFFL_ListBox(m_pFormFillEnv.Get(), pWidget);
break;
case FIELDTYPE_COMBOBOX:
- pFormFiller = new CFFL_ComboBox(m_pFormFillEnv, pWidget);
+ pFormFiller = new CFFL_ComboBox(m_pFormFillEnv.Get(), pWidget);
break;
case FIELDTYPE_UNKNOWN:
default:
diff --git a/fpdfsdk/formfiller/cffl_interactiveformfiller.h b/fpdfsdk/formfiller/cffl_interactiveformfiller.h
index 3c23a6e2f8..751abf6e79 100644
--- a/fpdfsdk/formfiller/cffl_interactiveformfiller.h
+++ b/fpdfsdk/formfiller/cffl_interactiveformfiller.h
@@ -10,6 +10,7 @@
#include <map>
#include <memory>
+#include "core/fxcrt/cfx_unowned_ptr.h"
#include "fpdfsdk/cpdfsdk_annot.h"
#include "fpdfsdk/fsdk_define.h"
#include "fpdfsdk/pdfwindow/PWL_Edit.h"
@@ -161,7 +162,7 @@ class CFFL_InteractiveFormFiller : public IPWL_Filler_Notify {
#endif // PDF_ENABLE_XFA
void UnRegisterFormFiller(CPDFSDK_Annot* pAnnot);
- CPDFSDK_FormFillEnvironment* const m_pFormFillEnv;
+ CFX_UnownedPtr<CPDFSDK_FormFillEnvironment> const m_pFormFillEnv;
CFFL_Widget2Filler m_Maps;
bool m_bNotifying;
};