summaryrefslogtreecommitdiff
path: root/core/fpdfdoc/cpdf_nametree.h
diff options
context:
space:
mode:
authorJane Liu <janeliulwq@google.com>2017-07-25 18:02:50 -0400
committerChromium commit bot <commit-bot@chromium.org>2017-07-27 13:52:21 +0000
commitf9d60598992f3d9ce2f4b5860a7835fa44d55c88 (patch)
tree3d83fb355e89fc4a55e64d88fc461289c6f1093a /core/fpdfdoc/cpdf_nametree.h
parentbe38e1628821733d6c59443063f641f5747221bf (diff)
downloadpdfium-f9d60598992f3d9ce2f4b5860a7835fa44d55c88.tar.xz
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 <dsinclair@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'core/fpdfdoc/cpdf_nametree.h')
-rw-r--r--core/fpdfdoc/cpdf_nametree.h1
1 files changed, 1 insertions, 0 deletions
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<CPDF_Object> 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;