summaryrefslogtreecommitdiff
path: root/core/fpdfdoc
diff options
context:
space:
mode:
Diffstat (limited to 'core/fpdfdoc')
-rw-r--r--core/fpdfdoc/cpdf_formfield.cpp51
-rw-r--r--core/fpdfdoc/cpdf_formfield.h8
2 files changed, 0 insertions, 59 deletions
diff --git a/core/fpdfdoc/cpdf_formfield.cpp b/core/fpdfdoc/cpdf_formfield.cpp
index ae10b9e39d..bfc39b08f1 100644
--- a/core/fpdfdoc/cpdf_formfield.cpp
+++ b/core/fpdfdoc/cpdf_formfield.cpp
@@ -643,57 +643,6 @@ int CPDF_FormField::FindOptionValue(const WideString& csOptValue) const {
return -1;
}
-#ifdef PDF_ENABLE_XFA
-int CPDF_FormField::InsertOption(WideString csOptLabel,
- int index,
- bool bNotify) {
- if (csOptLabel.IsEmpty())
- return -1;
-
- if (bNotify && !NotifyListOrComboBoxBeforeChange(csOptLabel))
- return -1;
-
- ByteString csStr = PDF_EncodeText(csOptLabel);
- CPDF_Array* pOpt = ToArray(FPDF_GetFieldAttr(m_pDict.Get(), "Opt"));
- if (!pOpt)
- pOpt = m_pDict->SetNewFor<CPDF_Array>("Opt");
-
- int iCount = pdfium::base::checked_cast<int>(pOpt->GetCount());
- if (index >= iCount) {
- pOpt->AddNew<CPDF_String>(csStr, false);
- index = iCount;
- } else {
- pOpt->InsertNewAt<CPDF_String>(index, csStr, false);
- }
-
- if (bNotify)
- NotifyListOrComboBoxAfterChange();
- return index;
-}
-
-bool CPDF_FormField::ClearOptions(bool bNotify) {
- if (bNotify && m_pForm->GetFormNotify()) {
- WideString csValue;
- int iIndex = GetSelectedIndex(0);
- if (iIndex >= 0)
- csValue = GetOptionLabel(iIndex);
- if (!NotifyListOrComboBoxBeforeChange(csValue))
- return false;
- }
-
- m_pDict->RemoveFor("Opt");
- m_pDict->RemoveFor("V");
- m_pDict->RemoveFor("DV");
- m_pDict->RemoveFor("I");
- m_pDict->RemoveFor("TI");
-
- if (bNotify)
- NotifyListOrComboBoxAfterChange();
-
- return true;
-}
-#endif // PDF_ENABLE_XFA
-
bool CPDF_FormField::CheckControl(int iControlIndex,
bool bChecked,
bool bNotify) {
diff --git a/core/fpdfdoc/cpdf_formfield.h b/core/fpdfdoc/cpdf_formfield.h
index b79e430dee..315ca76a51 100644
--- a/core/fpdfdoc/cpdf_formfield.h
+++ b/core/fpdfdoc/cpdf_formfield.h
@@ -160,17 +160,9 @@ class CPDF_FormField {
int GetSelectedOptionIndex(int index) const;
bool IsOptionSelected(int iOptIndex) const;
-
bool SelectOption(int iOptIndex, bool bSelected, bool bNotify = false);
-
bool ClearSelectedOptions(bool bNotify = false);
-#ifdef PDF_ENABLE_XFA
- bool ClearOptions(bool bNotify = false);
-
- int InsertOption(WideString csOptLabel, int index = -1, bool bNotify = false);
-#endif // PDF_ENABLE_XFA
-
float GetFontSize() const { return m_FontSize; }
CPDF_Font* GetFont() const { return m_pFont.Get(); }