diff options
Diffstat (limited to 'libqpdf')
-rw-r--r-- | libqpdf/QPDF.cc | 14 | ||||
-rw-r--r-- | libqpdf/QPDF_optimization.cc | 1 | ||||
-rw-r--r-- | libqpdf/QPDF_pages.cc | 1 |
3 files changed, 16 insertions, 0 deletions
diff --git a/libqpdf/QPDF.cc b/libqpdf/QPDF.cc index 2d92bf1d..b51c5571 100644 --- a/libqpdf/QPDF.cc +++ b/libqpdf/QPDF.cc @@ -222,6 +222,8 @@ QPDF::Members::Members() : attempt_recovery(true), encp(new EncryptionParameters), pushed_inherited_attributes_to_pages(false), + ever_pushed_inherited_attributes_to_pages(false), + ever_called_get_all_pages(false), copied_stream_data_provider(0), reconstructed_xref(false), fixed_dangling_refs(false), @@ -2879,3 +2881,15 @@ QPDF::stopOnError(std::string const& message) this->m->file->getLastOffset(), message); } + +bool +QPDF::everCalledGetAllPages() const +{ + return this->m->ever_called_get_all_pages; +} + +bool +QPDF::everPushedInheritedAttributesToPages() const +{ + return this->m->ever_pushed_inherited_attributes_to_pages; +} diff --git a/libqpdf/QPDF_optimization.cc b/libqpdf/QPDF_optimization.cc index da0db663..1fd6da6f 100644 --- a/libqpdf/QPDF_optimization.cc +++ b/libqpdf/QPDF_optimization.cc @@ -162,6 +162,7 @@ QPDF::pushInheritedAttributesToPage(bool allow_changes, bool warn_skipped_keys) " pushing inherited attributes to pages"); } this->m->pushed_inherited_attributes_to_pages = true; + this->m->ever_pushed_inherited_attributes_to_pages = true; } void diff --git a/libqpdf/QPDF_pages.cc b/libqpdf/QPDF_pages.cc index bfd593a2..bd3f80a6 100644 --- a/libqpdf/QPDF_pages.cc +++ b/libqpdf/QPDF_pages.cc @@ -54,6 +54,7 @@ QPDF::getAllPages() // Note that pushInheritedAttributesToPage may also be used to // initialize this->m->all_pages. if (this->m->all_pages.empty()) { + this->m->ever_called_get_all_pages = true; std::set<QPDFObjGen> visited; std::set<QPDFObjGen> seen; QPDFObjectHandle pages = getRoot().getKey("/Pages"); |