2
1
mirror of https://github.com/qpdf/qpdf.git synced 2024-06-01 01:40:51 +00:00
Commit Graph

27 Commits

Author SHA1 Message Date
m-holger
9589fad1e5 Reimplement QPDFObjectHandle::getJSON in terms of writeJSON 2024-02-16 11:00:20 +00:00
m-holger
e2737ab646 Add new writeJSON methods
Create an alternative to getJSON to allow an object handle to be written as JSON without the overhead of creating a JSON object.
2024-02-16 10:51:25 +00:00
Jay Berkenbilt
60965d5f4d Rerun clang-format 2023-05-21 13:35:09 -04:00
m-holger
1496472e1c Add method QPDFValue::setChildDescription 2023-02-18 08:35:45 +00:00
m-holger
da14ab4dc7 Move definition of QPDF::JSONReactor into QPDF_json
Allow access to private header files when defining data members.
2023-02-18 08:33:08 +00:00
m-holger
dab27c9bb3 Refactor setting of object descriptions in QPDF::JSONReactor 2023-02-18 08:33:08 +00:00
m-holger
fe74f28dc4 Refactor QPDFValue::setDefaultDescription 2023-02-18 08:33:08 +00:00
m-holger
f989de1bd7 Remove restriction that only owned objects can have descriptions 2023-02-18 08:33:08 +00:00
m-holger
32907fc14c Change type of QPDFValue::object_description to std::shared_ptr<std::variant>
Also, name the type QPDFValue::Description.
2023-02-18 08:33:08 +00:00
m-holger
d58ec90310 Un-inline QPDFValue::getDescription 2023-02-18 08:33:08 +00:00
m-holger
ec35156ab0 Refactor QPDFValue::getDescription
Remove parameters and return the description.
2022-12-31 10:23:59 -05:00
m-holger
0ef2def8ad Delay adding offsets to object descriptions until necessary 2022-12-31 10:23:59 -05:00
m-holger
c833c25499 Delay adding ObjGen to object descriptions until necessary 2022-12-31 10:23:59 -05:00
m-holger
e684d8169b Make QPDFValue::object_description a shared pointer 2022-12-31 10:23:59 -05:00
m-holger
218f069a69 Add new method QPDFObject::setDefaultDescription 2022-12-31 10:23:59 -05:00
m-holger
d03ca88275 Refactor QPDFParser::setDescriptionFromInput and rename to setDescription
Set parsed offset at the same time as setting description.
2022-12-31 10:23:59 -05:00
m-holger
6cbc55a5b5 Add new virtual method QPDFObject::getStringValue
Avoid dynamic casting.
2022-12-31 09:31:07 -05:00
m-holger
dbc5f07b90 Rename QPDFObject::shallowCopy to copy
Add optional parameter shallow. Change logic errors to runtime errors.
2022-11-20 12:07:22 -05:00
m-holger
6350cf16e6 Remove QPDF_Stream::offset 2022-11-19 14:10:42 -05: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
264e25f391 Clear owning QPDF information for all objects, not just indirect 2022-09-08 10:19:38 -04:00
Jay Berkenbilt
4422588d7d Remove unneeded owning_qpdf from QPDFValue
The qpdf member was already sufficient. Removing this actually fixed a
few pre-existing issues around detecting foreign ownership and
allowing certain conditions to be warnings rather than exceptions.
2022-09-08 10:19:38 -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
c510c01568 Remove copyright banner from newly private header files
We don't put specific copyright banners on files that aren't installed.
2022-09-01 18:19:47 -04:00
Jay Berkenbilt
1d57772b76 Remove QPDFObject and QPDFValue from public include directory 2022-09-01 18:19:47 -04:00