2
1
mirror of https://github.com/qpdf/qpdf.git synced 2024-05-29 08:20:53 +00:00
Commit Graph

222 Commits

Author SHA1 Message Date
m-holger
9da50ca360 Change olist variable in QPDFParser::parse to vector<shared_ptr<QPDFObject>> 2022-12-31 14:37:35 -05:00
m-holger
008364a9a4 Remove redundant friend class statements 2022-12-04 14:05:16 -05:00
Jay Berkenbilt
ddd889af9d Fix release notes and ChangeLog for 11.2 2022-11-20 15:33:13 -05:00
m-holger
4325e6e4a7 Refactor QPDFObjectHandle::copyObject and rename to makeDirect 2022-11-20 12:07:22 -05:00
m-holger
585ecf17c8 Remove redundant parameter cross_indirect from QPDFObjectHandle::copyObject 2022-11-20 12:07:22 -05:00
m-holger
ebc15f4dd0 Remove redundant parameter first_level_only from QPDFObjectHandle::copyObject 2022-11-20 12:07:22 -05:00
m-holger
64059014c9 Refactor QPDFObjectHandle::shallowCopy 2022-11-20 12:07:22 -05:00
m-holger
3e3b79a774 Remove redundant parameter first_level_only from QPDFObjectHandle::shallowCopyInternal2 and copyObject2 2022-11-20 12:07:22 -05:00
m-holger
3efd665703 Remove redundant parameters cross_indirect and stop_atstreams from QPDFObjectHandle::copyObject1 2022-11-20 12:07:22 -05:00
m-holger
d7b8525235 Refactor QPDFObjectHandle::unsafeShallowCopy 2022-11-20 12:07:22 -05:00
m-holger
0289b21c3b Remove redundant QPDFObjectHandle::copyObject2
copyObject2 repeats a second time what
new_obj = QPDFObjectHandle(obj->copy(true))
in shallowCopyInternal2 already did.
2022-11-20 12:07:22 -05:00
m-holger
15e8d3a763 Remove redundant parameter first_level_only from QPDFObjectHandle::shallowCopyInternal2 and copyObject2 2022-11-20 12:07:22 -05:00
m-holger
0827b1096e Remove redundant parameters cross_indirect and stop_atstreams from QPDFObjectHandle::copyObject2 2022-11-20 12:07:22 -05:00
m-holger
63d1dcb414 Split QPDFObjectHandle::shallowCopyInternal and copyObject
Have separate versions for unsafeShallowCopy, shallowCopy and makeDirect.
2022-11-20 12:07:22 -05:00
m-holger
bf347dfb73 Remove QPDFObjectHandle::Factory::newStream 2022-11-19 14:10:42 -05:00
m-holger
c63fb86c01 Inline call to QPDFObjectHandle::parse in QPDF::readObject 2022-10-01 11:17:39 -04:00
Jay Berkenbilt
9a9a7ab097 Comment about qpdf/PointerHolder.hh in public headers 2022-09-23 15:15:39 -04:00
Jay Berkenbilt
772c92227c Revert "Add default move constructor/assignment to QPDFObjectHandle"
This reverts commit 416d9668ee.

This commit causes numerous failures in the pikepdf test suite and
also causes a symbol to disappear from the public API. More
investigation will be required.
2022-09-14 15:44:17 -04:00
m-holger
416d9668ee Add default move constructor/assignment to QPDFObjectHandle 2022-09-12 13:18:56 -04:00
Jay Berkenbilt
8a3cdfd2af Change QPDFObjectHandle == to isSameObjectAs
Replace operator== and operator!=, which were testing for the same
underlying object, with isSameObjectAs. This change was motivated by
the fact that pikepdf internally had its own operator== method for
QPDFObjectHandle that did structural comparison. I backed out qpdf's
operator== as a courtesy to pikepdf (in my own testing) but also
because I think people might naturally assume that operator== does a
structural comparison, and isSameObjectAs is clearer in its intent.
2022-09-09 18:09:40 -04:00
Jay Berkenbilt
18a583e8d9 Rename QPDFValueProxy back to QPDFObject
QPDFValueProxy wasn't a good name for it. We decided the evil of
having the header file be named QPDFObject_private.hh was less than
the evil of having the class be named something other than what it
should have been named.
2022-09-08 11:29:23 -04:00
Jay Berkenbilt
c7a4967d10 Change reset to disconnect and clarify comments
I decided that it's actually fine to copy a direct object to another
QPDF. Even if we eventually prevent a QPDFObject from having multiple
parents, this could happen if an object is moved.
2022-09-08 11:06:15 -04:00
Jay Berkenbilt
dba61da1bf Create a special "destroyed" type rather than using null
When a QPDF is destroyed, changing indirect objects to direct nulls
makes them effectively disappear silently when they sneak into other
places. Instead, we should treat this as an error. Adding a destroyed
object type makes this possible.
2022-09-08 10:36:39 -04:00
Jay Berkenbilt
264e25f391 Clear owning QPDF information for all objects, not just indirect 2022-09-08 10:19:38 -04:00
Jay Berkenbilt
0132261ee0 Revert getOwningQPDF, and add getQPDF that returns a reference 2022-09-07 17:26:39 -04:00
Jay Berkenbilt
c1def4ead4 Implement QPDFObjectHandle equality 2022-09-06 18:34:23 -04:00
Jay Berkenbilt
259eec3a94 Clarify comments for QPDFObjectHandle::getOwningQPDF 2022-09-06 10:09:28 -04:00
Jay Berkenbilt
6c61be00e8 Rename QPDFObject -> QPDFValueProxy
This is in preparation for restoring a QPDFObject.hh to ease the
transition on qpdf_object_type_e.

