summaryrefslogtreecommitdiff
path: root/fpdfsdk/fxedit
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2017-05-25 15:53:57 -0700
committerChromium commit bot <commit-bot@chromium.org>2017-05-25 23:07:41 +0000
commitd0409afc6a994a3e24043b8a96c83c022bcaa189 (patch)
tree15fa78b8a601ec97fc8bee39f8e56590c37babe3 /fpdfsdk/fxedit
parent2eddb665763f3e089d4c210d2a011d112683f3ea (diff)
downloadpdfium-d0409afc6a994a3e24043b8a96c83c022bcaa189.tar.xz
Mass conversion of remaining class members (non-xfa)
Change-Id: I8365ba80e3395d59a3cf35dbd9d9162e86e712e3 Reviewed-on: https://pdfium-review.googlesource.com/5970 Commit-Queue: Tom Sepez <tsepez@chromium.org> Reviewed-by: Lei Zhang <thestig@chromium.org>
Diffstat (limited to 'fpdfsdk/fxedit')
-rw-r--r--fpdfsdk/fxedit/fxet_edit.cpp2
-rw-r--r--fpdfsdk/fxedit/fxet_edit.h21
-rw-r--r--fpdfsdk/fxedit/fxet_list.cpp2
-rw-r--r--fpdfsdk/fxedit/fxet_list.h5
4 files changed, 16 insertions, 14 deletions
diff --git a/fpdfsdk/fxedit/fxet_edit.cpp b/fpdfsdk/fxedit/fxet_edit.cpp
index cf4fdc3d91..0e86562044 100644
--- a/fpdfsdk/fxedit/fxet_edit.cpp
+++ b/fpdfsdk/fxedit/fxet_edit.cpp
@@ -145,7 +145,7 @@ CFX_Edit_Provider::CFX_Edit_Provider(IPVT_FontMap* pFontMap)
CFX_Edit_Provider::~CFX_Edit_Provider() {}
-IPVT_FontMap* CFX_Edit_Provider::GetFontMap() {
+IPVT_FontMap* CFX_Edit_Provider::GetFontMap() const {
return m_pFontMap;
}
diff --git a/fpdfsdk/fxedit/fxet_edit.h b/fpdfsdk/fxedit/fxet_edit.h
index ebc326f5a9..01759aaba9 100644
--- a/fpdfsdk/fxedit/fxet_edit.h
+++ b/fpdfsdk/fxedit/fxet_edit.h
@@ -13,6 +13,7 @@
#include "core/fpdfdoc/cpvt_secprops.h"
#include "core/fpdfdoc/cpvt_wordprops.h"
+#include "core/fxcrt/cfx_unowned_ptr.h"
#include "fpdfsdk/fxedit/fx_edit.h"
class CFFL_FormFiller;
@@ -158,7 +159,7 @@ class CFXEU_InsertWord : public CFX_Edit_UndoItem {
void Undo() override;
private:
- CFX_Edit* m_pEdit;
+ CFX_UnownedPtr<CFX_Edit> m_pEdit;
CPVT_WordPlace m_wpOld;
CPVT_WordPlace m_wpNew;
@@ -181,7 +182,7 @@ class CFXEU_InsertReturn : public CFX_Edit_UndoItem {
void Undo() override;
private:
- CFX_Edit* m_pEdit;
+ CFX_UnownedPtr<CFX_Edit> m_pEdit;
CPVT_WordPlace m_wpOld;
CPVT_WordPlace m_wpNew;
@@ -205,7 +206,7 @@ class CFXEU_Backspace : public CFX_Edit_UndoItem {
void Undo() override;
private:
- CFX_Edit* m_pEdit;
+ CFX_UnownedPtr<CFX_Edit> m_pEdit;
CPVT_WordPlace m_wpOld;
CPVT_WordPlace m_wpNew;
@@ -232,7 +233,7 @@ class CFXEU_Delete : public CFX_Edit_UndoItem {
void Undo() override;
private:
- CFX_Edit* m_pEdit;
+ CFX_UnownedPtr<CFX_Edit> m_pEdit;
CPVT_WordPlace m_wpOld;
CPVT_WordPlace m_wpNew;
@@ -255,7 +256,7 @@ class CFXEU_Clear : public CFX_Edit_UndoItem {
void Undo() override;
private:
- CFX_Edit* m_pEdit;
+ CFX_UnownedPtr<CFX_Edit> m_pEdit;
CPVT_WordRange m_wrSel;
CFX_WideString m_swText;
@@ -275,7 +276,7 @@ class CFXEU_InsertText : public CFX_Edit_UndoItem {
void Undo() override;
private:
- CFX_Edit* m_pEdit;
+ CFX_UnownedPtr<CFX_Edit> m_pEdit;
CPVT_WordPlace m_wpOld;
CPVT_WordPlace m_wpNew;
@@ -449,8 +450,8 @@ class CFX_Edit {
private:
std::unique_ptr<CPDF_VariableText> m_pVT;
- CPWL_EditCtrl* m_pNotify;
- CPWL_Edit* m_pOprNotify;
+ CFX_UnownedPtr<CPWL_EditCtrl> m_pNotify;
+ CFX_UnownedPtr<CPWL_Edit> m_pOprNotify;
std::unique_ptr<CFX_Edit_Provider> m_pVTProvider;
CPVT_WordPlace m_wpCaret;
CPVT_WordPlace m_wpOldCaret;
@@ -485,7 +486,7 @@ class CFX_Edit_Iterator {
const CPVT_WordPlace& GetAt() const;
private:
- CFX_Edit* m_pEdit;
+ CFX_UnownedPtr<CFX_Edit> m_pEdit;
CPDF_VariableText::Iterator* m_pVTIterator;
};
@@ -494,7 +495,7 @@ class CFX_Edit_Provider : public CPDF_VariableText::Provider {
explicit CFX_Edit_Provider(IPVT_FontMap* pFontMap);
~CFX_Edit_Provider() override;
- IPVT_FontMap* GetFontMap();
+ IPVT_FontMap* GetFontMap() const;
// CPDF_VariableText::Provider:
int32_t GetCharWidth(int32_t nFontIndex, uint16_t word) override;
diff --git a/fpdfsdk/fxedit/fxet_list.cpp b/fpdfsdk/fxedit/fxet_list.cpp
index c8fef948af..a3badf32fb 100644
--- a/fpdfsdk/fxedit/fxet_list.cpp
+++ b/fpdfsdk/fxedit/fxet_list.cpp
@@ -590,7 +590,7 @@ void CFX_ListCtrl::SetFontSize(float fFontSize) {
void CFX_ListCtrl::AddItem(const CFX_WideString& str) {
auto pListItem = pdfium::MakeUnique<CFX_ListItem>();
- pListItem->SetFontMap(m_pFontMap);
+ pListItem->SetFontMap(m_pFontMap.Get());
pListItem->SetFontSize(m_fFontSize);
pListItem->SetText(str);
m_ListItems.push_back(std::move(pListItem));
diff --git a/fpdfsdk/fxedit/fxet_list.h b/fpdfsdk/fxedit/fxet_list.h
index cd6e2ddeff..b4b0a56c1e 100644
--- a/fpdfsdk/fxedit/fxet_list.h
+++ b/fpdfsdk/fxedit/fxet_list.h
@@ -11,6 +11,7 @@
#include <memory>
#include <vector>
+#include "core/fxcrt/cfx_unowned_ptr.h"
#include "core/fxcrt/fx_coordinates.h"
#include "fpdfsdk/fxedit/fx_edit.h"
@@ -263,7 +264,7 @@ class CFX_ListCtrl : protected CFX_ListContainer {
void SetItemSelect(int32_t nItemIndex, bool bSelected);
int32_t GetLastSelected() const;
- CPWL_List_Notify* m_pNotify;
+ CFX_UnownedPtr<CPWL_List_Notify> m_pNotify;
bool m_bNotifyFlag;
CFX_PointF m_ptScrollPos;
CPLST_Select m_aSelItems; // for multiple
@@ -273,7 +274,7 @@ class CFX_ListCtrl : protected CFX_ListContainer {
int32_t m_nCaretIndex; // for multiple
std::vector<std::unique_ptr<CFX_ListItem>> m_ListItems;
float m_fFontSize;
- IPVT_FontMap* m_pFontMap;
+ CFX_UnownedPtr<IPVT_FontMap> m_pFontMap;
bool m_bMultiple;
};