Commit 50f21ae759941d89d2bb2561daf491bf1403f907
1 parent
988a63cc
Rename `pages` to `page_dh` in `QPDF::Doc` and update references
Refactor `pages` method and related members in `QPDF::Doc` to `page_dh`. Update all associated references to reflect the change.
Showing
4 changed files
with
12 additions
and
15 deletions
include/qpdf/QPDF.hh
| @@ -49,19 +49,11 @@ | @@ -49,19 +49,11 @@ | ||
| 49 | namespace qpdf | 49 | namespace qpdf |
| 50 | { | 50 | { |
| 51 | class Dictionary; | 51 | class Dictionary; |
| 52 | - | ||
| 53 | - namespace is | ||
| 54 | - { | ||
| 55 | - class OffsetBuffer; | ||
| 56 | - } | ||
| 57 | } // namespace qpdf | 52 | } // namespace qpdf |
| 58 | 53 | ||
| 59 | -class QPDF_Stream; | ||
| 60 | class BitStream; | 54 | class BitStream; |
| 61 | class BitWriter; | 55 | class BitWriter; |
| 62 | -class BufferInputSource; | ||
| 63 | class QPDFLogger; | 56 | class QPDFLogger; |
| 64 | -class QPDFParser; | ||
| 65 | 57 | ||
| 66 | class QPDF | 58 | class QPDF |
| 67 | { | 59 | { |
libqpdf/QPDFJob.cc
| @@ -764,7 +764,7 @@ QPDFJob::doCheck(QPDF& pdf) | @@ -764,7 +764,7 @@ QPDFJob::doCheck(QPDF& pdf) | ||
| 764 | 764 | ||
| 765 | // Create all document helper to trigger any validations they carry out. | 765 | // Create all document helper to trigger any validations they carry out. |
| 766 | auto& doc = pdf.doc(); | 766 | auto& doc = pdf.doc(); |
| 767 | - auto& pages = doc.pages(); | 767 | + auto& pages = doc.page_dh(); |
| 768 | (void)doc.acroform(); | 768 | (void)doc.acroform(); |
| 769 | (void)doc.embedded_files(); | 769 | (void)doc.embedded_files(); |
| 770 | (void)doc.page_labels(); | 770 | (void)doc.page_labels(); |
libqpdf/QPDFPageDocumentHelper.cc
| @@ -18,7 +18,7 @@ QPDFPageDocumentHelper::QPDFPageDocumentHelper(QPDF& qpdf) : | @@ -18,7 +18,7 @@ QPDFPageDocumentHelper::QPDFPageDocumentHelper(QPDF& qpdf) : | ||
| 18 | QPDFPageDocumentHelper& | 18 | QPDFPageDocumentHelper& |
| 19 | QPDFPageDocumentHelper::get(QPDF& qpdf) | 19 | QPDFPageDocumentHelper::get(QPDF& qpdf) |
| 20 | { | 20 | { |
| 21 | - return qpdf.doc().pages(); | 21 | + return qpdf.doc().page_dh(); |
| 22 | } | 22 | } |
| 23 | 23 | ||
| 24 | void | 24 | void |
libqpdf/qpdf/QPDF_private.hh
| @@ -13,6 +13,11 @@ | @@ -13,6 +13,11 @@ | ||
| 13 | 13 | ||
| 14 | using namespace qpdf; | 14 | using namespace qpdf; |
| 15 | 15 | ||
| 16 | +namespace qpdf::is | ||
| 17 | +{ | ||
| 18 | + class OffsetBuffer; | ||
| 19 | +} // namespace qpdf::is | ||
| 20 | + | ||
| 16 | class QPDF::ObjCache | 21 | class QPDF::ObjCache |
| 17 | { | 22 | { |
| 18 | public: | 23 | public: |
| @@ -610,12 +615,12 @@ class QPDF::Doc | @@ -610,12 +615,12 @@ class QPDF::Doc | ||
| 610 | } | 615 | } |
| 611 | 616 | ||
| 612 | QPDFPageDocumentHelper& | 617 | QPDFPageDocumentHelper& |
| 613 | - pages() | 618 | + page_dh() |
| 614 | { | 619 | { |
| 615 | - if (!pages_) { | ||
| 616 | - pages_ = std::make_unique<QPDFPageDocumentHelper>(qpdf); | 620 | + if (!page_dh_) { |
| 621 | + page_dh_ = std::make_unique<QPDFPageDocumentHelper>(qpdf); | ||
| 617 | } | 622 | } |
| 618 | - return *pages_; | 623 | + return *page_dh_; |
| 619 | } | 624 | } |
| 620 | 625 | ||
| 621 | QPDFPageLabelDocumentHelper& | 626 | QPDFPageLabelDocumentHelper& |
| @@ -637,7 +642,7 @@ class QPDF::Doc | @@ -637,7 +642,7 @@ class QPDF::Doc | ||
| 637 | std::unique_ptr<QPDFAcroFormDocumentHelper> acroform_; | 642 | std::unique_ptr<QPDFAcroFormDocumentHelper> acroform_; |
| 638 | std::unique_ptr<QPDFEmbeddedFileDocumentHelper> embedded_files_; | 643 | std::unique_ptr<QPDFEmbeddedFileDocumentHelper> embedded_files_; |
| 639 | std::unique_ptr<QPDFOutlineDocumentHelper> outlines_; | 644 | std::unique_ptr<QPDFOutlineDocumentHelper> outlines_; |
| 640 | - std::unique_ptr<QPDFPageDocumentHelper> pages_; | 645 | + std::unique_ptr<QPDFPageDocumentHelper> page_dh_; |
| 641 | std::unique_ptr<QPDFPageLabelDocumentHelper> page_labels_; | 646 | std::unique_ptr<QPDFPageLabelDocumentHelper> page_labels_; |
| 642 | }; | 647 | }; |
| 643 | 648 |