summaryrefslogtreecommitdiff
path: root/fpdfsdk/fxedit/fxet_list.cpp
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/fxet_list.cpp
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/fxet_list.cpp')
-rw-r--r--fpdfsdk/fxedit/fxet_list.cpp25
1 files changed, 2 insertions, 23 deletions
diff --git a/fpdfsdk/fxedit/fxet_list.cpp b/fpdfsdk/fxedit/fxet_list.cpp
index af6e8588f6..63465ebe44 100644
--- a/fpdfsdk/fxedit/fxet_list.cpp
+++ b/fpdfsdk/fxedit/fxet_list.cpp
@@ -12,7 +12,6 @@
CFX_ListItem::CFX_ListItem()
: m_pEdit(NULL),
m_bSelected(FALSE),
- m_bCaret(FALSE),
m_rcListItem(0.0f, 0.0f, 0.0f, 0.0f) {
m_pEdit = IFX_Edit::NewEdit();
m_pEdit->SetAlignmentV(1);
@@ -55,14 +54,6 @@ void CFX_ListItem::SetSelect(FX_BOOL bSelected) {
m_bSelected = bSelected;
}
-FX_BOOL CFX_ListItem::IsCaret() const {
- return m_bCaret;
-}
-
-void CFX_ListItem::SetCaret(FX_BOOL bCaret) {
- m_bCaret = bCaret;
-}
-
void CFX_ListItem::SetText(const FX_WCHAR* text) {
if (m_pEdit)
m_pEdit->SetText(text);
@@ -257,17 +248,15 @@ CFX_FloatRect CFX_List::GetItemRect(int32_t nIndex) const {
CFX_FloatRect rcItem = pListItem->GetRect();
rcItem.left = 0.0f;
rcItem.right = GetPlateRect().Width();
- return InnerToOuter(rcItem);
+ return InnerToOuter(CLST_Rect(rcItem));
}
return CFX_FloatRect();
}
FX_BOOL CFX_List::IsItemSelected(int32_t nIndex) const {
- if (CFX_ListItem* pListItem = m_aListItems.GetAt(nIndex)) {
+ if (CFX_ListItem* pListItem = m_aListItems.GetAt(nIndex))
return pListItem->IsSelected();
- }
-
return FALSE;
}
@@ -277,12 +266,6 @@ void CFX_List::SetItemSelect(int32_t nItemIndex, FX_BOOL bSelected) {
}
}
-void CFX_List::SetItemCaret(int32_t nItemIndex, FX_BOOL bCaret) {
- if (CFX_ListItem* pListItem = m_aListItems.GetAt(nItemIndex)) {
- pListItem->SetCaret(bCaret);
- }
-}
-
void CFX_List::SetMultipleSel(FX_BOOL bMultiple) {
m_bMultiple = bMultiple;
}
@@ -639,10 +622,6 @@ void CFX_ListCtrl::SetCaret(int32_t nItemIndex) {
if (nOldIndex != nItemIndex) {
m_nCaretIndex = nItemIndex;
-
- SetItemCaret(nOldIndex, FALSE);
- SetItemCaret(nItemIndex, TRUE);
-
InvalidateItem(nOldIndex);
InvalidateItem(nItemIndex);
}