Commit 070b38bf25ca298c0048241d6f0d2e973d6003d1
1 parent
0885a160
Move `reconstructed_xref` to `QPDF::Doc` and update references
Relocate `reconstructed_xref` to `QPDF::Doc` for improved encapsulation of cross-reference reconstruction state. Adjust all references to use the updated placement.
Showing
4 changed files
with
6 additions
and
5 deletions
include/qpdf/QPDF.hh
libqpdf/NNTree.cc
| ... | ... | @@ -30,7 +30,7 @@ void |
| 30 | 30 | NNTreeImpl::warn(QPDFObjectHandle const& node, std::string const& msg) |
| 31 | 31 | { |
| 32 | 32 | qpdf.warn(qpdf_e_damaged_pdf, get_description(node), 0, msg); |
| 33 | - if (++error_count > 5 && qpdf.reconstructed_xref()) { | |
| 33 | + if (++error_count > 5 && qpdf.doc().reconstructed_xref()) { | |
| 34 | 34 | error(node, "too many errors - giving up"); |
| 35 | 35 | } |
| 36 | 36 | } | ... | ... |
libqpdf/QPDFParser.cc
libqpdf/qpdf/QPDF_private.hh
| ... | ... | @@ -364,6 +364,8 @@ class QPDF::Doc |
| 364 | 364 | { |
| 365 | 365 | } |
| 366 | 366 | |
| 367 | + bool reconstructed_xref() const; | |
| 368 | + | |
| 367 | 369 | QPDFAcroFormDocumentHelper& |
| 368 | 370 | acroform() |
| 369 | 371 | { |
| ... | ... | @@ -523,9 +525,9 @@ class QPDF::Doc::Resolver |
| 523 | 525 | }; |
| 524 | 526 | |
| 525 | 527 | inline bool |
| 526 | -QPDF::reconstructed_xref() const | |
| 528 | +QPDF::Doc::reconstructed_xref() const | |
| 527 | 529 | { |
| 528 | - return m->reconstructed_xref; | |
| 530 | + return m.reconstructed_xref; | |
| 529 | 531 | } |
| 530 | 532 | |
| 531 | 533 | inline QPDF::Doc& | ... | ... |