This commit was created by
* Renaming QPDFObject.cc and QPDFObject.hh
* Replacing QPDFObject\b with QPDFValueProxy (where \b is word
  boundary)
* Running format-code
* Manually resorting files in libqpdf/CMakeLists.txt
* Manually refilling the comment in QPDF.hh near class Resolver
2022-09-05 18:52:59 -04:00
m-holger
9c86ba40d8 Fix commit 805c1ad : Reset QPDFValue::qpdf and QPDFValue::og when ...
On destruction of the QPDF object replace all indirect object references
with direct nulls.

Remove all existing code to release resolved references.

Fixes performance issue due to interaction of resetting QPDFValue::qpdf and
og members and prior code.
2022-09-04 10:41:18 +01:00
Jay Berkenbilt
f772c43de8 Stop including QPDFObject.hh from other than private files
This required moving some newly inlined functions back to the cc file,
but that seems to have had no measurable performance impact.
2022-09-01 18:19:47 -04:00
Jay Berkenbilt
b663926538 Remove QPDFObject::object_type_e as alias for qpdf_object_type_e 2022-09-01 18:11:22 -04:00
m-holger
2b7e9ba2f5 Remove methods and parameters obsoleted by the last two commits 2022-09-01 17:20:02 +01:00
m-holger
1bb40238e0 Add method QPDFObject::getObjGen and remove QPDFObjectHandle::og 2022-09-01 17:19:40 +01:00
m-holger
5033e3b215 Add method QPDFObject::getQPDF and remove QPDFObjectHandle::qpdf 2022-09-01 17:19:31 +01:00
m-holger
356b582cec Remove QPDFObjectHandle::newIndirect
Modify QPDFParser::parse to call QPDF::getObject instead.
2022-09-01 16:59:01 +01:00
m-holger
23d50a2f14 Remove QPDFObjectHandle::initialized 2022-09-01 14:29:38 +01:00
m-holger
114bffa089 Add private methods QPDFObjectHandle::asArray etc
Centralise casting of QPDFObjects and reduce repeated dereferencing.
2022-09-01 00:10:04 +01:00
m-holger
2a2eebcaea Modify newIndirect to set QPDFObjectHandle::obj 2022-08-31 22:47:11 +01:00
m-holger
16841bec32 Remove QPDFObjectHandle::makeReserved 2022-08-31 22:46:55 +01:00
m-holger
07b66eb0b6 Remove QPDFObjectHandle::reserved 2022-08-31 22:46:25 +01:00
m-holger
9532dca3a5 Inline QPDFObjectHandle::setParsedOffset
Part of #729
2022-08-30 14:55:45 +01:00
m-holger
6fc982b71a Move QPDFObjectHandle::setObjectDescriptionFromInput to QPDFParser
Part of #729
2022-08-30 06:42:46 +01:00
m-holger
6670c685ab Move QPDFObjectHandle::parseInternal to new class QPDFParser
Part of #729
2022-08-30 05:56:23 +01:00
m-holger
c53d54b13d Add optional parameter allow_nullptr to QPDFObjectHandle::getOwningQPDF
Also, inline method and add optional parameter error_msg.
2022-08-28 22:15:59 +01:00
m-holger
407b0766b8 Inline QPDFObjectHandle::getObjGen etc
Also, make QPDFObjectHandle::isIndirect const.
2022-08-01 15:08:48 +01:00
Jay Berkenbilt
b3e6d445cb Tweak "AndGet" mutator functions again
Remove any ambiguity around whether old or new value is being
returned.
2022-07-24 15:42:23 -04:00
m-holger
8b4afa428e Revert making second parameter of QPDFObjGen::QPDFObjGen optional
Also, change test for QPDFObjGen::isIndirect to obj != 0.
Delete comment from commit afd35f9.
2022-07-24 16:55:10 +01:00
m-holger
afd35f9a30 Overload StreamDataProvider::provideStreamData
Use 'QPDFObjGen const&' instead of 'int, int' in signature.
2022-07-24 16:02:35 +01:00
m-holger
3404ca8ac8 QPDFObjGen : tidy QPDFObjectHandle private methods
Change method signature to use QPDFObjGen.
2022-07-24 15:59:49 +01:00
m-holger
b123f79dfd Replace QPDFObjectHandle::objid and generation with QPDFObjectHandle::og 2022-07-24 15:59:49 +01:00