diff options
author | Jay Berkenbilt <ejb@ql.org> | 2020-12-22 15:31:26 +0100 |
---|---|---|
committer | Jay Berkenbilt <ejb@ql.org> | 2020-12-26 14:48:18 +0100 |
commit | cc8895078a1d64928e8ee335f1e8c7d6928de1b3 (patch) | |
tree | b8f2ce902ae3a183f5e0a98951d6f7126cc13bc1 /include | |
parent | 573b6eb8b1801b40a4b6eb32cfd159f532876510 (diff) | |
download | qpdf-cc8895078a1d64928e8ee335f1e8c7d6928de1b3.tar.zst |
Add QPDFObjectHandle::makeDirect(bool allow_streams)
Diffstat (limited to 'include')
-rw-r--r-- | include/qpdf/QPDFObjectHandle.hh | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/include/qpdf/QPDFObjectHandle.hh b/include/qpdf/QPDFObjectHandle.hh index 7738fd77..c6534b17 100644 --- a/include/qpdf/QPDFObjectHandle.hh +++ b/include/qpdf/QPDFObjectHandle.hh @@ -721,8 +721,20 @@ class QPDFObjectHandle // Mutator methods. Use with caution. - // Recursively copy this object, making it direct. Throws an - // exception if a loop is detected or any sub-object is a stream. + // Recursively copy this object, making it direct. An exception is + // thrown if a loop is detected. With allow_streams true, keep + // indirect object references to streams. Otherwise, throw an + // exception if any sub-object is a stream. Note that, when + // allow_streams is true and a stream is found, the resulting + // object is still associated with the containing qpdf. When + // allow_streams is false, the object will no longer be connected + // to the original QPDF object after this call completes + // successfully. + QPDF_DLL + void makeDirect(bool allow_streams); + // Zero-arg version is equivalent to makeDirect(false). + // ABI: delete zero-arg version of makeDirect, and make + // allow_streams default to false. QPDF_DLL void makeDirect(); @@ -1121,7 +1133,7 @@ class QPDFObjectHandle void assertType(char const* type_name, bool istype); void dereference(); void copyObject(std::set<QPDFObjGen>& visited, bool cross_indirect, - bool first_level_only); + bool first_level_only, bool stop_at_streams); void shallowCopyInternal(QPDFObjectHandle& oh, bool first_level_only); void releaseResolved(); static void setObjectDescriptionFromInput( |