Age | Commit message (Collapse) | Author |
|
Removing an element from a set with iterator is constant time, and
std::set specifies that other operations on the set do not invalidate
existing iterators.
|
|
|
|
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.
|
|
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
|
|
|
|
|
|
Tidy QPDF::getAllPagesInternal and QPDF::pushInheritedAttributesToPageInternal
|
|
|
|
|
|
Add a new obj_cache entry or update an existing entry in place.
|
|
|
|
Also change QPDF::replaceObject and QPDF::swapObjects such that the
QPDFObject assigned to an og in the obj_cache is never replaced; only
QPDFObject::value is updated.
|
|
|
|
Part of #729
|
|
|
|
For consistency with similar methods, e.g. replaceObject.
|
|
Remove unnecessary parameters.
Remove code that is unnecessary as result of a prior call to QPDF::getAllPages.
Avoid clearing and rebuilding of m->all_pages.
|
|
|
|
|
|
Now --json-output just changes defaults. Allow output file with --json.
|
|
|
|
from "qpdf-v2" to "qpdf": [..., ...]
|
|
Add additional parameters that will be needed to call QPDF::writeJSON
in partial mode.
|
|
Use 'QPDFObjGen const&' instead of 'int, int' in signature.
|
|
Change method signatures to use QPDFObjGen.
Use QPDFObjGen methods where possible.
Remove redundant QPDF::objGenToIndirect.
|
|
Change method signature to use QPDFObjGen.
|
|
We need to know whether pushInheritedAttributesToPage or getAllPages
have been called when generating JSON output. When reading the JSON
back in, we have to call the same methods so that object numbers will
line up properly.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
* Replace --create-from-json=file with --json-input, which causes the
regular input to be treated as json.
* Eliminate --to-json
* In --json=2, bring back "objects" and eliminate "objectinfo". Stream
data is never present.
* In --json-output=2, write "qpdf-v2" with "objects" and include
stream data.
|
|
There are no automated tests yet, but committing work so far in
preparation for some refactoring.
|
|
|
|
|
|
|
|
|
|
Also add stubs for top-level QPDF methods (createFromJSON,
updateFromJSON)
|
|
|
|
|
|
* Merge overloaded functions by adding default values
* Remove non-const methods that are identical to const methods
|
|
(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
|
|
Run this:
for i in **/*.cc **/*.c **/*.h **/*.hh; do
clang-format < $i >| $i.new && mv $i.new $i
done
|
|
|
|
|
|
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.
|
|
|