2
1
mirror of https://github.com/qpdf/qpdf.git synced 2024-11-02 19:49:43 +00:00
Commit Graph

2373 Commits

Author SHA1 Message Date
Jay Berkenbilt
ab9d557cb0 Use fluent replaceKey 2022-04-29 20:39:54 -04:00
Jay Berkenbilt
d8fdf632a9 Use replaceKeyAndGet in a few places in existing code 2022-04-29 20:28:02 -04:00
Jay Berkenbilt
e80fad86e9 Add new QPDFObjectHandle methods for more fluent programming 2022-04-29 20:09:10 -04:00
Jay Berkenbilt
ff73d71ec8 Fix TODO typos 2022-04-29 19:06:27 -04:00
Jay Berkenbilt
d0b7cc8ac6 QPDFJob json: make removeAttachment take an array (fixes #693) 2022-04-24 13:06:19 -04:00
Jay Berkenbilt
63c5a56f38 Fix build logic around generate_auto_job
It was being run at configuration time, not build time.
2022-04-24 13:06:16 -04:00
Jay Berkenbilt
08ba21cf49 Fix some bugs around null values in dictionaries
Make it so that a key with a null value is always treated as not being
present. This was inconsistent before.
2022-04-24 10:08:32 -04:00
Jay Berkenbilt
4be2f36049 Deprecate replaceOrRemoveKey -- it's the same as replaceKey 2022-04-24 09:31:32 -04:00
Jay Berkenbilt
b8d0b0b638 Re-add accidentally removed qpdf.testcov 2022-04-24 09:18:04 -04:00
Jay Berkenbilt
4925f0d18c Have dictionary/streams mutators take const& where possible 2022-04-24 09:05:50 -04:00
Jay Berkenbilt
68e721981a Add new QPDF::warn that takes most of QPDFExc's arguments 2022-04-23 18:25:43 -04:00
Jay Berkenbilt
696ca53205 TODO note about default output streams for QPDFJob 2022-04-23 18:25:43 -04:00
Jay Berkenbilt
22b35c4928 Expose QUtil::get_next_utf8_codepoint 2022-04-23 18:25:43 -04:00
Jay Berkenbilt
5bbb0d4c30 Replace switch statements with static map initializers
Character transcoding from Unicode to single-byte characters used
hard-coded switch statements because the code predated our adoption of
C++11. Now we have thread-safe, static initialization of map literals,
so use that instead.
2022-04-23 18:25:43 -04:00
Jay Berkenbilt
37f05e67d8 Remove AttributeMacros from .clang-format
I was using AttributeMacros incorrectly, and a recent update to
clang-format broke the formatting.
2022-04-23 17:11:38 -04:00
Jay Berkenbilt
7a20878fdf Mention "Wrappers" wiki page 2022-04-23 17:11:38 -04:00
Jay Berkenbilt
ce5c3bcad8 QPDFJob: pass capture output streams through to underlying QPDF 2022-04-18 11:24:17 -04:00
Jay Berkenbilt
877694a583 Decide against adding handleWarning back to ParserCallbacks 2022-04-16 13:41:53 -04:00
Jay Berkenbilt
75fe4f60c3 Use anonymous namespaces for file-private classes 2022-04-16 13:35:27 -04:00
Jay Berkenbilt
38edca820e Clarify note in TODO 2022-04-16 13:16:06 -04:00
Jay Berkenbilt
80ed3076a0 Remove deprecated name/number tree constructors
Remove the name/number tree object helper constructors that don't take
a QPDF&.
2022-04-16 13:13:15 -04:00
Jay Berkenbilt
496ca2e4dc Remove QPDFAcroFormDocumentHelper::copyFieldsFromForeignPage 2022-04-16 13:12:07 -04:00
Jay Berkenbilt
6df6260751 Change default --json from 1 to latest 2022-04-16 12:57:33 -04:00
Jay Berkenbilt
fc1bfe4a66 Add ChangeLog entries and release notes for previous work 2022-04-16 12:52:59 -04:00
Jay Berkenbilt
cdd0b4fb7d Use = default and = delete where possible in classes 2022-04-16 11:39:14 -04:00
Jay Berkenbilt
2a7d2b63c2 Make ABI-breaking changes that don't modify API at all
* Merge overloaded functions by adding default values
* Remove non-const methods that are identical to const methods
2022-04-16 10:41:46 -04:00
Jay Berkenbilt
dd35966367 Remove remaining cmake steps from TODO 2022-04-10 17:57:26 -04:00
Jay Berkenbilt
e2d6f035c0 Fix comments in PointerHolder.hh 2022-04-10 17:33:25 -04:00
Jay Berkenbilt
a249f89715 Typo: warn -> warning 2022-04-10 17:27:30 -04:00
Jay Berkenbilt
ce86307a1a Fix typo in error message 2022-04-10 16:54:23 -04:00
Jay Berkenbilt
5f4675bb24 Mark non-ABI symbols in exported class with QPDF_DLL_PRIVATE 2022-04-10 16:54:23 -04:00
Jay Berkenbilt
5525c93124 Use QPDF_DLL_CLASS with Pipeline and InputSource subclasses
This enables RTTI so we can use dynamic_cast on them across the shared
object boundary.
2022-04-10 16:52:57 -04:00
Jay Berkenbilt
90cfe80bac Clean up/fix DLL.h
* Change DLL_EXPORT to libqpdf_EXPORTS (internal to the build). The
  new name is cmake's default, is more conventional, and is less
  likely to clash with other symbols.
* Add QPDF_DLL_PRIVATE for non-Windows
* Make logic around when to define QPDF_DLL et al more explicit
* Add detailed comments
2022-04-10 16:52:36 -04:00
Jay Berkenbilt
8c504c9a90 Tweak for clang-format and emacs font-lock 2022-04-10 12:49:50 -04:00
Jay Berkenbilt
07edf96440 Remove methods of private classes from ABI
Prior to the cmake conversion, several private classes had methods
that were exported into the shared library so they could be tested
with libtests. With cmake, we build libtests using an object library,
so this is no longer necessary. The methods that are disappearing from
the ABI were never exposed through public headers, so no code should
be using them. Removal had to wait until the window for ABI-breaking
changes was open.
2022-04-09 17:33:29 -04:00
Jay Berkenbilt
b6d1dffaaa Spell check 2022-04-09 17:33:29 -04:00
Jay Berkenbilt
c7e877b88b Update documentation for PointerHolder transition 2022-04-09 17:33:29 -04:00
Jay Berkenbilt
ef2b84c6c3 Enable PointerHolder warning and define POINTERHOLDER_IS_SHARED_POINTER 2022-04-09 17:33:29 -04:00
Jay Berkenbilt
128e41648f Remove PointerHolder.hh from other than public header files
Increase to POINTERHOLDER_TRANSITION=4
2022-04-09 17:33:29 -04:00
Jay Berkenbilt
ba0ef7a124 Replace PointerHolder with std::shared_ptr in the rest of the 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
2022-04-09 17:33:29 -04:00
Jay Berkenbilt
a68703b07e Replace PointerHolder with std::shared_ptr in library sources only
(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-09 17:33:29 -04:00
Jay Berkenbilt
ae819b5318 Rewrite PointerHolder as derived from std::shared_ptr 2022-04-09 17:33:29 -04:00
Jay Berkenbilt
ec21910066 Bump version to 11.0.0, indicating ABI-breaking changes 2022-04-09 17:33:29 -04:00
Jay Berkenbilt
37f7f57dc5 Don't hard-code soname in build-appimage 2022-04-09 17:33:29 -04:00
Jay Berkenbilt
08fb583449 Remove accidentally committed file 2022-04-09 14:37:00 -04:00
Jay Berkenbilt
05de8a111a Add formatting code to release checklist 2022-04-09 12:39:32 -04:00
Jay Berkenbilt
59834db472 Add documentation for code formatting and contribution guidelines 2022-04-09 12:25:08 -04:00
Jay Berkenbilt
ece6b6feb4 Add format-code script 2022-04-09 11:56:30 -04:00
Jay Berkenbilt
554a870b81 spell-check: quote wildcards 2022-04-09 11:50:01 -04:00
Jay Berkenbilt
31a81f6bab Note about app-image build testing 2022-04-05 14:56:19 -04:00