diff options
author | m-holger <m-holger@kubitscheck.org> | 2022-08-14 02:05:32 +0200 |
---|---|---|
committer | m-holger <m-holger@kubitscheck.org> | 2022-09-01 18:09:48 +0200 |
commit | 56e9bcabe984acd4479ff7fef9a2a0ca669abc76 (patch) | |
tree | 1367fba1ab799fddc65e615893607f8f7e6cef78 /include | |
parent | 89061d5b33baa7e8f4e3486d0c7ccf2447500b13 (diff) | |
download | qpdf-56e9bcabe984acd4479ff7fef9a2a0ca669abc76.tar.zst |
Add methods QPDFObject::setObjGen and QPDFObject::resetObjGen
Also, modify QPDFObject::swapWith to update the ObjGens of the swapped
objects.
Modify QPDF::newIndirect and QPDF::updateCache to keep object ObjGens
up to date.
Diffstat (limited to 'include')
-rw-r--r-- | include/qpdf/QPDFObject.hh | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/include/qpdf/QPDFObject.hh b/include/qpdf/QPDFObject.hh index 198488dd..7bb7c6e1 100644 --- a/include/qpdf/QPDFObject.hh +++ b/include/qpdf/QPDFObject.hh @@ -133,7 +133,25 @@ class QPDFObject auto v = value; value = o->value; o->value = v; + auto og = value->og; + value->og = o->value->og; + o->value->og = og; } + + // The following two methods are for use by class QPDF only + void + setObjGen(QPDF* qpdf, QPDFObjGen const& og) + { + value->qpdf = qpdf; + value->og = og; + } + void + resetObjGen() + { + value->qpdf = nullptr; + value->og = QPDFObjGen(); + } + bool isUnresolved() { |