aboutsummaryrefslogtreecommitdiffstats
path: root/libqpdf/QPDFPageObjectHelper.cc
AgeCommit message (Collapse)Author
2022-08-28Add optional parameter allow_nullptr to QPDFObjectHandle::getOwningQPDFm-holger
Also, inline method and add optional parameter error_msg.
2022-07-24Tweak "AndGet" mutator functions againJay Berkenbilt
Remove any ambiguity around whether old or new value is being returned.
2022-07-24Overload StreamDataProvider::provideStreamDatam-holger
Use 'QPDFObjGen const&' instead of 'int, int' in signature.
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-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-04Make use of the new Pipeline methods in some placesJay Berkenbilt
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-30Use replaceKeyAndGet in a few places in existing codeJay Berkenbilt
2022-04-16Use anonymous namespaces for file-private classesJay Berkenbilt
2022-04-16Use = default and = delete where possible in classesJay Berkenbilt
2022-04-16Make ABI-breaking changes that don't modify API at allJay Berkenbilt
* Merge overloaded functions by adding default values * Remove non-const methods that are identical to const methods
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.
2022-02-07Update for clean compile with POINTERHOLDER_TRANSITION=2Jay Berkenbilt
2022-02-05Add operator ""_qpdf for creating QPDFObjectHandle literalsJay Berkenbilt
2022-02-04Add a blank line after the first header included in each sourceJay Berkenbilt
2022-02-04PointerHolder: deprecate getPointer() and getRefcount()Jay Berkenbilt
Use get() and use_count() instead. Add #define NO_POINTERHOLDER_DEPRECATION to remove deprecation markers for these only. This commit also removes all deprecated PointerHolder API calls from qpdf's code except in PointerHolder's test suite, which must continue to test the deprecated APIs.
2022-01-27Remove some if statements and simplify some boolean expressionsm-holger
Use QPDFObjectHandle::isNameAndEquals, isDictionaryOfType and isStreamOfType.
2021-03-04Don't use handleWarning, which is being revertedJay Berkenbilt
2021-03-04Major rework of handling form fields when copying pages (fixes #509)Jay Berkenbilt
2021-03-03Remove unreferenced: ignore names that are not Fonts or XObjectsJay Berkenbilt
Converted ResourceFinder to ParserCallbacks so we can better detect the name that precedes various operators and use the operators to sort the names into resource types. This enables us to be smarter about detecting unreferenced resources in pages and also sets the stage for reconciling differences in /DR across documents.
2021-03-03Create ResourceFinder from NameWatcher in QPDFPageObjectHelperJay Berkenbilt
2021-02-23Remove warning that gives false positives in some normal casesJay Berkenbilt
2021-02-23Add new placeFormXObject that takes a matrix referenceJay Berkenbilt
2021-02-23Add copyAnnotations, use with overlay/underlay (fixes #395)Jay Berkenbilt
2021-02-21Add transformAnnotations and fix flattenRotations to use itJay Berkenbilt
2021-02-21Explicitly override inherited rotate in flattenRotationsJay Berkenbilt
2021-02-21Use QPDFMatrix inside flattenRotationsJay Berkenbilt
2021-02-18Add QPDFPageObjectHelper::getMatrixForFormXObjectPlacementJay Berkenbilt
2021-02-03Handle older PDFs whose form XObjects inherit resources (fixes #494)Jay Berkenbilt
When removing unreferenced resources, notice if a page (recursively) contains a form XObject with unreferenced resources, and count any such resources as referenced by the page.
2021-02-03Refactor removal of unreferenced resourcesJay Berkenbilt
Refactor in preparation for resolving unresolved resources in form xobjects from page.
2021-01-31Handle strings in inline image dictionariesJay Berkenbilt
We need to use token.getRawValue, not token.getValue
2021-01-31Recover from exceptions during filtering for inline imagesJay Berkenbilt
2021-01-04Spell checkJay Berkenbilt
2021-01-03Fix outdated commentJay Berkenbilt
2021-01-02Make more QPDFPageObjectHelper methods work with form XObjectJay Berkenbilt
2021-01-02Externalize inline images now includes form XObjectsJay Berkenbilt
2021-01-02Add several methods for working with form XObjects (fixes #436)Jay Berkenbilt
Make some more methods in QPDFPageObjectHelper work with form XObjects, provide forEach methods to walk through nested form XObjects, possibly recursively. This should make it easier to work with form XObjects from user code.
2021-01-02QPDFPageObjectHelper: filterPageContents -> filterContents + form XObjectJay Berkenbilt
2021-01-02QPDFPageObjectHelper: getPageImages -> getImagesJay Berkenbilt
2021-01-02QPDFPageObjectHelper::getPageImages: support form XObjectsJay Berkenbilt
2021-01-01Add QPDFObjectHandle::isFormXObjectJay Berkenbilt
2020-12-30Add QPDFPageObjectHelper::flattenRotation and --flatten-rotationJay Berkenbilt
2020-04-16Fix warnings reported by -Wshadow=local (fixes #431)Jay Berkenbilt
2020-04-04placeFormXObject: allow control of shrink/expand (fixes #409)Jay Berkenbilt
2020-04-03QPDFPageObjectHelper::placeFormXObject: use std::string const& (fixes #374)Jay Berkenbilt
2020-03-31Look in form XObjects when removing unreferenced resources (fixes #373)Jay Berkenbilt
If a page contains a form XObject, also filter the form XObject and remove its unreferenced resources.
2020-03-31Refactor QPDFPageObjectHelper::removeUnreferencedResources()Jay Berkenbilt
Refactor removeUnreferencedResources to prepare for filtering form XObjects.