-
… shared helper retrieval, validation methods, and update usages across the codebase. Remove unused test coverage entries.
-
This change updates all occurrences of `std::endl` to `\n` across various files for improved efficiency and consistency. It reduces unnecessary flushing of output buffers associated with `std::endl` while maintaining the same output format.
-
This improves indentation of long strings. This commit also fixes some trailing whitespace in ChangeLog.
-
Use 'QPDFObjGen const&' instead of 'int, int' in signature.
-
I decided these were confusing and inconsistent with how JSON works. They muddle the API rather than improving it.
-
Change .clang-format and commit automated changes from a fresh run of format-code
-
Increase to POINTERHOLDER_TRANSITION=3 patrepl s/PointerHolder/std::shared_ptr/g **/*.cc **/*.hh patrepl s/make_pointer_holder/std::make_shared/g **/*.cc patrepl s/make_array_pointer_holder/QUtil::make_shared_array/g **/*.cc patrepl s,qpdf/std::shared_ptr,qpdf/PointerHolder, **/*.cc **/*.hh git restore include/qpdf/PointerHolder.hh git restore libtests/pointer_holder.cc cleanpatch ./format-code
-
Add comments to force line breaks, parenthesize function arguments that are contatenated strings, etc. -- these kinds of changes improve clang-format's results and also cause emacs cc-mode to match clang-format. After this type of change, most of the time, when clang-format and emacs disagree, clang-format is better.
-
Run this: for i in **/*.cc **/*.c **/*.h **/*.hh; do clang-format < $i >| $i.new && mv $i.new $i done
-
The executables that libtool built invoked the underlying binary with an "lt-" prefix. The code contained numerous workarounds for testing, which can now be removed.
-
Convert loop to use range-based for statement. Remove unnecessary variables.
-
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.
-
None of these are in the public API.
-
Use QPDFObjectHandle::isNameAndEquals, isDictionaryOfType and isStreamOfType.
-
This makes all integer type conversions that have potential data loss explicit with calls that do range checks and raise an exception. After this commit, qpdf builds with no warnings when -Wsign-conversion -Wconversion is used with gcc or clang or when -W3 -Wd4800 is used with MSVC. This significantly reduces the likelihood of potential crashes from bogus integer values. There are some parts of the code that take int when they should take size_t or an offset. Such places would make qpdf not support files with more than 2^31 of something that usually wouldn't be so large. In the event that such a file shows up and is valid, at least qpdf would raise an error in the right spot so the issue could be legitimately addressed rather than failing in some weird way because of a silent overflow condition.
-
pdf-create now creates images with different color spaces and encoding schemes and verifies them for data correctness.
-
Move object parsing code from QPDF to QPDFObjectHandle and parameterize the parts of it that are specific to a QPDF object. Provide a version that can't handle indirect objects and that can be called on an arbitrary string. A side effect of this change is that the offset used when reporting invalid stream length has changed, but since the new value seems like a better value than the old one, the test suite has been updated rather than making the code backward compatible. This only effects the offset reported for invalid streams that lack /Length or have an invalid /Length key. Updated some test code and exmaples to use QPDFObjectHandle::parse. Supporting changes include adding a BufferInputSource constructor that takes a string.
-
Breaking API change: length parameter has disappeared from the StreamDataProvider version of QPDFObjectHandle::replaceStreamData since it is no longer necessary to compute it in advance. This breaking change is justified by the fact that removing the length parameter provides the caller an opportunity to simplify the calling code.
-
This makes the code simpler than having to create a buffer of a fixed size and copy the string to it.