From 80482dc264c537945f95b0419ba4f9a70d6ae4cd Mon Sep 17 00:00:00 2001 From: Tom Sepez Date: Wed, 3 Oct 2018 23:39:03 +0000 Subject: Remove unused method CPDF_ActionFields::GetFieldsCount() Change-Id: I0299a5df10facc964d228346a438018bd3c962b4 Reviewed-on: https://pdfium-review.googlesource.com/c/43457 Commit-Queue: Lei Zhang Reviewed-by: Lei Zhang --- core/fpdfdoc/cpdf_actionfields.cpp | 27 +-------------------------- core/fpdfdoc/cpdf_actionfields.h | 1 - 2 files changed, 1 insertion(+), 27 deletions(-) diff --git a/core/fpdfdoc/cpdf_actionfields.cpp b/core/fpdfdoc/cpdf_actionfields.cpp index 89636bfc23..2af70c2be5 100644 --- a/core/fpdfdoc/cpdf_actionfields.cpp +++ b/core/fpdfdoc/cpdf_actionfields.cpp @@ -13,32 +13,7 @@ CPDF_ActionFields::CPDF_ActionFields(const CPDF_Action* pAction) : m_pAction(pAction) {} -CPDF_ActionFields::~CPDF_ActionFields() {} - -size_t CPDF_ActionFields::GetFieldsCount() const { - if (!m_pAction) - return 0; - - const CPDF_Dictionary* pDict = m_pAction->GetDict(); - if (!pDict) - return 0; - - ByteString csType = pDict->GetStringFor("S"); - const CPDF_Object* pFields; - if (csType == "Hide") - pFields = pDict->GetDirectObjectFor("T"); - else - pFields = pDict->GetArrayFor("Fields"); - - if (!pFields) - return 0; - if (pFields->IsDictionary()) - return 1; - if (pFields->IsString()) - return 1; - const CPDF_Array* pArray = pFields->AsArray(); - return pArray ? pArray->GetCount() : 0; -} +CPDF_ActionFields::~CPDF_ActionFields() = default; std::vector CPDF_ActionFields::GetAllFields() const { std::vector fields; diff --git a/core/fpdfdoc/cpdf_actionfields.h b/core/fpdfdoc/cpdf_actionfields.h index affc03cfec..1306a4c08d 100644 --- a/core/fpdfdoc/cpdf_actionfields.h +++ b/core/fpdfdoc/cpdf_actionfields.h @@ -21,7 +21,6 @@ class CPDF_ActionFields { explicit CPDF_ActionFields(const CPDF_Action* pAction); ~CPDF_ActionFields(); - size_t GetFieldsCount() const; std::vector GetAllFields() const; const CPDF_Object* GetField(size_t iIndex) const; -- cgit v1.2.3