diff options
author | Tom Sepez <tsepez@chromium.org> | 2018-05-25 20:13:59 +0000 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2018-05-25 20:13:59 +0000 |
commit | 2d3a78547ae2a0c084dc312ca4b3e03ff3427a9f (patch) | |
tree | 01bebb737842c65d2245b7d55e7687348b0de048 /core/fpdfdoc/cpdf_formfield.cpp | |
parent | d4d645abecec0fe2e6477b5928cfa2967675585b (diff) | |
download | pdfium-2d3a78547ae2a0c084dc312ca4b3e03ff3427a9f.tar.xz |
Remove CPDF_FormField::{Insert,Clear}Option
It is not called anywhere.
Change-Id: Ic5af010300a20fdd3d05f55df481030a946bb8c4
Reviewed-on: https://pdfium-review.googlesource.com/32971
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
Diffstat (limited to 'core/fpdfdoc/cpdf_formfield.cpp')
-rw-r--r-- | core/fpdfdoc/cpdf_formfield.cpp | 51 |
1 files changed, 0 insertions, 51 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) { |