summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2018-10-03 21:02:42 +0000
committerChromium commit bot <commit-bot@chromium.org>2018-10-03 21:02:42 +0000
commit61d8d025d5687a05048202d2d1d6f355f3d20404 (patch)
treeefa0fd0b83944ae0d3cf1ff0ffeeae5dbe7ee9ab
parent3ee4922ced4b74e3c3f8aba355239932bb8afee5 (diff)
downloadpdfium-61d8d025d5687a05048202d2d1d6f355f3d20404.tar.xz
Remove unused methods in CPDF_DocJSActions.
Tidy ctor while at it. Change-Id: I33c0751bc37e1aa840033439b4826c76d1597d4c Reviewed-on: https://pdfium-review.googlesource.com/c/43456 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Tom Sepez <tsepez@chromium.org>
-rw-r--r--core/fpdfdoc/cpdf_docjsactions.cpp20
-rw-r--r--core/fpdfdoc/cpdf_docjsactions.h2
2 files changed, 4 insertions, 18 deletions
diff --git a/core/fpdfdoc/cpdf_docjsactions.cpp b/core/fpdfdoc/cpdf_docjsactions.cpp
index 91db2b0484..2f6c5b2f1d 100644
--- a/core/fpdfdoc/cpdf_docjsactions.cpp
+++ b/core/fpdfdoc/cpdf_docjsactions.cpp
@@ -8,31 +8,19 @@
#include "core/fpdfdoc/cpdf_nametree.h"
-CPDF_DocJSActions::CPDF_DocJSActions(CPDF_Document* pDoc) : m_pDocument(pDoc) {}
+CPDF_DocJSActions::CPDF_DocJSActions(CPDF_Document* pDoc) : m_pDocument(pDoc) {
+ ASSERT(m_pDocument);
+}
-CPDF_DocJSActions::~CPDF_DocJSActions() {}
+CPDF_DocJSActions::~CPDF_DocJSActions() = default;
int CPDF_DocJSActions::CountJSActions() const {
- ASSERT(m_pDocument);
CPDF_NameTree name_tree(m_pDocument.Get(), "JavaScript");
return name_tree.GetCount();
}
CPDF_Action CPDF_DocJSActions::GetJSActionAndName(int index,
WideString* csName) const {
- ASSERT(m_pDocument);
CPDF_NameTree name_tree(m_pDocument.Get(), "JavaScript");
return CPDF_Action(ToDictionary(name_tree.LookupValueAndName(index, csName)));
}
-
-CPDF_Action CPDF_DocJSActions::GetJSAction(const WideString& csName) const {
- ASSERT(m_pDocument);
- CPDF_NameTree name_tree(m_pDocument.Get(), "JavaScript");
- return CPDF_Action(ToDictionary(name_tree.LookupValue(csName)));
-}
-
-int CPDF_DocJSActions::FindJSAction(const WideString& csName) const {
- ASSERT(m_pDocument);
- CPDF_NameTree name_tree(m_pDocument.Get(), "JavaScript");
- return name_tree.GetIndex(csName);
-}
diff --git a/core/fpdfdoc/cpdf_docjsactions.h b/core/fpdfdoc/cpdf_docjsactions.h
index 39aafb8d50..cad28e9da4 100644
--- a/core/fpdfdoc/cpdf_docjsactions.h
+++ b/core/fpdfdoc/cpdf_docjsactions.h
@@ -20,8 +20,6 @@ class CPDF_DocJSActions {
int CountJSActions() const;
CPDF_Action GetJSActionAndName(int index, WideString* csName) const;
- CPDF_Action GetJSAction(const WideString& csName) const;
- int FindJSAction(const WideString& csName) const;
CPDF_Document* GetDocument() const { return m_pDocument.Get(); }
private: