From 912f2d154162cef0dcb59f030a45b1f4f024f78a Mon Sep 17 00:00:00 2001 From: Tom Sepez Date: Thu, 4 Oct 2018 00:26:17 +0000 Subject: Remove several more unused methods from core/ Change-Id: I891add4e91c7ee58b34974fed6d73d17c297e759 Reviewed-on: https://pdfium-review.googlesource.com/c/43459 Reviewed-by: Lei Zhang Commit-Queue: Lei Zhang --- core/fpdfdoc/cpdf_formcontrol.cpp | 42 --------------------------------------- 1 file changed, 42 deletions(-) (limited to 'core/fpdfdoc/cpdf_formcontrol.cpp') diff --git a/core/fpdfdoc/cpdf_formcontrol.cpp b/core/fpdfdoc/cpdf_formcontrol.cpp index d644ba9a64..64c3dcaf46 100644 --- a/core/fpdfdoc/cpdf_formcontrol.cpp +++ b/core/fpdfdoc/cpdf_formcontrol.cpp @@ -53,48 +53,6 @@ ByteString CPDF_FormControl::GetOnStateName() const { return ByteString(); } -void CPDF_FormControl::SetOnStateName(const ByteString& csOn) { - ASSERT(GetType() == CPDF_FormField::CheckBox || - GetType() == CPDF_FormField::RadioButton); - ByteString csValue = csOn; - if (csValue.IsEmpty()) - csValue = "Yes"; - else if (csValue == "Off") - csValue = "Yes"; - - ByteString csAS = m_pWidgetDict->GetStringFor("AS", "Off"); - if (csAS != "Off") - m_pWidgetDict->SetNewFor("AS", csValue); - - CPDF_Dictionary* pAP = m_pWidgetDict->GetDictFor("AP"); - if (!pAP) - return; - - for (const auto& it : *pAP) { - CPDF_Object* pObj1 = it.second.get(); - if (!pObj1) - continue; - - CPDF_Object* pObjDirect1 = pObj1->GetDirect(); - CPDF_Dictionary* pSubDict = pObjDirect1->AsDictionary(); - if (!pSubDict) - continue; - - auto subdict_it = pSubDict->begin(); - while (subdict_it != pSubDict->end()) { - const ByteString& csKey2 = subdict_it->first; - CPDF_Object* pObj2 = subdict_it->second.get(); - ++subdict_it; - if (!pObj2) - continue; - if (csKey2 != "Off") { - pSubDict->ReplaceKey(csKey2, csValue); - break; - } - } - } -} - ByteString CPDF_FormControl::GetCheckedAPState() { ASSERT(GetType() == CPDF_FormField::CheckBox || GetType() == CPDF_FormField::RadioButton); -- cgit v1.2.3