aboutsummaryrefslogtreecommitdiffstats
path: root/libqpdf/QPDF_Stream.cc
AgeCommit message (Collapse)Author
2024-02-16Add new writeJSON methodsm-holger
Create an alternative to getJSON to allow an object handle to be written as JSON without the overhead of creating a JSON object.
2023-11-26Refactor QPDF_Stream::getStreamJSONm-holger
2023-05-27Code tidy - reflow comments and stringsm-holger
2023-05-21Rerun clang-formatJay Berkenbilt
2023-05-20Replace 'virtual' specifier with 'override'm-holger
2023-05-20Use auto when initializing with a castm-holger
2023-02-18Change type of QPDFValue::object_description to std::shared_ptr<std::variant>m-holger
Also, name the type QPDFValue::Description.
2022-12-31Refactor QPDFValue::getDescriptionm-holger
Remove parameters and return the description.
2022-12-31Make QPDFValue::object_description a shared pointerm-holger
2022-12-31Refactor QPDFParser::setDescriptionFromInput and rename to setDescriptionm-holger
Set parsed offset at the same time as setting description.
2022-11-20Refactor QPDFObjectHandle::copyObject1m-holger
2022-11-20Rename QPDFObject::shallowCopy to copym-holger
Add optional parameter shallow. Change logic errors to runtime errors.
2022-11-19Remove QPDF_Stream::getOffset and QPDF_Stream::setObjGenm-holger
2022-11-19Remove QPDF_Stream::offsetm-holger
2022-11-19Remove redundant parameters from QPDF_Stream::warnm-holger
2022-11-19Remove QPDF_Stream qpdf and og data membersm-holger
2022-10-08Fix stray formatting errorJay Berkenbilt
2022-10-03Fix typos in error messagem-holger
2022-09-21Replace calls to QUtil::int_to_string with std::to_stringm-holger
2022-09-08Rename QPDFValueProxy back to QPDFObjectJay Berkenbilt
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-08Change reset to disconnect and clarify commentsJay Berkenbilt
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-08Clear owning QPDF information for all objects, not just indirectJay Berkenbilt
2022-09-06Rename QPDFObject -> QPDFValueProxyJay Berkenbilt
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-04Fix commit 805c1ad : Reset QPDFValue::qpdf and QPDFValue::og when ...m-holger
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-01Remove virtual methods QPDFValue::getTypeCode and getTypeNamem-holger
2022-09-01Split QPDFObject into QPDFObject and QPDFValuem-holger
2022-07-26Code tidy : replace 0 with nullptr or truem-holger
2022-07-24Overload StreamDataProvider::provideStreamDatam-holger
Use 'QPDFObjGen const&' instead of 'int, int' in signature.
2022-07-24QPDFObjGen : tidy QPDF_Streamm-holger
Change method signatures to use QPDFObjGen. Replace QPDF_Stream::objid and generation with QPDF_Stream::og.
2022-07-24QPDFObjGen : tidy QPDF private methodsm-holger
Change method signatures to use QPDFObjGen. Use QPDFObjGen methods where possible. Remove redundant QPDF::objGenToIndirect.
2022-07-24Add optional parameter separator to QPDFObjGen::unparsem-holger
Also, revert inlining of unparse and operator << from commit 4c6640c in order to avoid exposing QUtil.
2022-06-27Run format-codeJay Berkenbilt
2022-06-27Refactor QPDFObject creation and cloningm-holger
Move responsibility for creating shared pointers to objects and cloning from QPDFObjectHandle to QPDFObject.
2022-06-25Remove QPDF_Stream::setStreamDescriptionm-holger
2022-05-20Bug fix: don't clobber stream length with replaceDictJay Berkenbilt
2022-05-20replaceStreamData: accept uninitialized filter/decode_parmsJay Berkenbilt
These mean to leave the original values alone. This is needed for reconstructing streams from JSON given that the stream data and stream dictionary may appear in any order in the JSON.
2022-05-20Back out fluent QPDFObjectHandle methods. Keep the andGet methods.Jay Berkenbilt
I decided these were confusing and inconsistent with how JSON works. They muddle the API rather than improving it.
2022-05-08Implement JSON v2 outputJay Berkenbilt
2022-05-08Implement JSON v2 for StreamJay Berkenbilt
Not fully exercised in this commit
2022-05-07Prepare code for JSON v2Jay Berkenbilt
Update getJSON() methods and calls to them
2022-04-30Formatting: remove space in range-style for loopsJay Berkenbilt
Change .clang-format and commit automated changes from a fresh run of format-code
2022-04-30Use fluent replaceKeyJay Berkenbilt
2022-04-24Deprecate replaceOrRemoveKey -- it's the same as replaceKeyJay Berkenbilt
2022-04-24Have dictionary/streams mutators take const& where possibleJay Berkenbilt
2022-04-24Add new QPDF::warn that takes most of QPDFExc's argumentsJay Berkenbilt
2022-04-16Use anonymous namespaces for file-private classesJay Berkenbilt
2022-04-16Use = default and = delete where possible in classesJay Berkenbilt
2022-04-09Replace PointerHolder with std::shared_ptr in library sources onlyJay Berkenbilt
(patrepl and cleanpatch are my own utilities) patrepl s/PointerHolder/std::shared_ptr/g {include,libqpdf}/qpdf/*.hh patrepl s/PointerHolder/std::shared_ptr/g libqpdf/*.cc patrepl s/make_pointer_holder/std::make_shared/g libqpdf/*.cc patrepl s/make_array_pointer_holder/QUtil::make_shared_array/g libqpdf/*.cc patrepl s,qpdf/std::shared_ptr,qpdf/PointerHolder, **/*.cc **/*.hh git restore include/qpdf/PointerHolder.hh cleanpatch ./format-code
2022-04-04Programmatically apply new formatting to codeJay Berkenbilt
Run this: for i in **/*.cc **/*.c **/*.h **/*.hh; do clang-format < $i >| $i.new && mv $i.new $i done
2022-02-08WHITESPACE ONLY -- expand tabs in source codeJay Berkenbilt
This comment expands all tabs using an 8-character tab-width. You should ignore this commit when using git blame or use git blame -w. In the early days, I used to use tabs where possible for indentation, since emacs did this automatically. In recent years, I have switched to only using spaces, which means qpdf source code has been a mixture of spaces and tabs. I have avoided cleaning this up because of not wanting gratuitous whitespaces change to cloud the output of git blame, but I changed my mind after discussing with users who view qpdf source code in editors/IDEs that have other tab widths by default and in light of the fact that I am planning to start applying automatic code formatting soon.