From 50f21ae759941d89d2bb2561daf491bf1403f907 Mon Sep 17 00:00:00 2001 From: m-holger Date: Mon, 6 Oct 2025 10:56:04 +0100 Subject: [PATCH] Rename `pages` to `page_dh` in `QPDF::Doc` and update references --- include/qpdf/QPDF.hh | 8 -------- libqpdf/QPDFJob.cc | 2 +- libqpdf/QPDFPageDocumentHelper.cc | 2 +- libqpdf/qpdf/QPDF_private.hh | 15 ++++++++++----- 4 files changed, 12 insertions(+), 15 deletions(-) diff --git a/include/qpdf/QPDF.hh b/include/qpdf/QPDF.hh index 40acb76..05c801e 100644 --- a/include/qpdf/QPDF.hh +++ b/include/qpdf/QPDF.hh @@ -49,19 +49,11 @@ namespace qpdf { class Dictionary; - - namespace is - { - class OffsetBuffer; - } } // namespace qpdf -class QPDF_Stream; class BitStream; class BitWriter; -class BufferInputSource; class QPDFLogger; -class QPDFParser; class QPDF { diff --git a/libqpdf/QPDFJob.cc b/libqpdf/QPDFJob.cc index 03fa56d..cdcadc9 100644 --- a/libqpdf/QPDFJob.cc +++ b/libqpdf/QPDFJob.cc @@ -764,7 +764,7 @@ QPDFJob::doCheck(QPDF& pdf) // Create all document helper to trigger any validations they carry out. auto& doc = pdf.doc(); - auto& pages = doc.pages(); + auto& pages = doc.page_dh(); (void)doc.acroform(); (void)doc.embedded_files(); (void)doc.page_labels(); diff --git a/libqpdf/QPDFPageDocumentHelper.cc b/libqpdf/QPDFPageDocumentHelper.cc index 8985afc..8f1c323 100644 --- a/libqpdf/QPDFPageDocumentHelper.cc +++ b/libqpdf/QPDFPageDocumentHelper.cc @@ -18,7 +18,7 @@ QPDFPageDocumentHelper::QPDFPageDocumentHelper(QPDF& qpdf) : QPDFPageDocumentHelper& QPDFPageDocumentHelper::get(QPDF& qpdf) { - return qpdf.doc().pages(); + return qpdf.doc().page_dh(); } void diff --git a/libqpdf/qpdf/QPDF_private.hh b/libqpdf/qpdf/QPDF_private.hh index 5b44b1f..ab103bc 100644 --- a/libqpdf/qpdf/QPDF_private.hh +++ b/libqpdf/qpdf/QPDF_private.hh @@ -13,6 +13,11 @@ using namespace qpdf; +namespace qpdf::is +{ + class OffsetBuffer; +} // namespace qpdf::is + class QPDF::ObjCache { public: @@ -610,12 +615,12 @@ class QPDF::Doc } QPDFPageDocumentHelper& - pages() + page_dh() { - if (!pages_) { - pages_ = std::make_unique(qpdf); + if (!page_dh_) { + page_dh_ = std::make_unique(qpdf); } - return *pages_; + return *page_dh_; } QPDFPageLabelDocumentHelper& @@ -637,7 +642,7 @@ class QPDF::Doc std::unique_ptr acroform_; std::unique_ptr embedded_files_; std::unique_ptr outlines_; - std::unique_ptr pages_; + std::unique_ptr page_dh_; std::unique_ptr page_labels_; }; -- libgit2 0.21.4