summaryrefslogtreecommitdiff
path: root/fpdfsdk/pdfwindow
diff options
context:
space:
mode:
Diffstat (limited to 'fpdfsdk/pdfwindow')
-rw-r--r--fpdfsdk/pdfwindow/PWL_ComboBox.cpp4
-rw-r--r--fpdfsdk/pdfwindow/PWL_ComboBox.h3
-rw-r--r--fpdfsdk/pdfwindow/PWL_Edit.cpp2
-rw-r--r--fpdfsdk/pdfwindow/PWL_Edit.h3
-rw-r--r--fpdfsdk/pdfwindow/PWL_ListBox.cpp6
-rw-r--r--fpdfsdk/pdfwindow/PWL_ListBox.h3
6 files changed, 12 insertions, 9 deletions
diff --git a/fpdfsdk/pdfwindow/PWL_ComboBox.cpp b/fpdfsdk/pdfwindow/PWL_ComboBox.cpp
index 9321e0f606..9f5ab97858 100644
--- a/fpdfsdk/pdfwindow/PWL_ComboBox.cpp
+++ b/fpdfsdk/pdfwindow/PWL_ComboBox.cpp
@@ -265,7 +265,7 @@ void CPWL_ComboBox::CreateEdit(const PWL_CREATEPARAM& cp) {
return;
m_pEdit = pdfium::MakeUnique<CPWL_CBEdit>();
- m_pEdit->AttachFFLData(m_pFormFiller);
+ m_pEdit->AttachFFLData(m_pFormFiller.Get());
PWL_CREATEPARAM ecp = cp;
ecp.pParentWnd = this;
@@ -306,7 +306,7 @@ void CPWL_ComboBox::CreateListBox(const PWL_CREATEPARAM& cp) {
return;
m_pList = pdfium::MakeUnique<CPWL_CBListBox>();
- m_pList->AttachFFLData(m_pFormFiller);
+ m_pList->AttachFFLData(m_pFormFiller.Get());
PWL_CREATEPARAM lcp = cp;
lcp.pParentWnd = this;
diff --git a/fpdfsdk/pdfwindow/PWL_ComboBox.h b/fpdfsdk/pdfwindow/PWL_ComboBox.h
index a687eb8e94..19d9ab2a04 100644
--- a/fpdfsdk/pdfwindow/PWL_ComboBox.h
+++ b/fpdfsdk/pdfwindow/PWL_ComboBox.h
@@ -9,6 +9,7 @@
#include <memory>
+#include "core/fxcrt/cfx_unowned_ptr.h"
#include "fpdfsdk/pdfwindow/PWL_Edit.h"
#include "fpdfsdk/pdfwindow/PWL_ListBox.h"
#include "fpdfsdk/pdfwindow/PWL_Wnd.h"
@@ -100,7 +101,7 @@ class CPWL_ComboBox : public CPWL_Wnd {
int32_t m_nPopupWhere;
int32_t m_nSelectItem;
IPWL_Filler_Notify* m_pFillerNotify;
- CFFL_FormFiller* m_pFormFiller; // Not owned.
+ CFX_UnownedPtr<CFFL_FormFiller> m_pFormFiller;
};
#endif // FPDFSDK_PDFWINDOW_PWL_COMBOBOX_H_
diff --git a/fpdfsdk/pdfwindow/PWL_Edit.cpp b/fpdfsdk/pdfwindow/PWL_Edit.cpp
index 90572746da..4e37e9bde4 100644
--- a/fpdfsdk/pdfwindow/PWL_Edit.cpp
+++ b/fpdfsdk/pdfwindow/PWL_Edit.cpp
@@ -398,7 +398,7 @@ void CPWL_Edit::DrawThisAppearance(CFX_RenderDevice* pDevice,
CFX_SystemHandler* pSysHandler = GetSystemHandler();
CFX_Edit::DrawEdit(pDevice, pUser2Device, m_pEdit.get(),
GetTextColor().ToFXColor(GetTransparency()), rcClip,
- CFX_PointF(), pRange, pSysHandler, m_pFormFiller);
+ CFX_PointF(), pRange, pSysHandler, m_pFormFiller.Get());
}
bool CPWL_Edit::OnLButtonDown(const CFX_PointF& point, uint32_t nFlag) {
diff --git a/fpdfsdk/pdfwindow/PWL_Edit.h b/fpdfsdk/pdfwindow/PWL_Edit.h
index 5e1a36610d..bd3799141a 100644
--- a/fpdfsdk/pdfwindow/PWL_Edit.h
+++ b/fpdfsdk/pdfwindow/PWL_Edit.h
@@ -9,6 +9,7 @@
#include <vector>
+#include "core/fxcrt/cfx_unowned_ptr.h"
#include "core/fxcrt/fx_basic.h"
#include "fpdfsdk/fxedit/fx_edit.h"
#include "fpdfsdk/pdfwindow/PWL_EditCtrl.h"
@@ -136,7 +137,7 @@ class CPWL_Edit : public CPWL_EditCtrl {
IPWL_Filler_Notify* m_pFillerNotify;
bool m_bFocus;
CFX_FloatRect m_rcOldWindow;
- CFFL_FormFiller* m_pFormFiller; // Not owned.
+ CFX_UnownedPtr<CFFL_FormFiller> m_pFormFiller;
};
#endif // FPDFSDK_PDFWINDOW_PWL_EDIT_H_
diff --git a/fpdfsdk/pdfwindow/PWL_ListBox.cpp b/fpdfsdk/pdfwindow/PWL_ListBox.cpp
index 8448204a74..b682959426 100644
--- a/fpdfsdk/pdfwindow/PWL_ListBox.cpp
+++ b/fpdfsdk/pdfwindow/PWL_ListBox.cpp
@@ -172,14 +172,14 @@ void CPWL_ListBox::DrawThisAppearance(CFX_RenderDevice* pDevice,
if (pSysHandler && pSysHandler->IsSelectionImplemented()) {
CFX_Edit::DrawEdit(pDevice, pUser2Device, m_pList->GetItemEdit(i),
GetTextColor().ToFXColor(255), rcList, ptOffset,
- nullptr, pSysHandler, m_pFormFiller);
- pSysHandler->OutputSelectedRect(m_pFormFiller, rcItem);
+ nullptr, pSysHandler, m_pFormFiller.Get());
+ pSysHandler->OutputSelectedRect(m_pFormFiller.Get(), rcItem);
} else {
CPWL_Utils::DrawFillRect(pDevice, pUser2Device, rcItem,
ArgbEncode(255, 0, 51, 113));
CFX_Edit::DrawEdit(pDevice, pUser2Device, m_pList->GetItemEdit(i),
ArgbEncode(255, 255, 255, 255), rcList, ptOffset,
- nullptr, pSysHandler, m_pFormFiller);
+ nullptr, pSysHandler, m_pFormFiller.Get());
}
} else {
CFX_SystemHandler* pSysHandler = GetSystemHandler();
diff --git a/fpdfsdk/pdfwindow/PWL_ListBox.h b/fpdfsdk/pdfwindow/PWL_ListBox.h
index 9f8f464efb..0de9c91195 100644
--- a/fpdfsdk/pdfwindow/PWL_ListBox.h
+++ b/fpdfsdk/pdfwindow/PWL_ListBox.h
@@ -9,6 +9,7 @@
#include <memory>
+#include "core/fxcrt/cfx_unowned_ptr.h"
#include "fpdfsdk/fxedit/fx_edit.h"
#include "fpdfsdk/pdfwindow/PWL_Wnd.h"
@@ -111,7 +112,7 @@ class CPWL_ListBox : public CPWL_Wnd {
IPWL_Filler_Notify* m_pFillerNotify;
private:
- CFFL_FormFiller* m_pFormFiller; // Not owned.
+ CFX_UnownedPtr<CFFL_FormFiller> m_pFormFiller;
};
#endif // FPDFSDK_PDFWINDOW_PWL_LISTBOX_H_