Remove more dead code from CPDF_FormField.
Remove various methods with no callers.
Change-Id: I53fbf59e6cf68d560fe270d395c078f496f7b782
Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/96055
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
diff --git a/core/fpdfdoc/cpdf_formfield.cpp b/core/fpdfdoc/cpdf_formfield.cpp
index 26c1632..7a7554a 100644
--- a/core/fpdfdoc/cpdf_formfield.cpp
+++ b/core/fpdfdoc/cpdf_formfield.cpp
@@ -289,15 +289,6 @@
static_cast<int>(dwFlags));
}
-ByteString CPDF_FormField::GetDefaultStyle() const {
- const CPDF_Object* pObj = GetFieldAttr(m_pDict.Get(), "DS");
- return pObj ? pObj->GetString() : ByteString();
-}
-
-void CPDF_FormField::SetOpt(RetainPtr<CPDF_Object> pOpt) {
- m_pDict->SetFor("Opt", std::move(pOpt));
-}
-
WideString CPDF_FormField::GetValue(bool bDefault) const {
if (GetType() == kCheckBox || GetType() == kRadioButton)
return GetCheckValue(bDefault);
@@ -535,14 +526,6 @@
}
}
-bool CPDF_FormField::IsItemDefaultSelected(int index) const {
- DCHECK(GetType() == kComboBox || GetType() == kListBox);
- if (index < 0 || index >= CountOptions())
- return false;
- int iDVIndex = GetDefaultSelectedItem();
- return iDVIndex >= 0 && iDVIndex == index;
-}
-
int CPDF_FormField::GetDefaultSelectedItem() const {
DCHECK(GetType() == kComboBox || GetType() == kListBox);
const CPDF_Object* pValue = GetDefaultValueObject();
diff --git a/core/fpdfdoc/cpdf_formfield.h b/core/fpdfdoc/cpdf_formfield.h
index e222dc6..ee4495b 100644
--- a/core/fpdfdoc/cpdf_formfield.h
+++ b/core/fpdfdoc/cpdf_formfield.h
@@ -99,7 +99,6 @@
uint32_t GetFieldFlags() const;
void SetFieldFlags(uint32_t dwFlags);
- ByteString GetDefaultStyle() const;
bool IsRequired() const { return m_bRequired; }
bool IsNoExport() const { return m_bNoExport; }
@@ -116,8 +115,6 @@
bool IsItemSelected(int index) const;
bool SetItemSelection(int index, NotificationOption notify);
- bool IsItemDefaultSelected(int index) const;
-
int GetDefaultSelectedItem() const;
int CountOptions() const;
WideString GetOptionLabel(int index) const;
@@ -144,8 +141,6 @@
WideString GetCheckValue(bool bDefault) const;
- void SetOpt(RetainPtr<CPDF_Object> pOpt);
-
private:
WideString GetValue(bool bDefault) const;
bool SetValue(const WideString& value,