summaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2018-10-03 23:39:03 +0000
committerChromium commit bot <commit-bot@chromium.org>2018-10-03 23:39:03 +0000
commit80482dc264c537945f95b0419ba4f9a70d6ae4cd (patch)
tree50ec10c8f52e1f8134a7c3d10cd71d961d928282 /core
parent244e24e17ccb574c99e5f2ca84fb2ac476ae5ccd (diff)
downloadpdfium-80482dc264c537945f95b0419ba4f9a70d6ae4cd.tar.xz
Remove unused method CPDF_ActionFields::GetFieldsCount()
Change-Id: I0299a5df10facc964d228346a438018bd3c962b4 Reviewed-on: https://pdfium-review.googlesource.com/c/43457 Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: Lei Zhang <thestig@chromium.org>
Diffstat (limited to 'core')
-rw-r--r--core/fpdfdoc/cpdf_actionfields.cpp27
-rw-r--r--core/fpdfdoc/cpdf_actionfields.h1
2 files changed, 1 insertions, 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<const CPDF_Object*> CPDF_ActionFields::GetAllFields() const {
std::vector<const CPDF_Object*> 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<const CPDF_Object*> GetAllFields() const;
const CPDF_Object* GetField(size_t iIndex) const;