summaryrefslogtreecommitdiff
path: root/public/cpp
diff options
context:
space:
mode:
authorDan Sinclair <dsinclair@chromium.org>2017-04-05 10:30:33 -0400
committerChromium commit bot <commit-bot@chromium.org>2017-04-05 15:32:53 +0000
commitddcb6e7f47e2769fb4565bd4430ecb465a1f5417 (patch)
tree7df1c793d23343b152e1f512dde9aff1d0531380 /public/cpp
parented4705b4db1405a5abef99ad1b2725eee65fedf8 (diff)
downloadpdfium-ddcb6e7f47e2769fb4565bd4430ecb465a1f5417.tar.xz
Add option to pdfium_test to dump structure elements
This Cl adds a --show-structure to pdfium_test which will dump out the StructElement items for the selected pages. Bug: pdfium:672 Change-Id: I90aceda71c13c54abfe4ac242a62375643cdfd9d Reviewed-on: https://pdfium-review.googlesource.com/3750 Reviewed-by: Nicolás Peña <npm@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'public/cpp')
-rw-r--r--public/cpp/fpdf_deleters.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/public/cpp/fpdf_deleters.h b/public/cpp/fpdf_deleters.h
index 6754902a77..d56daf5c55 100644
--- a/public/cpp/fpdf_deleters.h
+++ b/public/cpp/fpdf_deleters.h
@@ -7,6 +7,7 @@
#include "public/fpdf_dataavail.h"
#include "public/fpdf_formfill.h"
+#include "public/fpdf_structtree.h"
#include "public/fpdf_text.h"
#include "public/fpdfview.h"
@@ -38,4 +39,8 @@ struct FPDFPageDeleter {
inline void operator()(FPDF_PAGE page) { FPDF_ClosePage(page); }
};
+struct FPDFStructTreeDeleter {
+ inline void operator()(FPDF_STRUCTTREE tree) { FPDF_StructTree_Close(tree); }
+};
+
#endif // PUBLIC_CPP_FPDF_DELETERS_H_