From f9d60598992f3d9ce2f4b5860a7835fa44d55c88 Mon Sep 17 00:00:00 2001 From: Jane Liu Date: Tue, 25 Jul 2017 18:02:50 -0400 Subject: Added CPDF_NameTree::DeleteValueAndName() 1. Added CPDF_NameTree::DeleteValueAndName() for deleting new name and value pairs from a nametree. This function will be used for the API for deleting embedded files. * Added an anonymous helper function for updating the tree nodes and limits upon deletion. * Added a unit test. Bug=pdfium:174 Change-Id: I3ee4c27af637f721ee0ccda26fbae3d3a5e58f5e Reviewed-on: https://pdfium-review.googlesource.com/8931 Reviewed-by: dsinclair Commit-Queue: dsinclair --- core/fpdfdoc/cpdf_nametree.h | 1 + 1 file changed, 1 insertion(+) (limited to 'core/fpdfdoc/cpdf_nametree.h') diff --git a/core/fpdfdoc/cpdf_nametree.h b/core/fpdfdoc/cpdf_nametree.h index 28239233ea..8c26c9380e 100644 --- a/core/fpdfdoc/cpdf_nametree.h +++ b/core/fpdfdoc/cpdf_nametree.h @@ -25,6 +25,7 @@ class CPDF_NameTree { bool AddValueAndName(std::unique_ptr pObj, const CFX_WideString& name); + bool DeleteValueAndName(int nIndex); CPDF_Object* LookupValueAndName(int nIndex, CFX_WideString* csName) const; CPDF_Object* LookupValue(const CFX_WideString& csName) const; -- cgit v1.2.3