summaryrefslogtreecommitdiff
path: root/fpdfsdk/fxedit/include
diff options
context:
space:
mode:
authorthestig <thestig@chromium.org>2016-05-10 13:24:16 -0700
committerCommit bot <commit-bot@chromium.org>2016-05-10 13:24:17 -0700
commit2c3a16a7698ba15476173e849f82c97ea3da9939 (patch)
treee0a66aaa5e28af2cf5fea56f25306a8f531f892c /fpdfsdk/fxedit/include
parent245ae9ce1bb854e5e3da400c6d8c8061d81953a9 (diff)
downloadpdfium-2c3a16a7698ba15476173e849f82c97ea3da9939.tar.xz
Remove some dead code.
- No caller checks the CPDF_VariableText::SetProvider() return value. - IFX_Edit::SetVTProvider() is unused. - CFX_ListItem::SetCaret() is useless. - CFX_List::SetItemCaret() is also useless. - CPVT_GenerateAP::GenerateEditAP() has a param that's always NULL. Review-Url: https://codereview.chromium.org/1960183003
Diffstat (limited to 'fpdfsdk/fxedit/include')
-rw-r--r--fpdfsdk/fxedit/include/fx_edit.h4
-rw-r--r--fpdfsdk/fxedit/include/fxet_edit.h1
-rw-r--r--fpdfsdk/fxedit/include/fxet_list.h14
3 files changed, 5 insertions, 14 deletions
diff --git a/fpdfsdk/fxedit/include/fx_edit.h b/fpdfsdk/fxedit/include/fx_edit.h
index a00d1d41a7..5f0283f06f 100644
--- a/fpdfsdk/fxedit/include/fx_edit.h
+++ b/fpdfsdk/fxedit/include/fx_edit.h
@@ -169,10 +169,6 @@ class IFX_Edit {
// set a IPVT_FontMap pointer implemented by user.
virtual void SetFontMap(IPVT_FontMap* pFontMap) = 0;
- // if user don't like to use FontMap, implement VTProvider and set it
- // directly.
- virtual void SetVTProvider(CPDF_VariableText::Provider* pProvider) = 0;
-
// set a IFX_Edit_Notify pointer implemented by user.
virtual void SetNotify(IFX_Edit_Notify* pNotify) = 0;
virtual void SetOprNotify(IFX_Edit_OprNotify* pOprNotify) = 0;
diff --git a/fpdfsdk/fxedit/include/fxet_edit.h b/fpdfsdk/fxedit/include/fxet_edit.h
index 4233b1d301..738210a997 100644
--- a/fpdfsdk/fxedit/include/fxet_edit.h
+++ b/fpdfsdk/fxedit/include/fxet_edit.h
@@ -516,7 +516,6 @@ class CFX_Edit : public IFX_Edit {
// IFX_Edit
void SetFontMap(IPVT_FontMap* pFontMap) override;
- void SetVTProvider(CPDF_VariableText::Provider* pProvider) override;
void SetNotify(IFX_Edit_Notify* pNotify) override;
void SetOprNotify(IFX_Edit_OprNotify* pOprNotify) override;
IFX_Edit_Iterator* GetIterator() override;
diff --git a/fpdfsdk/fxedit/include/fxet_list.h b/fpdfsdk/fxedit/include/fxet_list.h
index 1f855b7747..58aa94c5b6 100644
--- a/fpdfsdk/fxedit/include/fxet_list.h
+++ b/fpdfsdk/fxedit/include/fxet_list.h
@@ -46,7 +46,7 @@ class CLST_Rect : public CFX_FloatRect {
bottom = other_bottom;
}
- CLST_Rect(const CFX_FloatRect& rect) {
+ explicit CLST_Rect(const CFX_FloatRect& rect) {
left = rect.left;
top = rect.top;
right = rect.right;
@@ -113,33 +113,30 @@ class CLST_Rect : public CFX_FloatRect {
}
};
-class CFX_ListItem {
+class CFX_ListItem final {
public:
CFX_ListItem();
- virtual ~CFX_ListItem();
+ ~CFX_ListItem();
void SetFontMap(IPVT_FontMap* pFontMap);
- IFX_Edit_Iterator* GetIterator() const;
IFX_Edit* GetEdit() const;
- public:
void SetRect(const CLST_Rect& rect);
void SetSelect(FX_BOOL bSelected);
- void SetCaret(FX_BOOL bCaret);
void SetText(const FX_WCHAR* text);
void SetFontSize(FX_FLOAT fFontSize);
CFX_WideString GetText() const;
CLST_Rect GetRect() const;
FX_BOOL IsSelected() const;
- FX_BOOL IsCaret() const;
FX_FLOAT GetItemHeight() const;
uint16_t GetFirstChar() const;
private:
+ IFX_Edit_Iterator* GetIterator() const;
+
IFX_Edit* m_pEdit;
FX_BOOL m_bSelected;
- FX_BOOL m_bCaret;
CLST_Rect m_rcListItem;
};
@@ -233,7 +230,6 @@ class CFX_List : protected CFX_ListContainer, public IFX_List {
virtual void ReArrange(int32_t nItemIndex);
CFX_WideString GetItemText(int32_t nIndex) const;
void SetItemSelect(int32_t nItemIndex, FX_BOOL bSelected);
- void SetItemCaret(int32_t nItemIndex, FX_BOOL bCaret);
int32_t GetLastSelected() const;
FX_WCHAR Toupper(FX_WCHAR c) const;