diff options
author | m-holger <m-holger@kubitscheck.org> | 2022-08-14 11:50:30 +0200 |
---|---|---|
committer | m-holger <m-holger@kubitscheck.org> | 2022-09-01 18:19:06 +0200 |
commit | 4a8515912c80e8d98c3c1a42eec4bdf7b6bbd8e1 (patch) | |
tree | deee2bcdb10bbf6818eb62ec6be8342da506f523 /include | |
parent | 56e9bcabe984acd4479ff7fef9a2a0ca669abc76 (diff) | |
download | qpdf-4a8515912c80e8d98c3c1a42eec4bdf7b6bbd8e1.tar.zst |
Add method QPDFObject::resolve
Diffstat (limited to 'include')
-rw-r--r-- | include/qpdf/QPDF.hh | 2 | ||||
-rw-r--r-- | include/qpdf/QPDFObject.hh | 11 |
2 files changed, 11 insertions, 2 deletions
diff --git a/include/qpdf/QPDF.hh b/include/qpdf/QPDF.hh index 42097425..bcd85cd2 100644 --- a/include/qpdf/QPDF.hh +++ b/include/qpdf/QPDF.hh @@ -843,7 +843,7 @@ class QPDF // it can resolve indirect references. class Resolver { - friend class QPDFObjectHandle; + friend class QPDFObject; private: static void diff --git a/include/qpdf/QPDFObject.hh b/include/qpdf/QPDFObject.hh index 7bb7c6e1..751a5736 100644 --- a/include/qpdf/QPDFObject.hh +++ b/include/qpdf/QPDFObject.hh @@ -153,10 +153,19 @@ class QPDFObject } bool - isUnresolved() + isUnresolved() const { return value->type_code == ::ot_unresolved; } + void + resolve() + { + if (isUnresolved()) { + doResolve(); + } + } + void doResolve(); + template <typename T> T* as() |