diff options
author | Jay Berkenbilt <ejb@ql.org> | 2022-06-25 19:55:45 +0200 |
---|---|---|
committer | Jay Berkenbilt <ejb@ql.org> | 2022-06-25 19:55:45 +0200 |
commit | 0c7c7e4ba485fd39f5b6d41fa2924c607d2eeda0 (patch) | |
tree | 2aff155bc6bac1e5a748262203a18c45096020c7 /include | |
parent | 25aff0bd52b0382b9349c81aaabc2fde51528923 (diff) | |
download | qpdf-0c7c7e4ba485fd39f5b6d41fa2924c607d2eeda0.tar.zst |
Track whether certain page modifying methods have been called
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.
Diffstat (limited to 'include')
-rw-r--r-- | include/qpdf/QPDF.hh | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/include/qpdf/QPDF.hh b/include/qpdf/QPDF.hh index 52bc3579..f0c9f6b4 100644 --- a/include/qpdf/QPDF.hh +++ b/include/qpdf/QPDF.hh @@ -709,6 +709,11 @@ class QPDF QPDF_DLL std::vector<QPDFObjectHandle> const& getAllPages(); + QPDF_DLL + bool everCalledGetAllPages() const; + QPDF_DLL + bool everPushedInheritedAttributesToPages() const; + // These methods, given a page object or its object/generation // number, returns the 0-based index into the array returned by // getAllPages() for that page. An exception is thrown if the page @@ -1690,6 +1695,8 @@ class QPDF std::vector<QPDFObjectHandle> all_pages; std::map<QPDFObjGen, int> pageobj_to_pages_pos; bool pushed_inherited_attributes_to_pages; + bool ever_pushed_inherited_attributes_to_pages; + bool ever_called_get_all_pages; std::vector<QPDFExc> warnings; std::map<unsigned long long, ObjCopier> object_copiers; std::shared_ptr<QPDFObjectHandle::StreamDataProvider> copied_streams; |