aboutsummaryrefslogtreecommitdiffstats
path: root/libqpdf/QPDFObjectHandle.cc
diff options
context:
space:
mode:
authorJay Berkenbilt <ejb@ql.org>2009-10-19 03:58:31 +0200
committerJay Berkenbilt <ejb@ql.org>2009-10-19 03:58:31 +0200
commit734ac1e1d2b3ce10a2da1a7e736a30bdf0bc5cf8 (patch)
treecad02f21cf00a93e4209f74ab96b96f707dd0aaa /libqpdf/QPDFObjectHandle.cc
parent70ae58c0355e06cfe7d97426b28a61ab419ef276 (diff)
downloadqpdf-734ac1e1d2b3ce10a2da1a7e736a30bdf0bc5cf8.tar.zst
deal with stream-specific crypt filters
git-svn-id: svn+q:///qpdf/trunk@827 71b93d88-0707-0410-a8cf-f5a4172ac649
Diffstat (limited to 'libqpdf/QPDFObjectHandle.cc')
-rw-r--r--libqpdf/QPDFObjectHandle.cc23
1 files changed, 23 insertions, 0 deletions
diff --git a/libqpdf/QPDFObjectHandle.cc b/libqpdf/QPDFObjectHandle.cc
index 08d648bd..c3a7167b 100644
--- a/libqpdf/QPDFObjectHandle.cc
+++ b/libqpdf/QPDFObjectHandle.cc
@@ -258,6 +258,29 @@ QPDFObjectHandle::getKeys()
return dynamic_cast<QPDF_Dictionary*>(obj.getPointer())->getKeys();
}
+// Array and Name accessors
+bool
+QPDFObjectHandle::isOrHasName(std::string const& value)
+{
+ if (isName() && (getName() == value))
+ {
+ return true;
+ }
+ else if (isArray())
+ {
+ int n = getArrayNItems();
+ for (int i = 0; i < n; ++i)
+ {
+ QPDFObjectHandle item = getArrayItem(0);
+ if (item.isName() && (item.getName() == value))
+ {
+ return true;
+ }
+ }
+ }
+ return false;
+}
+
// Dictionary mutators
void