diff options
author | Jay Berkenbilt <ejb@ql.org> | 2022-09-07 22:49:31 +0200 |
---|---|---|
committer | Jay Berkenbilt <ejb@ql.org> | 2022-09-08 16:19:38 +0200 |
commit | 264e25f391f83bcbeb60590f18ff96719b086454 (patch) | |
tree | ad7a6daae5a2350d56a521eb022fea30e799b95c /include | |
parent | a615985865ca73249a7b21e2f28b440cb6c16636 (diff) | |
download | qpdf-264e25f391f83bcbeb60590f18ff96719b086454.tar.zst |
Clear owning QPDF information for all objects, not just indirect
Diffstat (limited to 'include')
-rw-r--r-- | include/qpdf/QPDFObjectHandle.hh | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/include/qpdf/QPDFObjectHandle.hh b/include/qpdf/QPDFObjectHandle.hh index f3c8c8eb..76e36eae 100644 --- a/include/qpdf/QPDFObjectHandle.hh +++ b/include/qpdf/QPDFObjectHandle.hh @@ -1534,6 +1534,23 @@ class QPDFObjectHandle }; friend class ObjAccessor; + // Provide access to specific classes for recursive + // reset(). + class Resetter + { + friend class QPDF_Dictionary; + friend class QPDF_Stream; + friend class SparseOHArray; + + private: + static void + reset(QPDFObjectHandle& o) + { + o.reset(); + } + }; + friend class Resetter; + // Convenience routine: Throws if the assumption is violated. Your // code will be better if you call one of the isType methods and // handle the case of the type being wrong, but these can be @@ -1631,6 +1648,7 @@ class QPDFObjectHandle bool first_level_only, bool stop_at_streams); void shallowCopyInternal(QPDFObjectHandle& oh, bool first_level_only); + void reset(); void setParsedOffset(qpdf_offset_t offset); void parseContentStream_internal( std::string const& description, ParserCallbacks* callbacks); |