diff options
-rw-r--r-- | core/fpdfdoc/cpdf_docjsactions.cpp | 20 | ||||
-rw-r--r-- | core/fpdfdoc/cpdf_docjsactions.h | 2 |
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: |